Skip to content

Releases: patrykandpatrick/vico

v2.2.0-alpha.1

19 Jun 18:31
2863019
Compare
Choose a tag to compare
v2.2.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 errors.

Overview

core

  • An issue where maximum-x-precision validation failed to identify some violations has been addressed.

compose

  • VicoZoomState has a new zoom function for programmatic zoom.
  • CartesianChartHost has a new consumeMoveEvents parameter.

views

  • ZoomHandler has a new zoom function for programmatic zoom.
  • CartesianChartView has a new consumeMoveEvents property and a new XML attribute with the same name.

multiplatform

  • VicoZoomState has a new zoom function for programmatic zoom.
  • CartesianChartHost has a new consumeMoveEvents parameter.
  • The fill factory function has been removed; use the Fill constructor instead.
  • An issue where maximum-x-precision validation failed to identify some violations has been addressed.
  1. Excluding multiplatform, which is experimental. (It will remain available, but breaking changes are more likely.)

v2.1.3

29 May 15:14
8bfa812
Compare
Choose a tag to compare

Overview

  • breaking changes: none
  • addressed: #1081

compose

  • An issue where NullPointerExceptions could occur for ShaderProviders created via Brush.toShaderProvider has been addressed. The root cause was a Compose bug where Size.isEmpty sometimes reports false positives, leading to Paint.shader being incorrectly set to null for certain nonzero application areas. A workaround has been added to Vico, but until the Compose bug is fixed, glitches where shaded areas turn blank may occur.

v2.1.2

05 Apr 08:53
f4ab4be
Compare
Choose a tag to compare

Overview

  • breaking changes: none
  • addressed: #1061

multiplatform

  • An issue where TextComponent.minWidth had no effect has been resolved.

v2.1.1

22 Mar 10:54
baef6bc
Compare
Choose a tag to compare

Overview

compose

  • An issue where CartesianChartHost ignored some gestures received during CartesianChart updates has been resolved.

multiplatform

  • An issue where CartesianChartHost ignored some gestures received during CartesianChart updates has been resolved.

v2.1.0

16 Mar 17:45
eb72754
Compare
Choose a tag to compare

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

Warning

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

Overview

core

  • Various performance-related optimizations have been made.
  • 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.
  • The host and Transaction ExtraStores have been decoupled: extras added via CartesianLayer.transform are now found in the new MeasuringContext.extraStore, not in CartesianChartModel.extraStore. This affects only custom animated CartesianLayer implementations.1 For standard usage, no action is required.
  • In HorizontalAxis, the protected CartesianMeasuringContext.getFullXRange function is deprecated. See the deprecation message for more.

compose

  • Various performance-related optimizations have been made.
  • 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

This new module provides Compose Multiplatform support for Android, iOS, and desktop. It has two optional companion modules for Material theming: multiplatform-m2 and multiplatform-m3. These are equivalent to compose-m2 and compose-m3.

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

The multiplatform API is based on the combination of the compose and core APIs, with adjustments for Compose Multiplatform and simplifications enabled by it being a dependency across the board. (In contrast, with compose and core, the former depends on Jetpack Compose, but the latter is framework-agnostic, using only lower-level android.graphics APIs.) There are only some minor differences in feature set:

  • 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.

multiplatform is experimental; it will remain available, but breaking changes are more likely. 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.

Learn more about multiplatform in the guide and in the API reference; for examples, consult the multiplatform sample charts.

  1. This minor breaking change was allowed because (1) as discussed above, it affects only custom animated CartesianLayer implementations, which are rare; (2) addressing it is trivial; and (3) it enabled significant performance improvements for all setups. Deprecation was infeasible primarily because the key aspect here is the removal of CartesianLayer.transform-added extras from CartesianChartModel.extraStore, not merely their addition to CartesianMeasuringContext.extraStore. These extras are CartesianLayerDrawingModels, which are large and slow to hash. CartesianChartModel.extraStore, in turn, is hashed frequently; this enables the caching of the results of ExtraStore lambdas. Moving the CartesianLayerDrawingModels to a separate ExtraStore drastically decreased the time taken to hash CartesianChartModel.extraStore. It also made the caching more effective; now, only those extras that may actually be read in these lambdas are used as keys. These two factors significantly boosted drawing performance.

v2.1.0-beta.2

13 Mar 09:05
d080b45
Compare
Choose a tag to compare
v2.1.0-beta.2 Pre-release
Pre-release

Overview

  • breaking changes: none1

