StyleDefaults

Every chart style default in one place, so the same element looks the same in every chart.

When adding a new default here, also update StyleDefaultsTest.defaults_matchCurrentValues with an assertion for the new property.

Properties

Link copied to clipboard
val axesVisible: Boolean = true
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val axisLabelMaxCount: Int? = null

Axis label cap; null lets the chart choose how many labels fit.

Link copied to clipboard

Gap between an axis and its labels.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Axis labels: selectedValueFormatter without the .0 on whole values.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val gaugeRangeMax: Double = 100.0
Link copied to clipboard

Gauges most often show a percentage, so the default range is 0..100.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val gridSteps: Int = 4
Link copied to clipboard
val gridVisible: Boolean = true
Link copied to clipboard

Histogram bins touch, so there is no spacing between them.

Link copied to clipboard

A bin count of zero renders at the baseline.

Link copied to clipboard

The legend shows by default; it still hides itself without two items and a name.

Link copied to clipboard

Radius of the marker that follows the touch along the line.

Link copied to clipboard

Grid, axis, selection, and border lines.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val pieDonutHole: Float = 0.0f
Link copied to clipboard

Pie's selected slice share: selectedValueFormatter with a % suffix, e.g. 42.5%.

Link copied to clipboard
Link copied to clipboard

Point radius.

Link copied to clipboard
val pointsVisible: Boolean = false

Points are hidden at rest; the selected point is drawn even when they are hidden.

Link copied to clipboard

Each category name sits at the end of its axis, so the web shrinks to leave room for them.

Link copied to clipboard
val radarFillAlpha: Float = 0.25f

Radar polygons overlap each other and the grid, so a solid fill would hide the series behind it.

Link copied to clipboard

How far a radar label that does not fit stays from the canvas edge. It is not reserved from the web: such a label moves inside the canvas instead, so only a too small chart pays for it.

Link copied to clipboard

Lower than unselectedAlpha, because translucent radar fills barely change at that value.

Link copied to clipboard

Gap between neighbouring rings.

Link copied to clipboard

Widest a ring is drawn; rings get thinner when this many would not fit.

Link copied to clipboard

Radius of a point on the selected position, drawn larger than pointSize so it stands out.

Link copied to clipboard

Selected values in the title and legend: two decimals with trailing zeros trimmed, keeping .0 on whole values. For example: 3.0, 41.7, and 0.0.

Link copied to clipboard
Link copied to clipboard
val seriesAlpha: Float = 1.0f
Link copied to clipboard
Link copied to clipboard

Lines that draw a series, such as a line chart line or a radar polygon outline.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Maximum numeric Y-axis labels when the label count is unset; short plots show fewer.