@devexperts/dxcharts-lite
Version:
23 lines (22 loc) • 1.32 kB
TypeScript
/*
* Copyright (C) 2019 - 2025 Devexperts Solutions IE Limited
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { DataSeriesModel } from '../../model/data-series.model';
import { ViewportModel } from '../../model/scaling/viewport.model';
import { NumericAxisLabelsGenerator, PriceAxisType } from '../labels_generator/numeric-axis-labels.generator';
/**
* Y axis labels generator for prices. Respects price increment from instrument.
*/
export declare class NumericYAxisLabelsGenerator extends NumericAxisLabelsGenerator {
private dataSeriesProvider;
constructor(increment: number | null, dataSeriesProvider: () => DataSeriesModel | undefined, viewportModel: ViewportModel, valueFormatter: (value: number) => string, axisTypeProvider?: () => PriceAxisType, singleLabelHeightPixels?: number);
getLargestLabel(): string;
/**
* Calculates the increment to be used on the chart axis based on the length of the value and the instrument's price increments.
* @param {number} valueLength - The length of the value.
* @returns {number} - The calculated increment.
*/
protected calculateIncrement(valueLength: number): number;
}