Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency com.patrykandpatrick.vico:compose-m2 to v1.14.0 #590

Closed

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 20, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.patrykandpatrick.vico:compose-m2 1.9.2 -> 1.14.0 age adoption passing confidence

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
  • In MutableExtraStore, an error affecting remove has been resolved. The function accepted only ExtraStore.Key instances with DrawingModel or a subtype thereof as the type parameter’s value. Now, all ExtraStore.Key instances are accepted.

v1.13.0

This release includes the following changes.

Since v1.13.0-beta.1
Resolved issues
  • Crashes occurred in ComposedChart when no model was available or when the available model had fewer data sets than the ComposedChart had nested Charts.
Since v1.12.0
Improvements
  • The default AxisItemPlacer.Vertical implementation now requests no insets when maxItemCount is zero. Thus, to create an axis with no labels, ticks, or guidelines, it’s sufficient to use AxisItemPlacer.Vertical.default(maxItemCount = 0). (See #​445.)
  • When the precision of a chart’s x values is too large for the GCD of their deltas to be calculated, a descriptive exception is now thrown. (See #​374.)
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 of Chart.ModelTransformer and DrawingModelInterpolator. Use the latter for custom difference animations. ColumnChart and LineChart have drawingModelInterpolator fields, and in the compose module, the lineChart and columnChart functions have drawingModelInterpolator parameters. In ChartModelProducer, progressModel has been renamed to transformModel, and its progress parameter has been renamed to fraction. This change is reflected across related APIs.

  • Updates have been made to ChartEntryModelProducer and ComposedChartEntryModelProducer.

    • ComposedChartEntryModelProducer, rather than being a combination of ChartEntryModelProducers, is now independent and uses a list of data sets, with each one corresponding to a single nested Chart. This makes the API easier to use and resolves synchronization-related issues. To run data updates, use runTransaction or runTransactionSuspending. To create a ComposedChartEntryModelProducer, use ComposedChartEntryModelProducer.build, which lets you run an initial Transaction. Refer to the Transaction 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.

      val chartEntryModelProducer1 = ChartEntryModelProducer(a)
      val chartEntryModelProducer2 = ChartEntryModelProducer(b)
      val composedChartEntryModelProducer = chartEntryModelProducer1 + chartEntryModelProducer2
      chartEntryModelProducer1.setEntries(c)
      chartEntryModelProducer2.setEntries(d)
      val composedChartEntryModelProducer = ComposedChartEntryModelProducer.build {
          add(a)
          add(b)
      }
      composedChartEntryModelProducer.runTransaction {
          /* Because we’re not calling `populate`, the new list of data sets is empty, so we use `add`
          instead of `set`. */
          add(c)
          add(d)
      }
    • The ComposedChartEntryModelProducer.composedChartEntryModelOf function has been removed in favor of the plus operator function for ChartEntryModels.

    • To resolve a problem where ChartEntryModelProducer and ComposedChartEntryModelProducer accepted all updates immediately, even if an update was already running—in which case ConcurrentModificationExceptions and NullPointerExceptions occurred—we’ve reworked the update mechanism. ChartEntryModelProducer#setEntries, ComposedChartEntryModelProducer#runTransaction, and ComposedChartEntryModelProducer.Transaction#commit can reject an update if there’s already one in progress. Each of these functions returns a Boolean indicating whether the requested update has been accepted or rejected. ChartEntryModelProducer#setEntriesSuspending, ComposedChartEntryModelProducer#runTransactionSuspending, and ComposedChartEntryModelProducer.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, and ComposedChartEntryModelProducer.Transaction#commit are safe to use. Because ChartEntryModelProducer and ComposedChartEntryModelProducer now use coroutines, they no longer accept Executors—rather, you can specify a custom CoroutineDispatcher. (See #​408.)

    • ChartEntryModelProducer and ComposedChartEntryModelProducer now let you define extras (auxiliary data). These can later be read via ChartEntryModel#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 an updateExtras parameter, and in ComposedChartEntryModelProducer, the Transaction class has an updateExtras function. (See #​363.)

  • Automatic padding for extreme HorizontalAxis labels has been introduced. With HorizontalLayout.FullWidth, this option adds such an amount of horizontal padding to the chart that the labels for ChartValues#minX and ChartValues#maxX are fully visible. To turn this on, use the addExtremeLabelPadding parameter of AxisItemPlacer.Horizontal.default or the addExtremeHorizontalAxisLabelPadding XML attribute from the Axis attribute set. AxisItemPlacer.Horizontal has two new functions, getAddFirstLabelPadding and getAddLastLabelPadding. AxisRenderer has a new updateHorizontalDimensions function. In the Chart interface, updateHorizontalDimensions replaces getHorizontalDimensions. (See #​431.)

  • Chart placeholders have been added. These are displayed in charts with ChartModelProducers when no ChartEntryModel is available (no data has been added to the ChartModelProducer). The Chart composable function has a placeholder slot, and BaseChartView accepts a child view. For the latter, you can also use BaseChartView#setPlaceholder. In both cases, the default placeholder is blank. Internally, the somewhat ambiguous concept of empty ChartEntryModels has been removed—if there’s no data, there’s no ChartEntryModel. Thus, where appropriate, ChartEntryModel types are now nullable. In particular ChartModelProducer#getModel may now return null. If you’re sure that a ChartEntryModel is available (data has been added), you can use ChartModelProducer#requireModel. (See #​414.)

  • For greater flexibility, HorizontalLayout.FullWidth now lets you add both scalable (zoom-dependent) and unscalable padding. startPaddingDp and endPaddingDp have been replaced with scalableStartPaddingDp, scalableEndPaddingDp, unscalableStartPaddingDp, and unscalableEndPaddingDp. The HorizontalLayout.fullWidth function from the compose 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.) The startContentPadding and endContentPadding XML attributes have been marked as deprecated and replaced with scalableStartContentPadding, scalableEndContentPadding, unscalableStartContentPadding, and unscalableEndContentPadding attributes.

  • In MeasureContext, chartValuesManager (of type ChartValuesManager) has been replaced with chartValuesProvider (of type ChartValuesProvider). ChartValuesProvider has the same getChartValues function that ChartValuesManager does, so it’s sufficient to replace chartValuesManager with chartValuesProvider 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
  • Automatic scrolling failed to work in some instances. (See here.)
  • Automatically scaled charts’ initial zoom could be incorrectly calculated. (See here.)
  • XML attributes could fail to be applied.
  • The default x step for multi-series data sets could be incorrect. (See #​417.)
  • The plus operator function for ChartEntryModels incorrectly handled ComposedChartEntryModels.
  • Charts created via the Chart composable function didn’t respond to changes to the horizontalLayout parameter’s value and density changes that didn’t cause the function to leave and reenter the composition.
Dependency updates
  • All modules now use Kotlin 1.9.20.
  • In the compose, compose-m2, and compose-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
  • The 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 a colorCode property. (See #​183.)
Bug fixes
  • An issue where VerticalAxis instances could show one more label than maxLabelCount 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
  • An issue where MarkerComponent rounded the maximum label width down, causing issues with Spannables, has been resolved. (See #​381.)

v1.11.2

This release includes the following changes.

Bug fixes
  • The default AxisItemPlacer.Horizontal implementation, which can be created via AxisItemPlacer.Horizontal.default, now works properly when ChartValues#minX isn’t a multiple of ChartValues#xStep.

v1.11.1

Improvements
  • In the compose module, LocalChartStyle now caches the default ChartStyle, significantly improving performance in setups where ProvideChartStyle isn’t used.

v1.11.0

This release includes the following changes.

Additions
  • In TextComponent, the getWidth, getHeight, and getTextBounds functions have a new parameter, pad. When this is set to true, text is extended by such a number of blank lines that it has lineCount lines, which can be useful for certain measurement operations.
Improvements
  • The Chart composable function’s diffAnimationSpec parameter is now nullable, and passing null disables difference animations. This is recommended over using snap.
API changes
  • Because 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., for AutoScaleUp to take effect). Use ChartDrawContext#zoom instead.
Bug fixes
  • An issue where, when 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.
  • In the views module, the three FadingEdges-related XML attributes now work properly.
  • An issue where some elements requested insufficient insets, potentially leading to clipping, has been fixed.
  • ChartEntryModels created via chartEntryModelOf now have unique IDs.

Thanks to @​p-fischer for contributing.

v1.10.1

This release includes the following changes.

Bug fixes
  • Text is now correctly scaled on Android 13 and below. (See #​364.)

v1.10.0

This release includes the following changes.

API changes
  • In MeasureContext, because Android 14 introduces non-linear font scaling, fontScale has been removed. Use spToPx instead.
  • In MeasureContext, for clarity, toPixels has been renamed to dpToPx, and toFontSize has been renamed to spToPx. The functions with the old names have been marked as deprecated.
Bug fixes
  • An issue where, in unscrolalble charts, it could be impossible to trigger the display of a Marker for the last visible entry no longer occurs. (See #​320.)
  • In the compose module, gesture handling now works properly with version 2023.08.00 of the Jetpack Compose BOM. (See #​358.)
  • An issue where TextComponent could produce garbled text, particularly in MarkerComponents, 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/com.patrykandpatrick.vico-compose-m2-1.x branch from 830569c to c832a26 Compare February 25, 2024 11:14
@renovate renovate bot force-pushed the renovate/com.patrykandpatrick.vico-compose-m2-1.x branch from c832a26 to 12af240 Compare March 14, 2024 13:51
Copy link
Contributor Author

renovate bot commented Jun 22, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (1.14.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant