Skip to content

Releases: patrykandpatrick/vico

v2.1.0-alpha.4

06 Feb 08:57
bda2d43
Compare
Choose a tag to compare
v2.1.0-alpha.4 Pre-release
Pre-release

Overview

  • breaking changes: none
  • addressed: #1011

multiplatform

  • An issue where CartesianChart mispositioned Legends has been resolved.

v2.1.0-alpha.3

03 Feb 18:09
d9a29d2
Compare
Choose a tag to compare
v2.1.0-alpha.3 Pre-release
Pre-release

Overview

  • breaking changes: none1
  • addressed: #805

compose

  • In noninteractive Compose previews—which don’t support asynchronous execution—CartesianChartHost now handles CartesianChartModelProducer communication synchronously, enabling charts to display as expected. For this to work, the consumer must also move processing to the main thread—for example, by calling runTransaction from runBlocking rather than LaunchedEffect. This should be done only for previews.

multiplatform

  • In noninteractive Compose previews—which don’t support asynchronous execution—CartesianChartHost now handles CartesianChartModelProducer communication synchronously, enabling charts to display as expected. For this to work, the consumer must also move processing to the main thread—for example, by calling runTransaction from runBlocking rather than LaunchedEffect. This should be done only for previews.
  • An incorrect package declaration has been amended; CartesianLayerRangeProvider is now in com.patrykandpatrick.vico.multiplatform.cartesian.data.
  • The sample app has been made multiplatform. In this initial version, there are three multiplatform sample charts. However, multiplatform versions of all remaining sample charts will be introduced in upcoming updates. This process will be complete by the time Vico 2.1.0 is published.
  1. Excluding multiplatform, which is experimental. (It will remain available, but the API is subject to change.)

v2.1.0-alpha.2

27 Jan 20:13
daa42ba
Compare
Choose a tag to compare
v2.1.0-alpha.2 Pre-release
Pre-release

Overview

  • breaking changes: none
  • addressed: #353

multiplatform

This new module provides Compose Multiplatform support. The currently supported platforms are Android and iOS, but this will be expanded. multiplatform is standalone; to use it, add only the following Vico dependency:

[versions]
vico = "2.1.0-alpha.2"
# ...
 
[libraries]
vico = { group = "com.patrykandpatrick.vico", name = "multiplatform", version.ref = "vico" }
# ...

The multiplatform API closely resembles that of compose. There are some minor differences in feature set:

  • compose-m3 and compose-m2 equivalents aren’t available yet. You can replicate their functionality by creating your own MaterialTheme-based VicoTheme.
  • A ComponentShader equivalent isn’t available yet. You can use ShaderBrush instead.
  • ShapeComponent doesn’t support shadows yet. This is due to Compose Multiplatform’s Paint lacking shadow functionality.

A Compose Multiplatform sample app and multiplatform coverage in the guide are being worked on and will be available by the time Vico 2.1.0 is published. However, with the similarity of compose and multiplatform, most of the compose documentation applies, and you can fill in the gaps by referring to the multiplatform API reference.

multiplatform is experimental; it will remain available, but the API is subject to change. While multiplatform is Jetpack Compose–compatible, compose support continues. In the distant future, compose will be removed in favor of multiplatform, which will then be renamed to compose.

v2.1.0-alpha.1

25 Jan 08:56
9972bc8
Compare
Choose a tag to compare
v2.1.0-alpha.1 Pre-release
Pre-release

Warning

The old, pre-1.6.2 Maven Central coordinates are being discontinued. Those using them will receive deprecation warnings.

Overview

  • breaking changes: none
  • external contributors: @L-Andrade

core

  • DefaultCartesianMarker.LabelPosition.BelowPoint has been introduced. This positions the label below the bottommost marked point.
  • The default dash and gap lengths for LineCartesianLayer.LineStroke.Dashed have been updated.

v1.16.1

24 Jan 09:08
43924f2
Compare
Choose a tag to compare

Overview

  • breaking changes: none
  • addressed: #993

compose

  • An issue where the logical display density was obtained from Context instead of LocalDensity for sp-to-px conversion has been addressed. This problem caused LocalDensity-based overrides to have no effect on text scaling in charts.

v2.0.1

23 Jan 18:08
cf80708
Compare
Choose a tag to compare

Overview

  • breaking changes: none
  • addressed: #993

compose

  • An issue where the logical display density was obtained from Context instead of LocalDensity for sp-to-px conversion has been addressed. This problem caused LocalDensity-based overrides to have no effect on text scaling in CartesianCharts.

v2.0.0

20 Jan 11:06
cafa7f4
Compare
Choose a tag to compare

This release is effectively identical to version 2.0.0-beta.7. The following compares versions 2.0.0 and 1.16.0.

Overview

Highlights

