in src/converter/dataConverter.ts [556:591]
private applyXArguments(
dataRepresentation: IDataRepresentation,
axisValue: DataRepresentationAxisValueType,
): void {
if (dataRepresentation.x.min === undefined) {
dataRepresentation.x.min = axisValue;
}
if (dataRepresentation.x.max === undefined) {
dataRepresentation.x.max = axisValue;
}
if (dataRepresentation.x.axisType === DataRepresentationTypeEnum.DateType
|| dataRepresentation.x.axisType === DataRepresentationTypeEnum.NumberType
) {
if (axisValue < dataRepresentation.x.min) {
dataRepresentation.x.min = axisValue;
}
if (axisValue > dataRepresentation.x.max) {
dataRepresentation.x.max = axisValue;
}
} else if (dataRepresentation.x.axisType === DataRepresentationTypeEnum.StringType) {
const format: string = dataRepresentation.x.format;
const textLength: number = this.getLength(axisValue, format);
if (textLength < this.getLength(dataRepresentation.x.min, format)) {
dataRepresentation.x.min = axisValue;
}
if (textLength > this.getLength(dataRepresentation.x.max, format)) {
dataRepresentation.x.max = axisValue;
}
}
}