Pie With Count
val continent by columnOf(
"EU", "AF", "SA", "OC", "EU", "AF", "SA", "AF", "AS", "SA",
"OC", "OC", "SA", "NA", "AF", "NA", "EU", "AF", "OC", "SA",
"AF", "SA", "OC", "EU", "AF"
)
val df = dataFrameOf(continent)
df.plot {
statCount(continent) {
pie {
slice(Stat.count)
fillColor(Stat.x named "continent")
size = 25.0
}
}
layout {
style(Style.Void)
}
}
val continent = listOf(
"EU", "AF", "SA", "OC", "EU", "AF", "SA", "AF", "AS", "SA",
"OC", "OC", "SA", "NA", "AF", "NA", "EU", "AF", "OC", "SA",
"AF", "SA", "OC", "EU", "AF"
)
plot {
statCount(continent) {
pie {
slice(Stat.count)
fillColor(Stat.x named "continent")
size = 25.0
}
}
layout {
style(Style.Void)
}
}
val df = dataFrameOf(
"continent" to columnOf(
"EU", "AF", "SA", "OC", "EU", "AF", "SA", "AF", "AS", "SA",
"OC", "OC", "SA", "NA", "AF", "NA", "EU", "AF", "OC", "SA",
"AF", "SA", "OC", "EU", "AF"
)
)
df.plot {
statCount(continent) {
pie {
slice(Stat.count)
fillColor(Stat.x named "continent")
size = 25.0
}
}
layout {
style(Style.Void)
}
}
Last modified: 15 December 2025