patrykandpatrick / vico

A light and extensible chart library for Android.
https://patrykandpatrick.com/vico/wiki
Apache License 2.0
2.15k stars 130 forks source link

unable to add ChartModelProducer<ChartEntryModel> #442

Closed ahmed2146 closed 1 year ago

ahmed2146 commented 1 year ago

How to reproduce

val chartEntryModelProducer1 = ChartEntryModelProducer(myNumber) val chartEntryModelProducer2 = ChartEntryModelProducer(otherNumber) val barGraphData:ChartModelProducer = chartEntryModelProducer1 + chartEntryModelProducer2

error in "+"

Observed behavior

Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: public operator fun TypeVariable(Model).plus(other: TypeVariable(Model)): ComposedChartEntryModel defined in com.patrykandpatrick.vico.core.entry.composed

Expected behavior

this behavior is observed after implementation 'com.patrykandpatrick.vico:compose-m3:1.9.2' implementation 'com.patrykandpatrick.vico:core:1.9.2' these versions

Vico version(s)

Latest stable version, Latest unstable version

Android version(s)

implementation 'com.patrykandpatrick.vico:compose-m3:1.13.0-alpha.8' implementation 'com.patrykandpatrick.vico:core:1.13.0-alpha.8'

Additional information

No response

patrickmichalik commented 1 year ago

Hello! As described in the the Vico 1.13.0 Alpha 1 release notes, ChartEntryModelProducers can no longer be combined. This mechanism was intrinsically problematic—it introduced synchronization-related issues. The release notes outline how to use the new ComposedChartEntryModelProducer. This isn’t a bug, so I’ll be closing the issue. If you have any questions, feel free to let me know.

ahmed2146 commented 1 year ago

Thank you so much :)

patrickmichalik commented 1 year ago

You’re welcome!