kandy 0.7.0 Help

Line Gradient

val monthTemp = dataFrameOf("month", "temp")( "January", -5, "February", -3, "March", 2, "April", 10, "May", 16, "June", 20, "July", 22, "August", 21, "September", 15, "October", 9, "November", 3, "December", -2 ) monthTemp.plot { line { x("month") y("temp") { scale = continuous(-10..25) // axis scale } color("temp") { scale = continuous(Color.BLUE..Color.RED) } width = 3.0 } }
val monthTemp = mapOf( "month" to listOf( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ), "temp" to listOf(-5, -3, 2, 10, 16, 20, 22, 21, 15, 9, 3, -2) ) monthTemp.plot { line { x("month") y("temp") { scale = continuous(-10..25) // axis scale } color("temp") { scale = continuous(Color.BLUE..Color.RED) } width = 3.0 } }
Line with Color Gradient
Last modified: 22 November 2023