Bar Settings
val candy by columnOf(
"Honey Stars", "Fairy Tale Caramels", " ChocoDream", "Fruity Clouds",
"Minty Spheres", "Sour Strips", "Vanilla Bars"
)
val sugar by columnOf(65, 58, 53, 35, 40, 45, 50)
plot {
layout {
title = "Sugar content"
xAxisLabel = "Candy Name"
yAxisLabel = "Sugar Content (g per 100g)"
}
bars {
x(candy)
y(sugar) { scale = continuous(0..100) }
fillColor = Color.ORANGE
alpha = 0.85
borderLine {
color = Color.GREY
width = 1.3
}
}
}
val candy = listOf(
"Honey Stars", "Fairy Tale Caramels", " ChocoDream", "Fruity Clouds",
"Minty Spheres", "Sour Strips", "Vanilla Bars"
)
val sugar = listOf(65, 58, 53, 35, 40, 45, 50)
plot {
layout {
title = "Sugar content"
xAxisLabel = "Candy Name"
yAxisLabel = "Sugar Content (g per 100g)"
}
bars {
x(candy)
y(sugar) { scale = continuous(0..100) }
fillColor = Color.ORANGE
alpha = 0.85
borderLine {
color = Color.GREY
width = 1.3
}
}
}
Last modified: 22 November 2023