in src/EnhancedScatterChart.ts [2383:2431]
private renderYAxis(
yAxis: IAxisProperties,
yAxisSettings: AxisSettings,
tickLabelMargins: any,
duration: number
): void {
if (this.shouldRenderAxis(yAxis, yAxisSettings)) {
const scale: any = yAxis.scale;
const ticksCount: number = yAxis.values.length;
const format: any = (domainValue: d3.AxisDomain, value: any) => yAxis.values[value];
let newAxis = this.yAxisOrientation == yAxisPosition.left ? d3.axisLeft(scale) : d3.axisRight(scale);
yAxis.axis = newAxis;
this.yAxisGraphicsContext.call(newAxis.tickArguments([ticksCount]).tickFormat(format));
yAxis.axis
.tickSize(-this.viewportIn.width)
.tickPadding(EnhancedScatterChart.DefaultAxisYTickPadding);
if (duration) {
this.yAxisGraphicsContext
.transition()
.duration(duration)
.call(yAxis.axis);
}
else {
this.yAxisGraphicsContext.call(yAxis.axis);
}
this.applyAxisColor(this.yAxisGraphicsContext, yAxisSettings);
if (tickLabelMargins.yLeft >= this.leftRightMarginLimit) {
this.yAxisGraphicsContext
.selectAll("text")
.call(axis.LabelLayoutStrategy.clip,
// Can't use padding space to render text, so subtract that from available space for ellipses calculations
this.leftRightMarginLimit - EnhancedScatterChart.AxisSide,
svgEllipsis
);
}
// TO BE CHANGED: clip (svgEllipsis) the Y2 labels
}
else {
this.yAxisGraphicsContext
.selectAll("*")
.remove();
}
}