Releases: patrykandpatrick/vico
Releases · patrykandpatrick/vico
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
.
v1.2.0
This release contains the following changes.
Additions
- the ability to listen to marker visibility changes (see
MarkerVisibilityChangeListener
)
Improvements
- The scale factor of non-scrollable charts can now be lower than 1. This prevents an empty space from being shown in charts with few entries.
Dependency updates
- The
compose
,compose-m2
, andcompose-m3
modules now use Jetpack Compose version1.2.0-rc02
. - The
compose-m3
module now usesandroidx.compose.material3:material3
version1.0.0-alpha13
.
v1.1.1
This release includes the following changes.
Additions
TextComponent
now allows you to specify the height available for the text.
Resolved issues
- In some instances,
TextComponent
could measure and draw itself incorrectly when rotated. - During the measuring phase,
HorizontalAxis
providedHorizontalAxis#titleComponent
with an incorrect maximum width. VerticalAxis
didn’t limit the length of its title. This could cause the title to stick out past the axis.
API changes
- The
includePadding
parameter ofTextComponent#getTextBounds
is now calledincludePaddingAndMargins
for clarity.
Dependency updates
- Vico now targets API level 32.
- The
view
module no longer unnecessarily depends oncom.google.android.material
. - The
view
andcompose
modules now useandroidx.core:core-ktx
version 1.8.0. - The
view
andcompose
modules now useandroidx.appcompat:appcompat
version 1.4.2. - The
compose
module now uses Jetpack Compose version1.2.0-beta03
. - The
compose
module now usesorg.jetbrains.kotlinx:kotlinx-coroutines-core
version 1.6.2.