Releases: patrykandpatrick/vico
Releases · patrykandpatrick/vico
v1.6.1
This release includes the following changes.
Additions
- In the
view
module,TextComponentStyle
now has atextAlign
attribute.
Improvements
- Charts now use the GCD of the x values of their entries as their x step.
- The performance of
DashedShape
instances withDashedShape#fitStrategy
set toFitStrategy.Resize
has been improved. rememberFadingEdges
and theFadingEdges
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
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 useremember
. 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 newChartModelProducer
. - When provided with a
ChartModelProducer
, theChart
composable briefly had a height of zero when composed. TextComponent
mispositioned its background whentextAlign
was set toPaint.Align.CENTER
orPaint.Align.RIGHT
.
v1.5.2
This release includes the following changes.
Additions
- When a chart marker is shown, the associated list of
Marker.EntryModel
s is now exposed viaMarkerVisibilityChangeListener
(specifically, via the newonMarkerShown
function). See also the first point under “API changes.” TextComponent
now has atextAlign
field for controlling the horizontal text alignment.
API changes
- In
MarkerVisibilityChangeListener
,onMarkerVisibilityChanged
has been split intoonMarkerShown
andonMarkerHidden
. 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
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
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 theChart
composable and theisHorizontalScrollEnabled
field ofBaseChartView
are now deprecated. UseChartScrollSpec
instead. See also the first point under “Additions.” - The
min*
andmax*
parameters ofcolumnChart
andlineChart
, as well as themin*
andmax*
fields ofColumnChart
,ComposedChart
, andLineChart
, are now deprecated. UseAxisValuesOverrider
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
This release includes the following changes.
Resolved issues
- The
textComponent
composable function was missing atypeface
parameter. - The
LineChart.LineSpec#copy
function was missing the following parameters:dataLabel
,dataLabelVerticalPosition
,dataLabelValueFormatter
, anddataLabelRotationDegrees
. 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
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
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
This release includes the following changes.
Additions
LineChart
now allows you to specify the horizontal position of each point in its corresponding segment. WhenPointPosition.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 viaLineChart.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 theChart
composable, and therunInitialAnimation
field ofBaseChartView
.
API changes
- The
cubicStrength
parameter of theLineChart.LineSpec
constructor is deprecated. The same applies to thecubicStrength
parameter of thelineSpec
composable function. Instead, provide aLineChart.LineSpec.PointConnector
with a customcubicStrength
value. See also the second point under “Additions.” ChartModelProducer#registerForUpdates
now has agetOldModel
parameter. See also the third point under “Resolved issues.”ChartModelProducer
now has anisRegistered
function.
Resolved issues
MarkerCorneredShape
could trigger a crash in certain instances.ColumnChart
could create redundant touch detection areas for markers.ChartEntryModelProducer#registerForUpdates
calledupdateListener
beforeDiffProcessor#setEntries
and calledprogressModelSynchronously
withprogress
equal to zero after callingupdateListener
. This could cause issues during chart creation. See also the second point under “API changes.”BaseChartView
didn’t callChartModelProducer#unregisterFromUpdates
when detached from its window. This could potentially cause memory leaks.
v1.3.0
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 awithY
function. This relates to the second point under “Improvements.”HorizontalAxis.TickType
has been deprecated in favor ofHorizontalAxis.TickPosition
.
Improvements
ChartEntryModelProducer
now allows for a customDiffProcessor
implementation to be specified.DefaultDiffProcessor
now works with customChartEntry
implementations.- The
bottomAxis
andtopAxis
functions in thecompose
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
, andcompose-m3
use version 1.2.0 of the Compose compiler.compose
,compose-m2
, andcompose-m3
use version1.2.0-rc03
of Compose.compose-m3
uses version1.0.0-alpha14
ofandroidx.compose.material3:material3
.