Line with Reversed Axis

Edit pageLast modified: 06 December 2023
val product = ('A'..'F').toColumn("product")
val rating = listOf(10, 7, 3, 5, 2, 1).toColumn("rating")
val dataset = dataFrameOf(product, rating)

plot(dataset) {
    line {
        x(rating) {
            scale = continuous(min = 0, max = 12)
        }
        y(product) {
            scale = continuous(transform = Transformation.REVERSE)
        }
        color = Color.RED
        alpha = 0.85
    }
}
Line with Reversed Axis