Column chart#
import easychart
chart = easychart.new("column")
chart.title = "France Olympic medals"
chart.subtitle = "by year and by medal class"
chart.categories = ["Gold", "Silver", "Bronze"]
chart.yAxis.title.text = "medals"
chart.plot([7, 16, 18], name=2008)
chart.plot([11, 11, 13], name=2012)
chart
Column spacing#
You can control the space between columns (i.e. between series) and between groups of columns (i.e. values) by setting the groupPadding
and pointPadding
values respectively under chart.plotOptions.column
.
Note
The padding is expressed in units of the x-axis, not pixels
import easychart
chart = easychart.new("column")
chart.plotOptions.column = {
"groupPadding": 0.10,
"pointPadding": 0.05
}
chart.plot([1, 3, 2, 4, 3], name="Series A")
chart.plot([8, 1, 0, 3, 1], name="Series B")
chart