Skip to content

v1.13.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@patrykandpatrickbot patrykandpatrickbot released this 16 Sep 14:28
· 650 commits to master since this release
75a58c3

This 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 of ChartEntryModelProducers, it is now independent and uses a list of data sets, with each one corresponding to a single nested Chart. To run data updates, use ComposedChartEntryModelProducer#runTransaction. To create a ComposedChartEntryModelProducer, use ComposedChartEntryModelProducer.build, which lets you run an initial Transaction. Refer to the Transaction 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 of Chart.ModelTransformer. Soon, ColumnChart and LineChart will let you apply a custom Chart.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.