Skip to main content

2.0.0-alpha.2

This update continues the API cleanup, enables dynamic MergeMode customization, and brings a performance boost.

Breaking changesAddressed
Minor#481

The following parameters and properties have been moved from the hosts to CartesianChart:

  • startAxis
  • topAxis
  • endAxis
  • bottomAxis
  • fadingEdges
  • legend

Migrate as follows:

The aforementioned parameters of CartesianChartHost are now parameters of rememberCartesianChart. Copy the arguments from the old location to the new location.

The mergeMode property of ColumnCartesianLayer is now a lambda with a ColumnCartesianLayerModel parameter. To migrate, add braces to all mergeMode arguments. Consider the following:

mergeMode = MergeMode.Stack

In Vico 2.0.0-alpha.2, use this:

mergeMode = { MergeMode.Stack }

This change enables you to dynamically change a ColumnCartesianLayer’s MergeMode based on its data. You can also use extras:

val mergeModeKey = ExtraStore.Key<ColumnCartesianLayer.MergeMode>()
cartesianChartModelProducer.runTransaction {
updateExtras { it[mergeModeKey] = MergeMode.Stacked }
...
}
mergeMode = { it.extraStore[mergeModeKey] }

In the compose module, the following functions have been renamed:

2.0.0-alpha.12.0.0-alpha.2
textComponentrememberTextComponent
lineComponentrememberLineComponent
shapeComponentrememberShapeComponent

The logic responsible for calculating the default x step has been optimized and is now twice as fast.