Skip to content

Releases: patrykandpatrick/vico

v1.6.1

18 Dec 11:24
22fc5e2
Compare
Choose a tag to compare

This release includes the following changes.

Additions

  • In the view module, TextComponentStyle now has a textAlign attribute.

Improvements

  • Charts now use the GCD of the x values of their entries as their x step.
  • The performance of DashedShape instances with DashedShape#fitStrategy set to FitStrategy.Resize has been improved.
  • rememberFadingEdges and the FadingEdges constructor now use 32 dp, not 0 dp, as the default width of fading edges.

Resolved issues

  • DefaultDiffProcessor could cause crashes during rapid data set updates.
  • HorizontalAxis handled fractional x values improperly.

v1.6.0

02 Dec 18:16
26e4475
Compare
Choose a tag to compare

This release includes the following changes.

Additions

  • Fading edges are now available. This feature applies a horizontal fade to the edges of the chart area for scrollable charts.
  • You can now turn off the automatic scaling up of charts that, at a scale factor of 1, wouldn’t fill up the entire available horizontal area.
  • In the view module, several new XML attributes have been added. Among other things, you can now customize individual chart axes via XML.

Improvements

  • In the compose module, all functions that create components are now composable and use remember. This is to improve performance.

API changes

  • In the compose module, two duplicate functions have been deprecated. Additionally, several functions have been moved, with the old functions having been deprecated.

Resolved issues

  • The Chart composable failed to respond to model updates after being recomposed with a new ChartModelProducer.
  • When provided with a ChartModelProducer, the Chart composable briefly had a height of zero when composed.
  • TextComponent mispositioned its background when textAlign was set to Paint.Align.CENTER or Paint.Align.RIGHT.

v1.5.2

06 Nov 18:01
a3a3b84
Compare
Choose a tag to compare

This release includes the following changes.

Additions

  • When a chart marker is shown, the associated list of Marker.EntryModels is now exposed via MarkerVisibilityChangeListener (specifically, via the new onMarkerShown function). See also the first point under “API changes.”
  • TextComponent now has a textAlign field for controlling the horizontal text alignment.

API changes

  • In MarkerVisibilityChangeListener, onMarkerVisibilityChanged has been split into onMarkerShown and onMarkerHidden. See also the first point under “Additions.”

Dependency updates

See this commit for information on the dependency updates included in this release.

v1.5.1

25 Oct 18:39
8b42c50
Compare
Choose a tag to compare

This release includes the following changes.

Improvements

  • Column charts now support data sets in which positive and negative values are mixed together.

Resolved issues

  • Charts consumed more gestures than necessary in some instances.
  • For scrollable charts, the chart scale wasn’t considered when the maximum scroll distance was being calculated, which caused scrolling-related bugs.

v1.5.0

09 Oct 17:54
Compare
Choose a tag to compare

This release includes the following changes.

Additions

  • You can now customize charts’ initial scroll position (start or end). Optionally, you can configure charts to automatically scroll to this position when a specific condition is met (e.g., a new chart entry is added). This is possible via ChartScrollSpec. See also the first point under “API changes.”
  • AxisValuesOverrider introduces richer options for the customization of the minimum and maximum values displayed along chart axes. See also the second point under “API changes.”

API changes

  • The isHorizontalScrollEnabled parameter of the Chart composable and the isHorizontalScrollEnabled field of BaseChartView are now deprecated. Use ChartScrollSpec instead. See also the first point under “Additions.”
  • The min* and max* parameters of columnChart and lineChart, as well as the min* and max* fields of ColumnChart, ComposedChart, and LineChart, are now deprecated. Use AxisValuesOverrider instead. See also the second point under “Additions.”

Dependency updates

Please see this commit for information on the dependency updates included in this release.

v1.4.3

21 Aug 18:40
Compare
Choose a tag to compare

This release includes the following changes.

Resolved issues

  • The textComponent composable function was missing a typeface parameter.
  • The LineChart.LineSpec#copy function was missing the following parameters: dataLabel, dataLabelVerticalPosition, dataLabelValueFormatter, and dataLabelRotationDegrees.
  • HorizontalAxis could draw ticks, guidelines, and labels incorrectly for some line charts.
  • Charts with only one entry were rendered incorrectly and could cause crashes.

Dependency updates

Please see this commit for information on the dependency updates included in this release.

v1.4.2

16 Aug 18:16
Compare
Choose a tag to compare

This release includes the following changes.

Resolved issues

  • The dimensions of charts that, simultaneously, were created via the Chart composable, were non-scrollable, and had no marker were incorrect.

v1.4.1

16 Aug 07:17
Compare
Choose a tag to compare

This release includes the following changes.

Resolved issues

  • Modifiers added to the Chart composable were applied twice.

Improvements

  • When horizontal scrolling is enabled for a chart, but the chart has too few entries to be scrollable, its contents are now scaled up to fill the chart’s entire width.

v1.4.0

15 Aug 09:09
Compare
Choose a tag to compare

This release includes the following changes.

Additions

  • LineChart now allows you to specify the horizontal position of each point in its corresponding segment. When PointPosition.Start is used, there’s no gap between the left edge of the chart and the line’s first point.
  • LineChart.LineSpec now allows for granular control of the line’s shape via LineChart.LineSpec.PointConnector. See also the first point under “API changes.”
  • You can now disable the initial animation for charts. This is possible via the runInitialAnimation parameter of the Chart composable, and the runInitialAnimation field of BaseChartView.

API changes

  • The cubicStrength parameter of the LineChart.LineSpec constructor is deprecated. The same applies to the cubicStrength parameter of the lineSpec composable function. Instead, provide a LineChart.LineSpec.PointConnector with a custom cubicStrength value. See also the second point under “Additions.”
  • ChartModelProducer#registerForUpdates now has a getOldModel parameter. See also the third point under “Resolved issues.”
  • ChartModelProducer now has an isRegistered function.

Resolved issues

  • MarkerCorneredShape could trigger a crash in certain instances.
  • ColumnChart could create redundant touch detection areas for markers.
  • ChartEntryModelProducer#registerForUpdates called updateListener before DiffProcessor#setEntries and called progressModelSynchronously with progress equal to zero after calling updateListener. This could cause issues during chart creation. See also the second point under “API changes.”
  • BaseChartView didn’t call ChartModelProducer#unregisterFromUpdates when detached from its window. This could potentially cause memory leaks.

v1.3.0

25 Jul 07:45
Compare
Choose a tag to compare

This release includes the following changes.

Additions

  • HorizontalAxis now allows for the offset and spacing of centered ticks to be customized. See also the second point under “API changes.”

API changes

  • ChartEntry now has a withY function. This relates to the second point under “Improvements.”
  • HorizontalAxis.TickType has been deprecated in favor of HorizontalAxis.TickPosition.

Improvements

  • ChartEntryModelProducer now allows for a custom DiffProcessor implementation to be specified.
  • DefaultDiffProcessor now works with custom ChartEntry implementations.
  • The bottomAxis and topAxis functions in the compose module now allow for tick position customization.

Resolved issues

  • DefaultDiffProcessor incorrectly handled instances where the number of entries decreased.

Dependency updates

  • All modules use Kotlin 1.7.0.
  • compose, compose-m2, and compose-m3 use version 1.2.0 of the Compose compiler.
  • compose, compose-m2, and compose-m3 use version 1.2.0-rc03 of Compose.
  • compose-m3 uses version 1.0.0-alpha14 of androidx.compose.material3:material3.