v1.13.0-alpha.1
Pre-releaseThis release includes the following changes.
Improvements
-
We’ve entirely rewritten the animation system. Difference animations are smoother, behave better when the y range changes as a result of a data update, and exhibit better performance. Redundant calls to
AxisValuesOverrider
functions are no longer made, and numerous visual glitches have been resolved. Upcoming 1.13 alphas will introduce more customization options for the new animations.
API changes
-
We’ve reworked
ComposedChartEntryModelProducer
. Rather than being a combination ofChartEntryModelProducer
s, it is now independent and uses a list of data sets, with each one corresponding to a single nestedChart
. To run data updates, useComposedChartEntryModelProducer#runTransaction
. To create aComposedChartEntryModelProducer
, useComposedChartEntryModelProducer.build
, which lets you run an initialTransaction
. Refer to theTransaction
documentation for information on the available functions. Consider the following snippet, which uses APIs from Vico 1.12.val chartEntryModelProducer1 = ChartEntryModelProducer(a) val chartEntryModelProducer2 = ChartEntryModelProducer(b) val composedChartEntryModelProducer = chartEntryModelProducer1 + chartEntryModelProducer2 chartEntryModelProducer1.setEntries(c) chartEntryModelProducer2.setEntries(d)
You can achieve the same result in Vico 1.13 as follows.
val composedChartEntryModelProducer = ComposedChartEntryModelProducer.build { add(a) add(b) } composedChartEntryModelProducer.runTransaction { /* Because we’re not calling `populate`, the new list of data sets is empty, so we use `add` instead of `set`. */ add(c) add(d) }
These changes make
ComposedChartEntryModelProducer
easier to work with and resolve synchronization-related issues. -
For flexibility,
DiffProcessor
has been removed in favor ofChart.ModelTransformer
. Soon,ColumnChart
andLineChart
will let you apply a customChart.ModelTransformer
implementation. -
Selected deprecated APIs with
DeprecationLevel.ERROR
have been removed.
If you need help updating to this version or have any suggestions, please start a discussion. If you run into a bug, please open an issue.