Chevron lines
We can also render Annotations as lines with chevron arrows on them.
let orientations = [soda.Orientation.Forward, soda.Orientation.Reverse]
let chart = new soda.Chart({
selector: "#soda-chart",
axis: true,
zoomable: true,
inRender: function (this, params): void {
soda.chevronLine({
chart: this,
annotations: params.annotations || [],
chevronSpacing: 10,
strokeColor: 'cadetblue',
chevronStrokeColor: 'cadetblue',
orientation: (d) => orientations[d.a.y % 2]
})
}
});
let ann: Soda.Annotation = soda.generateAnnotations({
n: 10
})
chart.render({
annotations: ann
})
See the Pen Different glyphs - chevron lines by Jack Roddy (@jackroddy) on CodePen.