Skip to content

v2.0.0-beta.5

Pre-release
Pre-release
Compare
Choose a tag to compare
@patrykandpatrickbot patrykandpatrickbot released this 30 Dec 11:21
· 114 commits to master since this release
a9b361c

Overview

  • breaking changes: moderate
  • addressed: #933

core

  1. Concurrency-related fixes have been made to CartesianChartModelProducer, resolving an issue where running two Transactions in very short succession could cause a lock-up. Also, createTransaction, the Transaction constructor, and Transaction.commit have been hidden or removed—use runTransaction.
  2. Dimensions has been renamed to Insets. The Empty singleton is now called Zero.
  3. In AutoScrollCondition, shouldPerformAutoScroll is now shouldScroll, the function parameters have been flipped, and OnModelSizeIncreased is now OnModelGrowth.
  4. In FadingEdges, startEdgeWidthDp is now startWidthDp, endEdgeWidthDp is endWidthDp, and edgeWidthDp is widthDp.
  5. Zoom.static has been renamed to Zoom.fixed.
  6. In Shadow, dxDp and dyDp are now xDp and yDp.
  7. In CandlestickCartesianLayerModel, Entry.Change is now Change.
  8. In CandlestickCartesianLayer, the name of candles has been corrected to candleProvider.
  9. In BaseAxis.Size.Auto, minSizeDp and maxSizeDp are now minDp and maxDp. BaseAxis.Size.Exact has been renamed to BaseAxis.Size.Fixed, and its sizeDp constructor parameter is now called valueDp.
  10. In LayeredComponent, rear is now back.
  11. HorizontalPosition and VerticalPosition are now Position.Horizontal and Position.Vertical.
  12. CartesianMarkerValueFormatter is now DefaultCartesianMarker.ValueFormatter. DefaultCartesianMarker.ValueFormatter.default replaces DefaultCartesianMarkerValueFormatter. If subclassing DefaultCartesianMarkerValueFormatter, switch to a delegation-based solution, or make the custom implementation standalone.
  13. DynamicShader is now ShaderProvider. In ShaderProvider.component, tileXMode and tileYMode are now xTileMode and yTileMode. Shader.toDynamicShader is now Shader.toShaderProvider. The RectF-based getShader overload has been removed in favor of the four-parameter one. In Fill, shader is now shaderProvider.
  14. In VerticalAxis, verticalLabelPosition is now of type Position.Vertical. The same applies to the verticalLabelPosition parameters of start and end. VerticalAxis.VerticalLabelPosition has been removed.
  15. In ColumnCartesianLayer and LineCartesianLayer.Line, dataLabelVerticalPosition is now dataLabelPosition.
  16. The CorneredShape API has been consolidated:
    • Corner is now CorneredShape.Corner. In Relative, percentage is now sizePercent. In both subclasses, cornerTreatment is now treatment. FullyRounded is now Rounded.
    • CornerLocation is now CorneredShape.CornerPosition.
    • CornerTreatment is now CorneredShape.CornerTreatment. In createCorner, the parameters have been reordered, and cornerLocation is now position. SharpCornerTreatment, RoundedCornerTreatment, and CutCornerTreatment have been hidden or removed in favor of CorneredShape.CornerTreatment.Sharp, CorneredShape.CornerTreatment.Rounded, and CorneredShape.CornerTreatment.Cut.
  17. In the CorneredShape-based MarkerCorneredShape constructor, corneredShape has been renamed to base.
  18. A public Point constructor has been introduced, replacing the point factory functions.
  19. HorizontalDimensions is now CartesianLayerDimensions, and MutableHorizontalDimensions is MutableCartesianLayerDimensions. In Axis, updateHorizontalDimensions is now called updateLayerDimensions, and the horizontalDimensions parameter has been renamed to layerDimensions. In CartesianLayer, updateHorizontalDimensions has been renamed to updateDimensions, and the horizontalDimensions parameter has been renamed to dimensions. Beyond this, the horizontalDimensions properties and parameters have been renamed to layerDimensions.
  20. Insets-related changes have been made:
    • Insets is now CartesianLayerMargins, and HorizontalInsets is HorizontalCartesianLayerMargins.
    • CartesianLayerInsetter is now called CartesianLayerMarginUpdater. The updateInsets function is now updateLayerMargins, and its insets parameter is now layerMargins. The updateHorizontalInsets function is now updateHorizontalLayerMargins, and its insets parameter is now horizontalLayerMargins. In both functions, horizontalDimensions is now layerDimensions, and the parameters have been reordered.
    • In HorizontalAxis.ItemPlacer, getStartHorizontalAxisInset is now getStartLayerMargin, and getEndHorizontalAxisInset is getEndLayerMargin. In VerticalAxis.ItemPlacer, getTopVerticalAxisInset is now getTopLayerMargin, and getBottomVerticalAxisInset is getBottomLayerMargin.
  21. In the LegendItem functions, the parameters have been reordered, and iconPaddingDp is now iconLabelSpacingDp.
  22. In Bounded, the RectF-based setBounds overload has been removed in favor of the four-parameter one.
  23. In DrawingContext, withOtherCanvas is now withCanvas.
  24. In MeasuringContext, layoutDirectionMultiplier is now of type Int.
  25. In CartesianLayer, updateRanges is now updateChartRanges, and the ranges parameter has been renamed to chartRanges.
  26. In the drawHorizontal function of LineComponent, centerY is now y. In drawVertical, centerX is x, and the parameters have been reordered. In both functions, thicknessScale is now thicknessFactor.
  27. The properties of CartesianLayerPadding are now public.
  28. Some nonessential API elements have been hidden or removed.

compose

  1. In conneciton with core change 2, the dimensions factory function is now insets, and all Dimensions parameters are now of type Insets.
  2. In connection with core change 4, the startEdgeWidth, endEdgeWidth, and width parameters of the rememberFadingEdges overloads are now startWidth, endWidth, and width.
  3. In connection with core change 6, the dx and dy parameters of shadow have been renamed to x and y.
  4. In connection with core change 8, the candles parameter of rememberCandlestickCartesianLayer has been renamed to candleProvider.
  5. In connection with core change 9, the minSize and maxSize parameters of BaseAxis.Size.auto are now called min and max, BaseAxis.Size.exact has been renamed to BaseAxis.Size.fixed, and its size parameter is now called value.
  6. In connection with core change 10, the rear parameter of rememberLayeredComponent has been renamed to back.
  7. In connection with core change 14, in VerticalAxis.rememberStart and VerticalAxis.rememberEnd, verticalLabelPosition is now of type Position.Vertical.
  8. In connection with core change 15, in rememberColumnCartesianLayer and LineCartesianLayer.rememberLine, dataLabelVerticalPosition is now dataLabelPosition.
  9. In connection with core change 17, in the CorneredShape-based markerCorneredShape overload, corneredShape has been renamed to base.
  10. In markerCorneredShape, the name of tickSizeDp has been corrected to tickSize.
  11. rememberExtraLambda has been removed, as with Jetpack Compose’s strong skipping mode, it’s no longer needed. Use normal lambdas instead.
  12. In CartesianChartHost, runInitialAnimation is now animateIn.

views

  1. In connection with core change 15, the dataLabelVerticalPosition XML attributes have been renamed to dataLabelPosition.
  2. In ScrollHandler, the animateScroll parameters have been reordered, the oldValue and newValue parameters of Listener.onValueChanged have been renamed to old and new, and the oldMaxValue and newMaxValue parameters of Listener.onMaxValueChanged have been renamed to old and new.
  3. In ChartView, runInitialAnimation is now animateIn.
  4. In ZoomHandler.Listener, the oldValue and newValue parameters of onValueChanged have been renamed to old and new, and the oldValueRange and newValueRange parameters of onValueRangeChanged have been renamed to old and new.