kandy
 
0.8.0-RC1
Because kandy 0.8.0-RC1 is still in development, this documentation may not be entirely accurate and is subject to change.

Area Settings

Edit pageLast modified: 22 November 2023
val loadServer = dataFrameOf(
    "time" to listOf("00:00", "03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "21:00"),
    "load" to listOf(10, 5, 15, 50, 75, 60, 80, 40)
)
val time = column<String>("time")
val load = column<Int>("load")

loadServer.plot {
    layout.title = "Daily Server Load Dynamics"
    area {
        x(time) { axis.name = "Time" }
        y(load) {
            axis.name = "Load (%)"
            scale = continuous(0..100)
        }
        borderLine {
            color = Color.ORANGE
            type = LineType.DASHED
            width = 2.5
        }
        fillColor = Color.RED
        alpha = 0.7
    }
}
Area Settings