2.0.0-alpha.4
This release includes fixes and improvements and enables dynamic maxItemCount customization for AxisItemPlacer.Vertical.default.
| Breaking changes | Addressed |
|---|---|
| Minor | #488, #489, #496 |
The following fixes and improvements have been made:
- Multiple drawing bugs affecting
LineCartesianLayerhave been resolved. - For data whose y range is [0, 0], the default
CartesianLayery range is now [0, 1]. This resolves problems related to division by zero. ColumnCartesianLayerModelandLineCartesianLayerModelnow automatically sort their entries by x value. Previously, if unsorted data was passed in, unexpected behavior occcured.
Additionally, the maxItemCount parameter of AxisItemPlacer.Vertical is now a lambda with a ChartValues parameter, which enables you to dynamically set the maximum item count depending on the chart data. To migrate, add braces to all maxItemCount arguments. Consider the following:
AxisItemPlacer.Vertical.default(maxItemCount = 4)
In Vico 2.0.0-alpha.4, use this:
AxisItemPlacer.Vertical.default(maxItemCount = { 4 })
The getTopVerticalAxisInset and getBottomVerticalAxisInset functions of AxisItemPlacer.Vertical have a new parameter, context (of type MeasureContext).