Candlestick Chart
A candlestick chart: at each place what something opened at and closed at, and the highest and the lowest it reached between the two, as a price does in a day of trading.
import com.pantrixui.components.chart.candlestick.PantrixCandlestickChart
- Candle. Each place has a body from its opening to its close, and a thin wick through the body's middle from the lowest to the highest. A candle that closes over its opening is drawn in the chart's
risingcolour and one that closes under it in itsfallingcolour: the theme'ssuccessanddanger, unlesscolorssays otherwise. A candle that closes where it opened is a line across, in the series' own colour (color). - OHLC bar.
kind = CandleKind.Ohlcdraws a line in place of the body: from the lowest to the highest, with a tick at the opening on the side lines come from and one at the close on the side they go to. It stays apart where candles would crowd. - Hollow candle.
hollow = truedraws the body of a candle that closed higher as its outline alone, with the wick outside the body: the way it went is read without its colour too. A candle that closed lower stays filled. - A candle's own colour.
colorOfgives a row's candle a colour of its own (a day of news); the candle of a row that givesColor.Unspecifiedstays in the colour of its way. - Legend. In the legend a series of candles is a sample of two halves: the rising colour and the falling one.
- Volume. A
BarSerieswithbehind = truestands behind the candle at each place, as wide as it: the day's trading volume. It is read by the second axis, and that axis' top keeps the bars low in the chart. - Four values. A row has all four values, or it has no candle. The wick is no shorter than the body: a highest given under the close is taken for the close.
- Nought. The axis of values does not take nought in by itself: what is read is how the value moves, not how large it is.
- With other series. Candles stand together with lines in a
PantrixChart: a moving average, a target. - Time axis. When the rows'
xgives a moment (kotlin.time.Instant), the candles stand where their moments are: a day with no row is a gap, and the axis is marked at round dates, not at the days. - Automation. The chart is tagged as the
PantrixChartit is:Chart_<tagKey>. Its one series has the keycandles.
Examples
Three weeks of a price
Three weeks of a share, trading day by trading day. The days that closed higher are in one colour and those that closed lower in the other; the fourteenth day closed where it opened, and stands as a line.
Move the pointer over a candle, or touch the candle: the tooltip writes the four values by their names.
PantrixCandlestickChart(
data = THREE_WEEKS,
x = { it.day },
open = { it.open },
high = { it.high },
low = { it.low },
close = { it.close },
name = "Price (TL)",
description = "A share's daily price over three weeks",
tagKey = "plain"
)
private data class PriceDay(
val day: String,
val open: Double,
val high: Double,
val low: Double,
val close: Double
)
private val THREE_WEEKS = listOf(
PriceDay("1", open = 118.0, high = 121.5, low = 116.8, close = 120.4),
PriceDay("2", open = 120.4, high = 123.0, low = 119.6, close = 122.1),
PriceDay("3", open = 122.1, high = 122.9, low = 118.2, close = 119.0),
PriceDay("4", open = 119.0, high = 120.2, low = 116.9, close = 117.3),
PriceDay("5", open = 117.3, high = 119.8, low = 117.0, close = 119.5),
PriceDay("8", open = 119.5, high = 124.6, low = 119.1, close = 124.0),
PriceDay("9", open = 124.0, high = 126.3, low = 122.8, close = 123.2),
PriceDay("10", open = 123.2, high = 125.1, low = 121.7, close = 124.8),
PriceDay("11", open = 124.8, high = 128.9, low = 124.2, close = 128.1),
PriceDay("12", open = 128.1, high = 129.4, low = 125.6, close = 126.0),
PriceDay("15", open = 126.0, high = 127.2, low = 123.4, close = 123.9),
PriceDay("16", open = 123.9, high = 124.5, low = 120.8, close = 121.6),
PriceDay("17", open = 121.6, high = 123.7, low = 117.1, close = 123.7),
PriceDay("18", open = 123.7, high = 125.0, low = 122.5, close = 123.7),
PriceDay("19", open = 123.7, high = 127.8, low = 123.1, close = 127.0)
)
OHLC bars
The same days as OHLC bars: a line from the lowest to the highest, with the opening's tick at its left and the close's at its right. Turn the switch: the bars become candles.
var bars by remember { mutableStateOf(true) }
PantrixSwitchButton(
checked = bars,
onCheckedChange = { bars = it },
label = "OHLC bars",
tagKey = "candlestick_ohlc"
)
PantrixCandlestickChart(
data = THREE_WEEKS,
x = { it.day },
open = { it.open },
high = { it.high },
low = { it.low },
close = { it.close },
name = "Price (TL)",
kind = if (bars) CandleKind.Ohlc else CandleKind.Candle,
description = "A share's daily price over three weeks, as OHLC bars",
tagKey = "ohlc"
)
private data class PriceDay(
val day: String,
val open: Double,
val high: Double,
val low: Double,
val close: Double
)
private val THREE_WEEKS = listOf(
PriceDay("1", open = 118.0, high = 121.5, low = 116.8, close = 120.4),
PriceDay("2", open = 120.4, high = 123.0, low = 119.6, close = 122.1),
PriceDay("3", open = 122.1, high = 122.9, low = 118.2, close = 119.0),
PriceDay("4", open = 119.0, high = 120.2, low = 116.9, close = 117.3),
PriceDay("5", open = 117.3, high = 119.8, low = 117.0, close = 119.5),
PriceDay("8", open = 119.5, high = 124.6, low = 119.1, close = 124.0),
PriceDay("9", open = 124.0, high = 126.3, low = 122.8, close = 123.2),
PriceDay("10", open = 123.2, high = 125.1, low = 121.7, close = 124.8),
PriceDay("11", open = 124.8, high = 128.9, low = 124.2, close = 128.1),
PriceDay("12", open = 128.1, high = 129.4, low = 125.6, close = 126.0),
PriceDay("15", open = 126.0, high = 127.2, low = 123.4, close = 123.9),
PriceDay("16", open = 123.9, high = 124.5, low = 120.8, close = 121.6),
PriceDay("17", open = 121.6, high = 123.7, low = 117.1, close = 123.7),
PriceDay("18", open = 123.7, high = 125.0, low = 122.5, close = 123.7),
PriceDay("19", open = 123.7, high = 127.8, low = 123.1, close = 127.0)
)
Your own colours and a level
The colours of the two ways come from the chart's colours (the rising and falling fields of ChartColors), and the colour of a candle that closes where it opened from the series itself (color). And the level the price came back to three times: a reference line.
Colour should not carry meaning alone: which way a candle went is read from the opening and the close in the tooltip too.
val theme = PantrixTheme.colors
PantrixCandlestickChart(
data = THREE_WEEKS,
x = { it.day },
open = { it.open },
high = { it.high },
low = { it.low },
close = { it.close },
name = "Price (TL)",
color = theme.neutral.color,
marks = listOf(ChartReferenceLine(y = 117, label = "Support")),
colors = ChartColors(rising = theme.info.color, falling = theme.warning.color),
description = "A share's daily price over three weeks, in its own colours and with a support level",
tagKey = "own_colors"
)
private data class PriceDay(
val day: String,
val open: Double,
val high: Double,
val low: Double,
val close: Double
)
private val THREE_WEEKS = listOf(
PriceDay("1", open = 118.0, high = 121.5, low = 116.8, close = 120.4),
PriceDay("2", open = 120.4, high = 123.0, low = 119.6, close = 122.1),
PriceDay("3", open = 122.1, high = 122.9, low = 118.2, close = 119.0),
PriceDay("4", open = 119.0, high = 120.2, low = 116.9, close = 117.3),
PriceDay("5", open = 117.3, high = 119.8, low = 117.0, close = 119.5),
PriceDay("8", open = 119.5, high = 124.6, low = 119.1, close = 124.0),
PriceDay("9", open = 124.0, high = 126.3, low = 122.8, close = 123.2),
PriceDay("10", open = 123.2, high = 125.1, low = 121.7, close = 124.8),
PriceDay("11", open = 124.8, high = 128.9, low = 124.2, close = 128.1),
PriceDay("12", open = 128.1, high = 129.4, low = 125.6, close = 126.0),
PriceDay("15", open = 126.0, high = 127.2, low = 123.4, close = 123.9),
PriceDay("16", open = 123.9, high = 124.5, low = 120.8, close = 121.6),
PriceDay("17", open = 121.6, high = 123.7, low = 117.1, close = 123.7),
PriceDay("18", open = 123.7, high = 125.0, low = 122.5, close = 123.7),
PriceDay("19", open = 123.7, high = 127.8, low = 123.1, close = 127.0)
)
Candles and an average line
Candles are one of the series of a PantrixChart, and stand together with lines: here the three-day average of the closes, as a dashed line. Since there are two series the legend comes by itself; the tooltip writes the two together.
val averages = remember { averagesOf(THREE_WEEKS, days = 3) }
PantrixChart(
series = listOf(
CandlestickSeries(
key = "price",
name = "Price (TL)",
data = THREE_WEEKS,
x = { it.day },
open = { it.open },
high = { it.high },
low = { it.low },
close = { it.close }
),
LineSeries(
key = "average",
name = "Three-day average",
data = averages,
x = { it.first },
y = { it.second },
dash = ChartDash.Dashed
)
),
description = "A share's daily price and the three-day average of its closes",
tagKey = "average"
)
private data class PriceDay(
val day: String,
val open: Double,
val high: Double,
val low: Double,
val close: Double
)
private val THREE_WEEKS = listOf(
PriceDay("1", open = 118.0, high = 121.5, low = 116.8, close = 120.4),
PriceDay("2", open = 120.4, high = 123.0, low = 119.6, close = 122.1),
PriceDay("3", open = 122.1, high = 122.9, low = 118.2, close = 119.0),
PriceDay("4", open = 119.0, high = 120.2, low = 116.9, close = 117.3),
PriceDay("5", open = 117.3, high = 119.8, low = 117.0, close = 119.5),
PriceDay("8", open = 119.5, high = 124.6, low = 119.1, close = 124.0),
PriceDay("9", open = 124.0, high = 126.3, low = 122.8, close = 123.2),
PriceDay("10", open = 123.2, high = 125.1, low = 121.7, close = 124.8),
PriceDay("11", open = 124.8, high = 128.9, low = 124.2, close = 128.1),
PriceDay("12", open = 128.1, high = 129.4, low = 125.6, close = 126.0),
PriceDay("15", open = 126.0, high = 127.2, low = 123.4, close = 123.9),
PriceDay("16", open = 123.9, high = 124.5, low = 120.8, close = 121.6),
PriceDay("17", open = 121.6, high = 123.7, low = 117.1, close = 123.7),
PriceDay("18", open = 123.7, high = 125.0, low = 122.5, close = 123.7),
PriceDay("19", open = 123.7, high = 127.8, low = 123.1, close = 127.0)
)
private fun averagesOf(
prices: List<PriceDay>,
days: Int
): List<Pair<String, Double?>> = prices.mapIndexed { index, price ->
val last = prices.subList((index - days + 1).coerceAtLeast(0), index + 1)
price.day to last.takeIf { it.size == days }?.map { it.close }?.average()
}
Hollow candles and volume
The day's trading volume behind the candles: a BarSeries with behind = true stands behind the candle at each place, as wide as it, though it is given after the candles. It is read by the second axis (axis = ChartYAxis.Second); that axis goes up to three times the largest volume, and the bars stay in the lower third of the chart.
The candles are hollow (hollow): the body of a day that closed higher is its outline alone. The candle of the 11th, a day of news, is in a colour of its own (colorOf). In the legend the series of candles is a sample of two halves: the rising colour and the falling one.
var hollow by remember { mutableStateOf(true) }
val theme = PantrixTheme.colors
PantrixSwitchButton(
checked = hollow,
onCheckedChange = { hollow = it },
label = "Hollow candles",
tagKey = "candles_hollow"
)
PantrixChart(
series = listOf(
CandlestickSeries(
key = "price",
name = "Price (TL)",
data = THREE_WEEKS,
x = { it.day },
open = { it.open },
high = { it.high },
low = { it.low },
close = { it.close },
hollow = hollow,
colorOf = { if (it.day == NEWS_DAY) theme.warning.color else Color.Unspecified }
),
BarSeries(
key = "volume",
name = "Volume (thousand lots)",
data = THREE_WEEKS.zip(VOLUMES),
x = { it.first.day },
y = { it.second },
color = theme.neutral.color.copy(alpha = VOLUME_TINT),
behind = true,
axis = ChartYAxis.Second
)
),
secondYAxis = ChartAxis(labels = false, max = VOLUMES.max() * 3.0),
description = "A share's daily price and trading volume over three weeks",
tagKey = "volume"
)
private data class PriceDay(
val day: String,
val open: Double,
val high: Double,
val low: Double,
val close: Double
)
private val THREE_WEEKS = listOf(
PriceDay("1", open = 118.0, high = 121.5, low = 116.8, close = 120.4),
PriceDay("2", open = 120.4, high = 123.0, low = 119.6, close = 122.1),
PriceDay("3", open = 122.1, high = 122.9, low = 118.2, close = 119.0),
PriceDay("4", open = 119.0, high = 120.2, low = 116.9, close = 117.3),
PriceDay("5", open = 117.3, high = 119.8, low = 117.0, close = 119.5),
PriceDay("8", open = 119.5, high = 124.6, low = 119.1, close = 124.0),
PriceDay("9", open = 124.0, high = 126.3, low = 122.8, close = 123.2),
PriceDay("10", open = 123.2, high = 125.1, low = 121.7, close = 124.8),
PriceDay("11", open = 124.8, high = 128.9, low = 124.2, close = 128.1),
PriceDay("12", open = 128.1, high = 129.4, low = 125.6, close = 126.0),
PriceDay("15", open = 126.0, high = 127.2, low = 123.4, close = 123.9),
PriceDay("16", open = 123.9, high = 124.5, low = 120.8, close = 121.6),
PriceDay("17", open = 121.6, high = 123.7, low = 117.1, close = 123.7),
PriceDay("18", open = 123.7, high = 125.0, low = 122.5, close = 123.7),
PriceDay("19", open = 123.7, high = 127.8, low = 123.1, close = 127.0)
)
private val VOLUMES = listOf(820, 940, 1210, 1080, 760, 1430, 990, 870, 2650, 1320, 1040, 1180, 1510, 690, 1120)
private const val NEWS_DAY = "11"
private const val VOLUME_TINT = 0.32f
Days on the calendar
The same three weeks, this time with each day as a moment: the first three weeks of June 2026. The candles stand where they are on the calendar, the two weekends show as gaps, and the axis is marked at the start of each week.
Turn the switch on (ChartTime(gapless = true)): the weekends, when the market is closed, close up, the candles stand side by side at even steps, and the axis is still marked at days or weeks, at the first candle of each.
The days are days of UTC, so the axis is read by UTC too (the offset of ChartTime): whatever the device's clock, a candle stands on its own day.
var gapless by remember { mutableStateOf(false) }
PantrixSwitchButton(
checked = gapless,
onCheckedChange = { gapless = it },
label = "Without weekends",
tagKey = "candles_gapless"
)
PantrixCandlestickChart(
data = THREE_WEEKS,
x = { dayOf(it) },
open = { it.open },
high = { it.high },
low = { it.low },
close = { it.close },
name = "Price (TL)",
xAxis = ChartAxis(time = ChartTime(offset = { Duration.ZERO }, gapless = gapless)),
description = "A share's daily price in the first three weeks of June 2026, on the days of the calendar",
tagKey = "in_time"
)
private data class PriceDay(
val day: String,
val open: Double,
val high: Double,
val low: Double,
val close: Double
)
private val THREE_WEEKS = listOf(
PriceDay("1", open = 118.0, high = 121.5, low = 116.8, close = 120.4),
PriceDay("2", open = 120.4, high = 123.0, low = 119.6, close = 122.1),
PriceDay("3", open = 122.1, high = 122.9, low = 118.2, close = 119.0),
PriceDay("4", open = 119.0, high = 120.2, low = 116.9, close = 117.3),
PriceDay("5", open = 117.3, high = 119.8, low = 117.0, close = 119.5),
PriceDay("8", open = 119.5, high = 124.6, low = 119.1, close = 124.0),
PriceDay("9", open = 124.0, high = 126.3, low = 122.8, close = 123.2),
PriceDay("10", open = 123.2, high = 125.1, low = 121.7, close = 124.8),
PriceDay("11", open = 124.8, high = 128.9, low = 124.2, close = 128.1),
PriceDay("12", open = 128.1, high = 129.4, low = 125.6, close = 126.0),
PriceDay("15", open = 126.0, high = 127.2, low = 123.4, close = 123.9),
PriceDay("16", open = 123.9, high = 124.5, low = 120.8, close = 121.6),
PriceDay("17", open = 121.6, high = 123.7, low = 117.1, close = 123.7),
PriceDay("18", open = 123.7, high = 125.0, low = 122.5, close = 123.7),
PriceDay("19", open = 123.7, high = 127.8, low = 123.1, close = 127.0)
)
private fun dayOf(price: PriceDay): Instant = Instant.parse("2026-06-${price.day.padStart(2, '0')}T00:00:00Z")
Pressing a candle
A press is handed the candle: the point's value is the close, its from the opening, and its high and low the two ends of the wick. Press a candle: the line below writes how much the day moved and how it closed.
var pressed by remember { mutableStateOf<String?>(null) }
val strings = PantrixTheme.strings
PantrixCandlestickChart(
data = THREE_WEEKS,
x = { it.day },
open = { it.open },
high = { it.high },
low = { it.low },
close = { it.close },
name = "Price (TL)",
onSelect = { point ->
val open = point.from ?: point.value
val swing = (point.high ?: point.value) - (point.low ?: point.value)
val change = strings.decimal(point.value - open)
pressed = "Day ${point.label}: moved ${strings.decimal(swing)} TL, $change TL at the close"
},
description = "A share's daily price over three weeks",
tagKey = "press"
)
PantrixText(text = pressed ?: "Press a candle")
private data class PriceDay(
val day: String,
val open: Double,
val high: Double,
val low: Double,
val close: Double
)
private val THREE_WEEKS = listOf(
PriceDay("1", open = 118.0, high = 121.5, low = 116.8, close = 120.4),
PriceDay("2", open = 120.4, high = 123.0, low = 119.6, close = 122.1),
PriceDay("3", open = 122.1, high = 122.9, low = 118.2, close = 119.0),
PriceDay("4", open = 119.0, high = 120.2, low = 116.9, close = 117.3),
PriceDay("5", open = 117.3, high = 119.8, low = 117.0, close = 119.5),
PriceDay("8", open = 119.5, high = 124.6, low = 119.1, close = 124.0),
PriceDay("9", open = 124.0, high = 126.3, low = 122.8, close = 123.2),
PriceDay("10", open = 123.2, high = 125.1, low = 121.7, close = 124.8),
PriceDay("11", open = 124.8, high = 128.9, low = 124.2, close = 128.1),
PriceDay("12", open = 128.1, high = 129.4, low = 125.6, close = 126.0),
PriceDay("15", open = 126.0, high = 127.2, low = 123.4, close = 123.9),
PriceDay("16", open = 123.9, high = 124.5, low = 120.8, close = 121.6),
PriceDay("17", open = 121.6, high = 123.7, low = 117.1, close = 123.7),
PriceDay("18", open = 123.7, high = 125.0, low = 122.5, close = 123.7),
PriceDay("19", open = 123.7, high = 127.8, low = 123.1, close = 127.0)
)
API
data
A candlestick chart: at each place what something opened at and closed at, and the highest and the lowest it reached between the two, as a price does in a day of trading.
| Parameter | Type | Default | What it is |
|---|---|---|---|
data | List<T> | the rows. | |
x | (T) -> Any | where a row stands along the chart: a moment, a day's name, anything that is equal to itself. | |
open | (T) -> Number? | what a row opened at, or null where it has no value. | |
high | (T) -> Number? | the highest it reached. | |
low | (T) -> Number? | the lowest it reached. | |
close | (T) -> Number? | what it closed at. | |
name | String | what the values are of: what a screen reader calls the chart where it has no description. | |
modifier | Modifier | Modifier | the chart's modifier. A height here is the chart's. |
kind | CandleKind | CandleKind.Candle | whether a place is drawn as a candle or as an OHLC bar: a line with a tick at each side. |
hollow | Boolean | false | whether the body of a candle that closes over its opening is its outline alone, with the wick outside it. An OHLC bar is drawn the same either way. |
color | Color | Color.Unspecified | the colour of a candle that closes where it opened. Left out, it is the first of the chart's colours. |
colorOf | ((T) -> Color)? | null | the colour of a row's candle, or Color.Unspecified for the colour of the way it went. null gives every candle the colour of its way. |
xAxis | ChartAxis? | ChartAxis() | the axis of the places, under the chart. null draws nothing of it. |
yAxis | ChartAxis? | ChartAxis() | the axis of the values, beside the chart. null draws nothing of it. |
marks | List<ChartMark> | emptyList() | the lines and the bands drawn in the plot besides the candles: a level that held, a target. |
tooltip | ChartTooltip? | ChartTooltip() | what is shown for the place that is pointed at. null shows none. |
zoom | ChartZoom? | null | what lets the reader look closer at a part of the places and move along the rest. null, which it is unless the chart is given one, shows all the places and no more. |
export | ChartExport? | null | what lets the reader take the chart out of the app as a file: a picture, or a drawing that is sharp at any size. null, which it is unless the chart is given one, and the chart has no such button. |
empty | (@Composable () -> Unit)? | null | what the chart shows in its plot while it has no value to draw, in the place of the theme's words for it ("No data"), which a screen reader is then not told either. null writes the words. A file the chart is exported as says them. |
state | ChartState | rememberChartState() | what the reader points at: the chart's own where none is given. |
description | String? | null | what the chart shows, in a few words, for a screen reader. |
onSelect | ((ChartPoint) -> Unit)? | null | called with the candle that is pressed. |
style | ChartStyle? | null | this chart's own geometry: a candle is as wide as a bar, and its wick as thin as the grid's lines. |
colors | ChartColors? | null | this chart's own colours, where they are not the theme's: rising and falling among them. |
tagKey | String? | null | the chart's automation key. The chart is tagged as the PantrixChart it is, Chart_<tagKey>, and its parts and events are that chart's; its one series has the key candles. |
ChartStyle
A chart's geometry: how tall it is where nothing says, how thick its lines and how large its marks are, and the room between its parts; and whether its fills have textures besides their colours.
| Parameter | Type | Default | What it is |
|---|---|---|---|
height | Dp | Dp.Unspecified | How tall a chart's plot is, with its axes, where the chart's modifier gives it no height. A legend above or under the plot adds its own. |
lineWidth | Dp | Dp.Unspecified | The width of a series' line. |
markerSize | Dp | Dp.Unspecified | The width and height of the mark on a point. |
selectedMarkerSize | Dp | Dp.Unspecified | The same of the mark on the point that is pointed at. |
gridWidth | Dp | Dp.Unspecified | The width of the grid's lines, of the lines along the axes and of the line that marks the place pointed at. Zero draws none. |
labelGap | Dp | Dp.Unspecified | Between the plot and what is written beside it and under it, and between that and an axis' title. |
tickSpacing | Dp | Dp.Unspecified | The least room between two values marked along the axis of values: what decides how many are marked where the axis does not say. |
legendGap | Dp | Dp.Unspecified | Between the legend and the chart it stands beside. |
legendItemGap | Dp | Dp.Unspecified | Between one entry of the legend and the next. |
swatchSize | Dp | Dp.Unspecified | How wide the sample of a series is in the legend and in the tooltip: a short run of its line, or a patch of its fill. |
swatchGap | Dp | Dp.Unspecified | Between that sample and the name after it. |
tooltipShape | ShapeSpec | ShapeSpec.Unspecified | The tooltip's corners: a step of the brand's shape scale, or a fixed shape. |
tooltipHorizontalPadding | Dp | Dp.Unspecified | Between the tooltip's sides and what it holds. |
tooltipVerticalPadding | Dp | Dp.Unspecified | Between its top and bottom and what it holds, and between its heading and rows. |
tooltipGap | Dp | Dp.Unspecified | Between the place pointed at and the tooltip beside it. |
tooltipElevation | Dp | Dp.Unspecified | The tooltip's shadow. |
barGap | Dp | Dp.Unspecified | Between two bars that stand side by side at a place. Bars too thin for it stand closer. |
barMaxWidth | Dp | Dp.Unspecified | The widest a bar is, however much room its place has: a chart of three places is not three slabs. |
barRadius | Dp | Dp.Unspecified | How round the corners of a bar's end are, the end away from nought. |
sliceGap | Dp | Dp.Unspecified | Between two slices of a pie that lie side by side, the same from the pie's middle to its rim. |
selectedSliceOffset | Dp | Dp.Unspecified | How far the slice of a pie that is pointed at stands out past the pie's rim. The pie keeps this much room about itself, so that the slice has where to stand. |
gaugeWidth | Dp | Dp.Unspecified | How thick the arc of a gauge is. An arc is no thicker than half its radius. |
meterHeight | Dp | Dp.Unspecified | How tall the bar of a meter group is. |
trackerHeight | Dp | Dp.Unspecified | How tall the blocks of a status tracker are. |
bubbleMinSize | Dp | Dp.Unspecified | How far across the smallest bubble of a scatter chart is: a point whose size is nothing, or too little to be seen as an area, is still a point. |
bubbleMaxSize | Dp | Dp.Unspecified | How far across its largest bubble is: the one whose size is the most of the chart's. |
navigatorHeight | Dp | Dp.Unspecified | How tall the strip under a chart's plot is, on which the part of the chart that is in view is marked and moved, in a chart whose zoom has one: how wide, beside a plot whose places go down its side. |
barBandShare | Float | Float.NaN | How much of a place's band its bars take, more than nought and one at the most: the rest is the room between one place's bars and the next's. Bars are no wider than barMaxWidth all the same. |
markLineWidth | Dp | Dp.Unspecified | The width of a mark's line: a target, a limit, a day. Zero draws none, and the mark's words are written all the same. |
markBandAlpha | Float | Float.NaN | How much of its colour a mark's band is drawn in, from nought to one: a band lies behind the series, and is a tint. |
patterns | Boolean? | null | Whether the fills of a chart's series, slices and tiles are drawn with textures besides their colours, and its lines broken in turn (ChartPattern): what tells them apart for a reader who cannot tell the colours apart. Left out, as the system is set: on where it is set to tell things apart without colour, iOS's "Differentiate Without Color" and Android's colour correction, and off otherwise. |
nodeWidth | Dp | Dp.Unspecified | How wide a node of a sankey is. |
nodeGap | Dp | Dp.Unspecified | Between two nodes of a column of a sankey. |
ChartColors
What a chart is painted with, for a chart that does not take the theme's colours: a colour that is set is used, and one that is left out stays the theme's.
| Parameter | Type | Default | What it is |
|---|---|---|---|
series | List<Color> | emptyList() | The colours the series are drawn in, in the order they are handed out, for the series that name none of their own. Empty, they are the theme's chart colours. |
grid | Color | Color.Unspecified | The lines drawn across the chart at the marks of an axis. The theme's divider. |
axis | Color | Color.Unspecified | The line along an axis. The theme's border. |
label | Color | Color.Unspecified | What is written beside the axes: the values, the places and the axes' titles, and the names in the legend. The theme's textSecondary. |
crosshair | Color | Color.Unspecified | The line that marks the place pointed at. The theme's borderHover: stronger than the grid it crosses, and quieter than the series it stands behind. |
tooltipContainer | Color | Color.Unspecified | The tooltip's fill. The theme's surface. |
tooltipBorder | Color | Color.Unspecified | The tooltip's edge. The theme's border. |
tooltipText | Color | Color.Unspecified | The tooltip's heading and its values. The theme's textPrimary. |
tooltipLabel | Color | Color.Unspecified | The names of the series in the tooltip. The theme's textSecondary. |
rising | Color | Color.Unspecified | What a value that goes up is drawn in: a step of a waterfall that adds. The theme's success. |
falling | Color | Color.Unspecified | What a value that goes down is drawn in: a step of a waterfall that takes away. The theme's danger. |
Accessibility
- Tooltip and screen reader. A candle is written as its four values, each by its name in the theme's language: open, high, low, close. A press is handed the close in the point's
value, the opening in itsfrom, and the two ends of the wick in itshighandlow.