Releases: patrykandpatrick/vico
Releases · patrykandpatrick/vico
v2.0.0-beta.5
Overview
- breaking changes: moderate
- addressed: #933
core
- Concurrency-related fixes have been made to
CartesianChartModelProducer
, resolving an issue where running twoTransaction
s in very short succession could cause a lock-up. Also,createTransaction
, theTransaction
constructor, andTransaction.commit
have been hidden or removed—userunTransaction
. Dimensions
has been renamed toInsets
. TheEmpty
singleton is now calledZero
.- In
AutoScrollCondition
,shouldPerformAutoScroll
is nowshouldScroll
, the function parameters have been flipped, andOnModelSizeIncreased
is nowOnModelGrowth
. - In
FadingEdges
,startEdgeWidthDp
is nowstartWidthDp
,endEdgeWidthDp
isendWidthDp
, andedgeWidthDp
iswidthDp
. Zoom.static
has been renamed toZoom.fixed
.- In
Shadow
,dxDp
anddyDp
are nowxDp
andyDp
. - In
CandlestickCartesianLayerModel
,Entry.Change
is nowChange
. - In
CandlestickCartesianLayer
, the name ofcandles
has been corrected tocandleProvider
. - In
BaseAxis.Size.Auto
,minSizeDp
andmaxSizeDp
are nowminDp
andmaxDp
.BaseAxis.Size.Exact
has been renamed toBaseAxis.Size.Fixed
, and itssizeDp
constructor parameter is now calledvalueDp
. - In
LayeredComponent
,rear
is nowback
. HorizontalPosition
andVerticalPosition
are nowPosition.Horizontal
andPosition.Vertical
.CartesianMarkerValueFormatter
is nowDefaultCartesianMarker.ValueFormatter
.DefaultCartesianMarker.ValueFormatter.default
replacesDefaultCartesianMarkerValueFormatter
. If subclassingDefaultCartesianMarkerValueFormatter
, switch to a delegation-based solution, or make the custom implementation standalone.DynamicShader
is nowShaderProvider
. InShaderProvider.component
,tileXMode
andtileYMode
are nowxTileMode
andyTileMode
.Shader.toDynamicShader
is nowShader.toShaderProvider
. TheRectF
-basedgetShader
overload has been removed in favor of the four-parameter one. InFill
,shader
is nowshaderProvider
.- In
VerticalAxis
,verticalLabelPosition
is now of typePosition.Vertical
. The same applies to theverticalLabelPosition
parameters ofstart
andend
.VerticalAxis.VerticalLabelPosition
has been removed. - In
ColumnCartesianLayer
andLineCartesianLayer.Line
,dataLabelVerticalPosition
is nowdataLabelPosition
. - The
CorneredShape
API has been consolidated:Corner
is nowCorneredShape.Corner
. InRelative
,percentage
is nowsizePercent
. In both subclasses,cornerTreatment
is nowtreatment
.FullyRounded
is nowRounded
.CornerLocation
is nowCorneredShape.CornerPosition
.CornerTreatment
is nowCorneredShape.CornerTreatment
. IncreateCorner
, the parameters have been reordered, andcornerLocation
is nowposition
.SharpCornerTreatment
,RoundedCornerTreatment
, andCutCornerTreatment
have been hidden or removed in favor ofCorneredShape.CornerTreatment.Sharp
,CorneredShape.CornerTreatment.Rounded
, andCorneredShape.CornerTreatment.Cut
.
- In the
CorneredShape
-basedMarkerCorneredShape
constructor,corneredShape
has been renamed tobase
. - A public
Point
constructor has been introduced, replacing thepoint
factory functions. HorizontalDimensions
is nowCartesianLayerDimensions
, andMutableHorizontalDimensions
isMutableCartesianLayerDimensions
. InAxis
,updateHorizontalDimensions
is now calledupdateLayerDimensions
, and thehorizontalDimensions
parameter has been renamed tolayerDimensions
. InCartesianLayer
,updateHorizontalDimensions
has been renamed toupdateDimensions
, and thehorizontalDimensions
parameter has been renamed todimensions
. Beyond this, thehorizontalDimensions
properties and parameters have been renamed tolayerDimensions
.Insets
-related changes have been made:Insets
is nowCartesianLayerMargins
, andHorizontalInsets
isHorizontalCartesianLayerMargins
.CartesianLayerInsetter
is now calledCartesianLayerMarginUpdater
. TheupdateInsets
function is nowupdateLayerMargins
, and itsinsets
parameter is nowlayerMargins
. TheupdateHorizontalInsets
function is nowupdateHorizontalLayerMargins
, and itsinsets
parameter is nowhorizontalLayerMargins
. In both functions,horizontalDimensions
is nowlayerDimensions
, and the parameters have been reordered.- In
HorizontalAxis.ItemPlacer
,getStartHorizontalAxisInset
is nowgetStartLayerMargin
, andgetEndHorizontalAxisInset
isgetEndLayerMargin
. InVerticalAxis.ItemPlacer
,getTopVerticalAxisInset
is nowgetTopLayerMargin
, andgetBottomVerticalAxisInset
isgetBottomLayerMargin
.
- In the
LegendItem
functions, the parameters have been reordered, andiconPaddingDp
is nowiconLabelSpacingDp
. - In
Bounded
, theRectF
-basedsetBounds
overload has been removed in favor of the four-parameter one. - In
DrawingContext
,withOtherCanvas
is nowwithCanvas
. - In
MeasuringContext
,layoutDirectionMultiplier
is now of typeInt
. - In
CartesianLayer
,updateRanges
is nowupdateChartRanges
, and theranges
parameter has been renamed tochartRanges
. - In the
drawHorizontal
function ofLineComponent
,centerY
is nowy
. IndrawVertical
,centerX
isx
, and the parameters have been reordered. In both functions,thicknessScale
is nowthicknessFactor
. - The properties of
CartesianLayerPadding
are now public. - Some nonessential API elements have been hidden or removed.
compose
- In conneciton with
core
change 2, thedimensions
factory function is nowinsets
, and allDimensions
parameters are now of typeInsets
. - In connection with
core
change 4, thestartEdgeWidth
,endEdgeWidth
, andwidth
parameters of therememberFadingEdges
overloads are nowstartWidth
,endWidth
, andwidth
. - In connection with
core
change 6, thedx
anddy
parameters ofshadow
have been renamed tox
andy
. - In connection with
core
change 8, thecandles
parameter ofrememberCandlestickCartesianLayer
has been renamed tocandleProvider
. - In connection with
core
change 9, theminSize
andmaxSize
parameters ofBaseAxis.Size.auto
are now calledmin
andmax
,BaseAxis.Size.exact
has been renamed toBaseAxis.Size.fixed
, and itssize
parameter is now calledvalue
. - In connection with
core
change 10, therear
parameter ofrememberLayeredComponent
has been renamed toback
. - In connection with
core
change 14, inVerticalAxis.rememberStart
andVerticalAxis.rememberEnd
,verticalLabelPosition
is now of typePosition.Vertical
. - In connection with
core
change 15, inrememberColumnCartesianLayer
andLineCartesianLayer.rememberLine
,dataLabelVerticalPosition
is nowdataLabelPosition
. - In connection with
core
change 17, in theCorneredShape
-basedmarkerCorneredShape
overload,corneredShape
has been renamed tobase
. - In
markerCorneredShape
, the name oftickSizeDp
has been corrected totickSize
. rememberExtraLambda
has been removed, as with Jetpack Compose’s strong skipping mode, it’s no longer needed. Use normal lambdas instead.- In
CartesianChartHost
,runInitialAnimation
is nowanimateIn
.
views
- In connection with
core
change 15, thedataLabelVerticalPosition
XML attributes have been renamed todataLabelPosition
. - In
ScrollHandler
, theanimateScroll
parameters have been reordered, theoldValue
andnewValue
parameters ofListener.onValueChanged
have been renamed toold
andnew
, and theoldMaxValue
andnewMaxValue
parameters ofListener.onMaxValueChanged
have been renamed toold
andnew
. - In
ChartView
,runInitialAnimation
is nowanimateIn
. - In
ZoomHandler.Listener
, theoldValue
andnewValue
parameters ofonValueChanged
have been renamed toold
andnew
, and theoldValueRange
andnewValueRange
parameters ofonValueRangeChanged
have been renamed toold
andnew
.
v2.0.0-beta.4
Overview
- breaking changes: minor
- addressed: #469, #835, #939, #942
- external contributors: @anshu7vyas, @Tyler-Lopez
core
- In
LineCartesianLayer
, dashed lines have been introduced. TheLineCartesianLayer.Line
constructor has a newstroke
parameter, which takes aLineCartesianLayer.LineStroke
instance. Two implementations are available:LineCartesianLayer.LineStroke.Continuous
andLineCartesianLayer.LineStroke.Dashed
. Stroke thickness and cap customization is now also performed viaLineStroke
—thethicknessDp
andcap
parameters of theLine
constructor have been moved to the constructors of the twoLineStroke
s. - In
HorizontalAxis.ItemPlacer.aligned
,spacing
andoffset
are nowExtraStore
lambdas. - In
CartesianChart
,layerPadding
is now anExtraStore
lambda. - An issue where the
LineFill
instantiated byLineFill.double
could position the split at a noninteger pixel y coordinate, leading to unexpectedLineCartesianLayerMarkerTarget.Point.color
values, has been resolved. LineFill
masking is now handled internally. CustomLineFill
s should be updated to draw their content normally, not usingPorterDuff.Mode.SRC_IN
.
compose
- In connection with
core
change 1,LineCartesianLayer.rememberLine
has been modified accordingly, andLineCartesianLayer.LineStroke.continuous
andLineCartesianLayer.LineStroke.dashed
factory functions have been introduced. - An issue where
CartesianChartHost
could consume all horizontal swipes whenCartesianChart
scroll was disabled—interfering with, for example,HorizontalPager
s—has been resolved.
views
- In connection with
core
change 1,dashLength
andgapLength
XML attributes have been added toLineStyle
. Additionally, there’s a newandroid:strokeLineCap
XML attribute.
v1.16.0
This release has the same content as version 1.16.0-beta.1
. The following compares versions 1.16.0
and 1.15.0
.
Overview
core
- An issue where overlaps between persistent
Marker
s were handled unpredictably has been resolved. The order in which persistentMarker
s are drawn now reflects that frompersistentMarkers
. - Concurrency-related fixes have been made to
ChartEntryModelProducer
andComposedChartEntryModelProducer
. - An issue where
ShapeComponent.draw
could fail to rewind thePath
betweenShape.draw
calls has been resolved.
v1.16.0-beta.1
v2.0.0-beta.3
Overview
- breaking changes: minor
- addressed: #794, #902
- external contributors: @cristianboicu01
core
ShapeComponent
andLineComponent
now useFill
.color
has been replaced byfill
;strokeColor
, bystrokeFill
.- In
CartesianMarker
,draw
has been split intodrawUnderLayers
anddrawOverLayers
. To migrate and preserve the same behavior, replaceoverride draw(/* ... */)
withoverride drawOverLayers(/* ... */)
. TextComponent
has a newlineHeightSp
constructor parameter.- Fixes and improvements related to color extraction for
CartesianMarker
s have been made across allCartesianLayer
s. - In
CacheStore
, an issue where cached values could fail to be retrieved has been addressed. - In
BaseAxis.Size
,TextWidth
is now calledText
. This is more precise—forHorizontalAxis
, the the text height is used.
compose
- In connection with
core
change 1, inrememberShapeComponent
andrememberLineComponent
,color
has been replaced byfill
, andstrokeColor
has been replaced bystrokeFill
. As mentioned in subsection 6.1.2 of the guide,Fill
creation in Compose is performed via thefill
factory function. - In connection with
core
change 3,rememberTextComponent
has a newlineHeight
parameter. - Compose
BaseAxis.Size
factory functions—BaseAxis.Size.auto
,BaseAxis.Size.exact
, and so on—have been added.
views
- Those
CartesianChartView
XML attributes that are more closely related toCartesianChart
have been extracted to a dedicated attribute set:CartesianChartStyle
. This is used with the newchartStyle
attribute ofCartesianChartView
. The extracted attributes are as follows:axisStyle
,*AxisStyle
,*LayerStyle
,*LayerPadding
, andshow*Axis
. - In connection with
core
change 3, theTextComponentStyle
XML attribute set has a newandroid:lineHeight
attribute. - The
color
XML attribute has been removed in favor ofandroid:color
. Replaceapp:color
withandroid:color
. - In
CartesianChartView
, thesetModel
function has been replaced by amodel
property.
v2.0.0-beta.2
This release includes bug fixes and API enhancements. Read the release notes.
v1.16.0-alpha.1
This release resolves an issue where overlaps between persistent Marker
s were handled unpredictably. Read the release notes.
v2.0.0-beta.1
This release includes bug fixes and API enhancements. Read the release notes.
v2.0.0-alpha.28
This release includes bug fixes, Legend
updates, and API enhancements. Read the release notes.
v2.0.0-alpha.27
This release includes bug fixes and continues the API cleanup. Read the release notes.