01 | 01a | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09

04 — Bar Chart

Planned for Phase 2. Bar charts will add vertical, horizontal, grouped, and stacked variants using a new BandScale for categorical axes.


Planned API

chart := gogal.NewBarChart(
    gogal.WithTitle("Monthly Sales"),
    gogal.WithGrid(true),
)
chart.Add("Revenue", []gogal.DataPoint{
    {Label: "Jan", Y: 120},
    {Label: "Feb", Y: 95},
    {Label: "Mar", Y: 140},
})
BandScale will map categorical labels to equal-width bands, with configurable padding between bars. Grouped and stacked modes will subdivide bands for multi-series data.

Variants planned

Variant Description
Vertical Standard column chart
Horizontal Rotated bars
Grouped Side-by-side bars per category
Stacked Cumulative bars per category

See ROADMAP for timeline.


Back to examples | API docs