Home forums Using CanvasJS stripLines Reply To: stripLines

#23163

DaringDan
Member

I would recommend adding a scatter dataset with the point centered at x + ((y-x)/2). To make it “invisible”, I used

type: “scatter”,
indexLabelOrientation: “horizontal”,
indexLabelFontColor: “black”,
toolTipContent: null,
highlightEnabled: false,
showInLegend: false,
fillOpacity: 0,
dataPoints: strip_line_labels

where strip_line_labels was formatted as such:
strip_line_labels.push({
x: strip_lines[i].startValue + ((strip_lines[i].endValue – strip_lines[i].startValue) / 2),
y: 9,
indexLabel: strip_lines[i].label
});

Hope this helps,
Dan