Update dependency com.patrykandpatrick.vico:compose-m2 to v1.14.0 #590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.9.2
->1.14.0
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
patrykandpatrick/vico (com.patrykandpatrick.vico:compose-m2)
v1.14.0
This release introduces fixes and improvements, including a performance boost. Read the release notes.
v1.13.1
This release includes the following changes.
API changes
MutableExtraStore
, an error affectingremove
has been resolved. The function accepted onlyExtraStore.Key
instances withDrawingModel
or a subtype thereof as the type parameter’s value. Now, allExtraStore.Key
instances are accepted.v1.13.0
This release includes the following changes.
Since
v1.13.0-beta.1
Resolved issues
ComposedChart
when no model was available or when the available model had fewer data sets than theComposedChart
had nestedChart
s.Since
v1.12.0
Improvements
AxisItemPlacer.Vertical
implementation now requests no insets whenmaxItemCount
is zero. Thus, to create an axis with no labels, ticks, or guidelines, it’s sufficient to useAxisItemPlacer.Vertical.default(maxItemCount = 0)
. (See #445.)API changes
The animation system has been entirely rewritten. Difference animations are smoother, behave better when the y range changes due to a data update, and exhibit better performance. Redundant calls to
AxisValuesOverrider
functions are no longer made, and numerous visual glitches have been resolved.DiffProcessor
has been removed in favor ofChart.ModelTransformer
andDrawingModelInterpolator
. Use the latter for custom difference animations.ColumnChart
andLineChart
havedrawingModelInterpolator
fields, and in thecompose
module, thelineChart
andcolumnChart
functions havedrawingModelInterpolator
parameters. InChartModelProducer
,progressModel
has been renamed totransformModel
, and itsprogress
parameter has been renamed tofraction
. This change is reflected across related APIs.Updates have been made to
ChartEntryModelProducer
andComposedChartEntryModelProducer
.ComposedChartEntryModelProducer
, rather than being a combination ofChartEntryModelProducer
s, is now independent and uses a list of data sets, with each one corresponding to a single nestedChart
. This makes the API easier to use and resolves synchronization-related issues. To run data updates, userunTransaction
orrunTransactionSuspending
. To create aComposedChartEntryModelProducer
, useComposedChartEntryModelProducer.build
, which lets you run an initialTransaction
. Refer to theTransaction
documentation for more information. Below, the first code block uses APIs from Vico 1.12.0, and the second one shows how to achieve the same result in Vico 1.13.0.The
ComposedChartEntryModelProducer.composedChartEntryModelOf
function has been removed in favor of theplus
operator function forChartEntryModel
s.To resolve a problem where
ChartEntryModelProducer
andComposedChartEntryModelProducer
accepted all updates immediately, even if an update was already running—in which caseConcurrentModificationException
s andNullPointerException
s occurred—we’ve reworked the update mechanism.ChartEntryModelProducer#setEntries
,ComposedChartEntryModelProducer#runTransaction
, andComposedChartEntryModelProducer.Transaction#commit
can reject an update if there’s already one in progress. Each of these functions returns aBoolean
indicating whether the requested update has been accepted or rejected.ChartEntryModelProducer#setEntriesSuspending
,ComposedChartEntryModelProducer#runTransactionSuspending
, andComposedChartEntryModelProducer.Transaction#commitSuspending
suspend the current coroutine until an update can be run. Data updates typically take a few milliseconds to be processed, so unless your chart is frequently updated and you experienced CMEs and NPEs in previous Vico versions,ChartEntryModelProducer#setEntries
,ComposedChartEntryModelProducer#runTransaction
, andComposedChartEntryModelProducer.Transaction#commit
are safe to use. BecauseChartEntryModelProducer
andComposedChartEntryModelProducer
now use coroutines, they no longer acceptExecutor
s—rather, you can specify a customCoroutineDispatcher
. (See #408.)ChartEntryModelProducer
andComposedChartEntryModelProducer
now let you define extras (auxiliary data). These can later be read viaChartEntryModel#extraStore
. Extras are useful for properties that should change with the chart data and can’t be directly derived from it or should be precalculated. For example, if you create a list of x-axis labels for your chart data, you can store this list as an extra to ensure that it’s always in sync with the data.ChartEntryModelProducer#setEntries
has anupdateExtras
parameter, and inComposedChartEntryModelProducer
, theTransaction
class has anupdateExtras
function. (See #363.)Automatic padding for extreme
HorizontalAxis
labels has been introduced. WithHorizontalLayout.FullWidth
, this option adds such an amount of horizontal padding to the chart that the labels forChartValues#minX
andChartValues#maxX
are fully visible. To turn this on, use theaddExtremeLabelPadding
parameter ofAxisItemPlacer.Horizontal.default
or theaddExtremeHorizontalAxisLabelPadding
XML attribute from theAxis
attribute set.AxisItemPlacer.Horizontal
has two new functions,getAddFirstLabelPadding
andgetAddLastLabelPadding
.AxisRenderer
has a newupdateHorizontalDimensions
function. In theChart
interface,updateHorizontalDimensions
replacesgetHorizontalDimensions
. (See #431.)Chart placeholders have been added. These are displayed in charts with
ChartModelProducer
s when noChartEntryModel
is available (no data has been added to theChartModelProducer
). TheChart
composable function has aplaceholder
slot, andBaseChartView
accepts a child view. For the latter, you can also useBaseChartView#setPlaceholder
. In both cases, the default placeholder is blank. Internally, the somewhat ambiguous concept of emptyChartEntryModel
s has been removed—if there’s no data, there’s noChartEntryModel
. Thus, where appropriate,ChartEntryModel
types are now nullable. In particularChartModelProducer#getModel
may now returnnull
. If you’re sure that aChartEntryModel
is available (data has been added), you can useChartModelProducer#requireModel
. (See #414.)For greater flexibility,
HorizontalLayout.FullWidth
now lets you add both scalable (zoom-dependent) and unscalable padding.startPaddingDp
andendPaddingDp
have been replaced withscalableStartPaddingDp
,scalableEndPaddingDp
,unscalableStartPaddingDp
, andunscalableEndPaddingDp
. TheHorizontalLayout.fullWidth
function from thecompose
module has been updated accordingly. (We were unable to use deprecation because Kotlin’s overload resolution doesn’t consider it. When both a deprecated overload and a non-deprecated overload match a call, the deprecated overload may be used, and there’s no direct way around this.) ThestartContentPadding
andendContentPadding
XML attributes have been marked as deprecated and replaced withscalableStartContentPadding
,scalableEndContentPadding
,unscalableStartContentPadding
, andunscalableEndContentPadding
attributes.In
MeasureContext
,chartValuesManager
(of typeChartValuesManager
) has been replaced withchartValuesProvider
(of typeChartValuesProvider
).ChartValuesProvider
has the samegetChartValues
function thatChartValuesManager
does, so it’s sufficient to replacechartValuesManager
withchartValuesProvider
where the former can’t be resolved.ChartValues
updates are to be run earlier on.Selected deprecated APIs with
DeprecationLevel.ERROR
have been removed.Resolved issues
plus
operator function forChartEntryModel
s incorrectly handledComposedChartEntryModel
s.Chart
composable function didn’t respond to changes to thehorizontalLayout
parameter’s value and density changes that didn’t cause the function to leave and reenter the composition.Dependency updates
compose
,compose-m2
, andcompose-m3
modules, the Jetpack Compose BOM has been updated from version 2023.09.01 to version 2023.10.01.v1.12.0
This release includes the following changes.
Improvements
Chart
composable function no longer runs initial animations in previews. This is to prevent empty noninteractive previews. (See #369 and #389. Thanks to @Leedwon for contributing.)API changes
DefaultMarkerLabelFormatter
is now a regular class, not an object, and has acolorCode
property. (See #183.)Bug fixes
VerticalAxis
instances could show one more label thanmaxLabelCount
allowed has been resolved. (See #387 and #388. Thanks to @p-fischer for contributing.)v1.11.3
This release includes the following changes.
Bug fixes
MarkerComponent
rounded the maximum label width down, causing issues withSpannable
s, has been resolved. (See #381.)v1.11.2
This release includes the following changes.
Bug fixes
AxisItemPlacer.Horizontal
implementation, which can be created viaAxisItemPlacer.Horizontal.default
, now works properly whenChartValues#minX
isn’t a multiple ofChartValues#xStep
.v1.11.1
Improvements
compose
module,LocalChartStyle
now caches the defaultChartStyle
, significantly improving performance in setups whereProvideChartStyle
isn’t used.v1.11.0
This release includes the following changes.
Additions
TextComponent
, thegetWidth
,getHeight
, andgetTextBounds
functions have a new parameter,pad
. When this is set totrue
,text
is extended by such a number of blank lines that it haslineCount
lines, which can be useful for certain measurement operations.Improvements
Chart
composable function’sdiffAnimationSpec
parameter is now nullable, and passingnull
disables difference animations. This is recommended over usingsnap
.API changes
AxisItemPlacer.Horizontal#getMeasuredLabelClearance
is no longer used, it has been marked as deprecated. Overrides of this function can be removed.MeasureContext#chartScale
has been removed. This field’s value was sometimes inaccurate, as once all elements have been measured, the zoom factor may be overridden (e.g., forAutoScaleUp
to take effect). UseChartDrawContext#zoom
instead.Bug fixes
AutoScaleUp.Full
was in effect, chart zooming worked incorrectly has been resolved. (See #342.)FadingEdges
instances now work as expected in charts that are zoomed in or zoomed out.views
module, the threeFadingEdges
-related XML attributes now work properly.ChartEntryModel
s created viachartEntryModelOf
now have unique IDs.Thanks to @p-fischer for contributing.
v1.10.1
This release includes the following changes.
Bug fixes
v1.10.0
This release includes the following changes.
API changes
MeasureContext
, because Android 14 introduces non-linear font scaling,fontScale
has been removed. UsespToPx
instead.MeasureContext
, for clarity,toPixels
has been renamed todpToPx
, andtoFontSize
has been renamed tospToPx
. The functions with the old names have been marked as deprecated.Bug fixes
Marker
for the last visible entry no longer occurs. (See #320.)compose
module, gesture handling now works properly with version 2023.08.00 of the Jetpack Compose BOM. (See #358.)TextComponent
could produce garbled text, particularly inMarkerComponent
s, has been resolved. (See #357.)MarkerComponent
now limits the label width.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.