I am using scichartJS
"scichart": "^1.4.1607"
and I need to have my multiple Y-Axis(s) start at zero. And also the labels need to be aligned. Here is a screenshot of a different chart that does it correctly.
Here is link to documentation on setting the visibleRange.
I am setting up my axis(s) in this function.
visibleRange ??
const getYAxis = (x: YAxisData) =>
new NumericAxis(wasmContext, {
axisTitle: x.axisTitle,
id: x.axisId,
axisAlignment: setLocation(x),
drawMinorTickLines: false,
drawMajorTickLines: false,
axisTitleStyle: {
fontSize: 16,
padding: Thickness.fromString('0 0 0 0'),
color: theme.palette.grey['600'],
},
});
yAxisData.forEach((x) => {
const yAxis = getYAxis(x);
yAxis.labelProvider.formatLabel = (dataValue) => {
let value = formatNumberWithRounding(dataValue);
if (value.includes(',')) value = `${value}k`;
else value = `${Number(value).toFixed(2)}`;
return value;
};
yAxis.drawMajorBands = false;
yAxis.drawMinorGridLines = false;
// yAxis.visibleRange = new NumberRange(5, 10);
sciChartSurface.yAxes.add(yAxis);
});
Which looks like this.