Repository navigation
feat(core): add subtitles to every chart - #782
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
subtitle. It shows below the title with a 4 dp gap and stays visible when a selection changes the title. A subtitle also works without a title. A null or blank subtitle takes no space.ChartContainerDefaults.style()takesstyleTitleandstyleSubtitle, andChartContainerStylehasstyleSubtitle. The subtitle defaults to 14 sp, normal weight, in the theme'sonSurfaceVariantcolor (StyleDefaults.subtitle*).ChartHeadingdraws the title and subtitle for every chart, so spacing and visibility live in one place.Category: sharein one text, like the other one-series charts. It used to be the category followed by a smaller share in a separate text.horizontalScrollrow, keep their title and subtitle visible. Line, live line, gauge, pie, and radar share a newFiniteWidthChartSizeModifierfor this. The bar family already sized its root this way. Making the two families size the same way in averticalScrollis tracked in [Issue] Size all charts the same way when the parent leaves height unbounded #780.customization.mdgains a Title and Subtitle section.pie-chart.mdand the legend internals describe the new pie title.ChartSubtitleScreenshotTest(line, selected pie, subtitle-only gauge).PieChartSelectedSlicePreviewand the README showcase references change with the pie title.Local Validation
./gradlew ktlintCheck./gradlew :charts-<module>:jvmTest./gradlew chartsTestJvm./gradlew ciCompile./gradlew chartsCheck./gradlew apiCompatibilityCheck../charts-playground/gradlew -p ../charts-playground -DchartsLocalPath="$PWD" ciCompile./gradlew :androidApp:validateDebugScreenshotTest./gradlew updateScreenshots