pmariac
09/14/2023, 8:15 AMSplitProfit
are mapped, then the series will be drawn in a different order.Joffrey
09/14/2023, 8:50 AMpmariac
09/14/2023, 9:00 AMJoffrey
09/14/2023, 9:02 AMpmariac
09/14/2023, 9:02 AMIndexOfSeries
in the Datum
object, may be we can have some sort of additionnal property like :
seriesOrder: (Datum<DOMAIN>) -> Int
with a default value
{ Datum.indexOfSeries }
pmariac
09/14/2023, 9:03 AMJoffrey
09/14/2023, 9:05 AMJoffrey
09/14/2023, 9:09 AMvc.chart(profits) {
title = "Profits by categories"
val year = discrete( { domain.year } )
val series = listOf(
series("Corporate", { domain.corporate }),
series("Domestic", { domain.domestic }),
series("Financial", { domain.financial }),
series("Non-financial", { domain.nonFinancial }),
)
stackedArea(year, series) {
stacking = Stacking.Standard
}
}
pmariac
09/14/2023, 9:10 AMJoffrey
09/14/2023, 9:12 AMstack<>()
top-level function that might make the flatmapping easier, though. Maybe that's a better way to play nice with the current API surface. Is this something you intend to document/use in examples?pmariac
09/14/2023, 9:14 AMJoffrey
09/14/2023, 9:15 AM