Adding an axis

When instantiated with a ChartConfig that has the axis property set to true, a Chart will render a horizontal axis above the Chart. The axis will be placed in the Chart’s overflow viewport. This allows it to be rendered in the pad above the Chart’s first row. If you want to place a non-default axis in your chart, check out the tutorial on axis glyphs.

let chart = new soda.Chart({
  selector: "#soda-chart",
  axis: true
});

let ann: Soda.Annotation = soda.generateAnnotations({
  n: 10
})

chart.render({
  annotations: ann
})

See the Pen Adding an axis to a Chart by Jack Roddy (@jackroddy) on CodePen.