Area with Reversed Axis
val `Day of the Week` by columnOf("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
val `Star Rating (Reversed)` by columnOf(4, 2, 1, 2, 3, 4, 1)
plot {
layout.title = "Weekly Star Ratings"
layout.subtitle = "A reversed perspective"
area {
x(`Day of the Week`)
y(`Star Rating (Reversed)`) {
scale = continuous(0..5, transform = Transformation.REVERSE)
}
fillColor = Color.hex("#FCF84A")
alpha = 0.75
}
}
val week = listOf("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
val stars = listOf(4, 2, 1, 2, 3, 4, 1)
plot {
layout.title = "Weekly Star Ratings"
layout.subtitle = "A reversed perspective"
area {
x(week) { axis.name = "Day of the Week" }
y(stars) {
axis.name = "Star Rating (Reversed)"
scale = continuous(0..5, transform = Transformation.REVERSE)
}
fillColor = Color.hex("#FCF84A")
alpha = 0.75
}
}
Last modified: 22 November 2023