Vico 2.0.0 is the result of a sweeping redesign of the library. The key changes are highlighted below.

  • The overhauled API has a streamlined, consolidated structure—offering greater flexibility in a smaller footprint. Most notably, there’s now a single pair of chart-drawing and model-producing classes for both single- and multi-layer charts.

  • Candlestick charts have been introduced, with comprehensive candle customization and presets for filled and hollow candles.

  • Line charts now support dashed lines.

  • The new line-styling framework for line charts facilitates the creation of data-aware line and area fills, including color scales. It offers presets for single and double fills. In the latter, two separate styles are used—one above a given y value and one below it. A common use case is applying different colors for positive and negative y-values.

  • The reworked scroll and zoom systems offer precise control—with features that facilitate scrolling by a given number of x units, scrolling to a given x coordinate, setting the viewport width in x units, and more.

  • The new provider interfaces enable granular customization of chart layers. Key use cases include styling columns based on their y-values and displaying points only for selected entries in line charts.

  • With intelligent default y-ranges and y-axis label positioning, y-axes are more legible by default. First, a suitable power of 10 is inferred. Then, the y-range bounds are rounded outward to a multiple thereof, and labels are positioned at multiples of this power of 10.

  • With the new and improved built-in axis-item placers, x-axes can dynamically adjust their item spacing based on the zoom factor, preventing label truncation. There’s also a built-in step-based item placer for y-axes.

  • The redesigned marker framework provides more detailed information on the marked points, simplifying value formatting and facilitating the implementation of context-aware behavior. Thanks to these improvements, the built-in marker’s default formatter now intelligently determines when to sum values and when to only list them individually.

  • The expanded extra framework enables model-synchronized updates in multiple new areas.

  • Series values are now stored using Double instead of Float, eliminating the need for most range- and precision-reducing transformations, especially for Unix timestamps.

  • The new, more powerful cache mechanism boosts drawing performance. It retains far more reusable data between frames and, in addition, can share it between multiple instances of the same component.

  • For Jetpack Compose, stability-related enhancements have been made, facilitating composable skipping and thus improving performance.

  • The new defaults offer a refreshed, more versatile appearance out of the box.

  • The expanded, reorganized documentation provides more comprehensive guidance. The sample app has been restructured for clarity, and the all-new sample charts visualize real-world data, making them a more practical reference. Enhancements will continue to be made in these areas.

Thank you for your valuable feedback, which helped shape Vico 2.0.0.

Next steps

Vico 1 support

Bug reports for Vico 1 will be accepted until January 31, 2026. Bug fixes will be provided until February 28, 2026.

v2.0.0-beta.7

03 Jan 09:25
8d2e7d7
Compare
Choose a tag to compare
v2.0.0-beta.7 Pre-release
Pre-release

Overview

  • breaking changes: minor

core

  • In CacheStore, the constructor and purge have been hidden. These aren’t intended for consumer access; use MeasuringContext.cacheStore.

compose

  • An issue where the CacheStore was recreated on CartesianChartModel updates—impeding performance, particularly for LineCartesianLayer—has been resolved.

v2.0.0-beta.6

01 Jan 19:32
2b367ee
Compare
Choose a tag to compare
v2.0.0-beta.6 Pre-release
Pre-release

Overview

  • breaking changes: minor

core

  1. LineCartesianLayer.PointConnector.Sharp, which uses line segments, has been introduced. LineCartesianLayer.PointConnector.cubic thus no longer permits setting curvature to zero.
  2. Some defaults have been updated:
    • The default color palette has been refreshed.
    • In ColumnCartesianLayer, columns now have sharp corners by default.
    • In LineCartesianLayer, lines are now sharp by default. Also, Line.areaFill is set to null. To recreate the previous default LineCartesianLayer.AreaFill, use LineCartesianLayer.AreaFill.single or LineCartesianLayer.AreaFill.double and ShaderProvider.verticalGradient.

compose

  1. The defaults have been updated in accordance with core change 2. The color palettes produced by rememberM2MaterialTheme and rememberM3MaterialTheme remain unchanged.
  2. rememberLayeredComponent has been removed; use the LayeredComponent constructor.

views

  1. An issue where the verticalAxisVerticalLabelPosition XML attribute of the AxisStyle attribute set was misinterpreted has been resolved.
  2. The defaults have been updated in accordance with change 2. In connection with this, the gradientTopColor, gradientBottomColor, positiveGradientTopColor, positiveGradientBottomColor, negativeGradientTopColor, and negativeGradientBottomColor XML attributes of the LineStyle attribute set have been removed. For a gradient LineCartesianLayer.AreaFill, use AreaFill.single or AreaFill.double and ShaderProvider.verticalGradient.

v2.0.0-beta.5

30 Dec 11:21
a9b361c
Compare
Choose a tag to compare
v2.0.0-beta.5 Pre-release
Pre-release

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.