multiplatform

  • In CartesianValueFormatter and CartesianMarker.ValueFormatter, the default factory functions have new optional parameters: decimalSeparator, thousandsSeparator, prefix, and suffix. For CartesianMarker.ValueFormatter.default, these new parameters come between decimalCount and colorCode; in the unlikely event that you’re using colorCode positionally, switch to a named argument.
  • The default vertical padding of Axis labels and the default Legend row spacing have been increased for alignment with the Android-only modules. (These values are now slightly larger in multiplatform than in the Android-only modules, counteracting differences in text rendering between the two environments.)
  • Compose Multiplatform versions of all remaining sample charts have been introduced.
  1. Excluding multiplatform, which is experimental. (It will remain available, but breaking changes are more likely.)

v2.0.3

08 Mar 10:10
4f01770
Compare
Choose a tag to compare

Overview

core

  • An issue where CartesianChart.copy failed to transfer some data has been addressed. This caused CartesianMarkerVisibilityListener.onShown to be superfluously reinvoked on CartesianChart updates that occurred while CartesianChart.marker was shown.

v2.1.0-beta.1

07 Mar 17:33
c9e8e02
Compare
Choose a tag to compare
v2.1.0-beta.1 Pre-release
Pre-release

Overview

core

  • An issue where CartesianChart.copy failed to transfer some data has been addressed. This caused CartesianMarkerVisibilityListener.onShown to be superfluously reinvoked on CartesianChart updates that occurred while CartesianChart.marker was shown.

multiplatform

  • An issue where CartesianChart.copy failed to transfer some data has been addressed. This caused CartesianMarkerVisibilityListener.onShown to be superfluously reinvoked on CartesianChart updates that occurred while CartesianChart.marker was shown.
  • The CartesianChart constructor is now protected. Its public visibility was redundant; except in subclasses, CartesianChart should be instantiated via rememberCartesianChart.
  1. Excluding multiplatform, which is experimental. (It will remain available, but breaking changes are more likely.)

v2.1.0-alpha.6

27 Feb 10:16
629b435
Compare
Choose a tag to compare
v2.1.0-alpha.6 Pre-release
Pre-release

Overview

core

  • An issue where CartesianChart failed to consider startAxis, topAxis, endAxis, and bottomAxis for equals and hashCode, leading to missing recompositions in compose, has been resolved.
  • Various performance-related optimizations have been made.
  • The host and Transaction ExtraStores have been decoupled: extras added via CartesianLayer.transform are now found in the new MeasuringContext.extraStore, not in CartesianChartModel.extraStore. This affects only custom animated CartesianLayer implementations.1 For standard usage, no action is required.
  • In HorizontalAxis, the protected CartesianMeasuringContext.getFullXRange function is deprecated. See the deprecation message for more.

multiplatform

  • An issue where CartesianChart failed to consider startAxis, topAxis, endAxis, and bottomAxis for equals and hashCode, leading to missing recompositions, has been resolved.
  • Various performance-related optimizations have been made.
  • The host and Transaction ExtraStores have been decoupled: extras added via CartesianLayer.transform are now found in the new MeasuringContext.extraStore, not in CartesianChartModel.extraStore. This affects only custom animated CartesianLayer implementations.1 For standard usage, no action is required.
  • In HorizontalAxis, the protected CartesianMeasuringContext.getFullXRange function is deprecated. See the deprecation message for more.
  1. This minor breaking change was allowed because (1) as discussed above, it affects only custom animated CartesianLayer implementations, which are rare; (2) addressing it is trivial; and (3) it enabled significant performance improvements for all setups. Deprecation was infeasible primarily because the key aspect here is the removal of CartesianLayer.transform-added extras from CartesianChartModel.extraStore, not merely their addition to CartesianMeasuringContext.extraStore. These extras are CartesianLayerDrawingModels, which are large and slow to hash. CartesianChartModel.extraStore, in turn, is hashed frequently; this enables the caching of the results of ExtraStore lambdas. Moving the CartesianLayerDrawingModels to a separate ExtraStore drastically decreased the time taken to hash CartesianChartModel.extraStore. It also made the caching more effective; now, only those extras that may actually be read in these lambdas are used as keys. These two factors significantly boosted drawing performance. 2

v2.0.2

27 Feb 19:33
319294e
Compare
Choose a tag to compare

Overview

  • breaking changes: none
  • addressed: #1031

core

  • An issue where CartesianChart failed to consider startAxis, topAxis, endAxis, and bottomAxis for equals and hashCode, leading to missing recompositions in compose, has been resolved.