import * as d3 from "d3";
import { TData, TSeries } from "../Core/Common.types";
import { TDefaultChartFormatOptionsType } from "../Core/DefaultProperties.types";
import { TChartJSON, TMargin } from "./ChartsWithAxisTypes.types";
/**
 * Dynamically calculates the width and height of a text element rendered with given styles.
 * Optionally supports text rotation and fixed width wrapping.
 *
 * @param {string} content - The text content to measure.
 * @param {number} fontSize - The font size in pixels.
 * @param {string} fontFamily - The font family to apply.
 * @param {number} [rotationDegree] - Optional. Degrees to rotate the text (e.g., 45, 90).
 * @param {number} [fixedWidth] - Optional. Fixed width in pixels to constrain the text and allow wrapping.
 * @returns {[number, number] | [number, number, number, number]}
 * - If no rotation: [width, height].
 * - If rotation is applied: [originalWidth, originalHeight, rotatedWidth, rotatedHeight].
 */
export declare function calculateWidthHeightDynamically(content: string, fontSize: string, fontFamily: string, rotationDegree?: number, fixedWidth?: number): number[];
/**
 * Calculates the Y-axis label width based on the maximum legend length
 * and chart formatting options (specifically for data tables).
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart format options including data table settings.
 * @param {number} maxLegendLength - The maximum length of legend labels.
 * @returns {number} - The computed Y-axis label width in pixels.
 */
export declare function getYAxisLabel(formatOptions: TDefaultChartFormatOptionsType, maxLegendLength: number): number;
/**
 * Calculates horizontal margins (left and right) and returns other layout values needed by the caller.
 *
 * Accepts an optional precomputed metrics object to avoid re-computation.
 *
 * @returns {Object} { left: number, right: number, yLabel, yTitle, xLabel, xTitle, dimensionHeightWidthArray, chartTitleHeight, legendMargin, secondaryYLabel, secondaryAxisTitleWidth }
 */
export declare function calculateHorizontalMargins(windowWidth: number, windowHeight: number, maxNumberForPrimaryAxis: number, maxNumberForSecondaryAxis: number, yMaxLeft: number, formatOptions: TDefaultChartFormatOptionsType, legendList: string[], dimensionList: string[], yMaxRight: number, isSecondaryAxisDrawn: boolean, isNormalizedChart: boolean, xAxisObject: any, isBarChart?: boolean, precomputedMetrics?: any): {
    left: number;
    right: number;
    yLabel: any;
    yTitle: any;
    xLabel: any;
    xTitle: any;
    dimensionHeightWidthArray: any;
    chartTitleHeight: any;
    legendMargin: any;
    secondaryYLabel: any;
    secondaryAxisTitleWidth: any;
};
/**
 * Calculates vertical margins (top and bottom) and returns other layout values needed by the caller.
 *
 * Accepts an optional precomputed metrics object to avoid re-computation.
 *
 * @returns {Object} { top: number, bottom: number, chartTitleHeight, xAxisRelatedMargin, ... }
 */
export declare function calculateVerticalMargins(windowWidth: number, windowHeight: number, maxNumberForPrimaryAxis: number, maxNumberForSecondaryAxis: number, yMaxLeft: number, formatOptions: TDefaultChartFormatOptionsType, legendList: string[], dimensionList: string[], yMaxRight: number, isSecondaryAxisDrawn: boolean, isNormalizedChart: boolean, xAxisObject: any, isBarChart?: boolean, precomputedMetrics?: any, isScrollbarVisible?: boolean): {
    top: number;
    bottom: number;
    chartTitleHeight: any;
    xAxisRelatedMargin: any;
    xLabel: any;
    xTitle: any;
};
/**
 * Backwards-compatible wrapper that returns the same shape as the original marginCalculation
 * by delegating work to the split horizontal/vertical calculators.
 *
 * Now computes metrics once and passes the precomputed result to both calculators.
 */
export declare function marginCalculation(windowWidth: number, windowHeight: number, maxNumberForPrimaryAxis: number, maxNumberForSecondaryAxis: number, yMaxLeft: number, formatOptions: TDefaultChartFormatOptionsType, legendList: string[], dimensionList: string[], yMaxRight: number, isSecondaryAxisDrawn: boolean, isNormalizedChart: boolean, xAxisObject: any, isBarChart?: boolean, chartJSON?: TChartJSON): {
    margin: TMargin;
    yLabel: any;
    xLabel: any;
    yTitle: any;
    xTitle: any;
    dimensionHeightWidthArray: any;
    chartTitleHeight: any;
    legendMargin: any;
    secondaryYLabel: any;
    secondaryAxisTitleWidth: any;
    visibleBars: any;
    columnWidth: any;
    scrollbarVisible: boolean;
};
/**
 * Initializes the base SVG and optionally adds a scrollable floating SVG layer
 * depending on the chart's scroll configuration. This setup enables flexible
 * chart rendering for both static and scrollable layouts.
 * @param {any} svg - reference svg
 * @param {any} svgRef - Reference to the base SVG element (e.g., via React ref or DOM ID).
 * @param {number} width - The internal viewBox width of the SVG.
 * @param {number} height - The internal viewBox height of the SVG.
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart configuration options, including layout and colors.
 * @param {boolean} chartsWithXScrollFlag - Flag to indicate if horizontal scrolling is required.
 * @param {boolean} chartsWithYScrollFlag - Flag to indicate if vertical scrolling is required.
 * @param {string} chartId - Unique ID for the chart, used for DOM element targeting.
 * @param {number} totalWidth - Total width of the scrollable area (for floating SVG).
 * @param {number} totalHeight - Total height of the scrollable area (for floating SVG).
 *
 * @returns {void}
 * An object containing references to:
 * - `svg`: the base SVG element.
 */
export declare function initSvg(svg: any, width: number, height: number, formatOptions: TDefaultChartFormatOptionsType): void;
/**
    * all common functions to do before draw chart .
    * @param svgRef - The reference to the SVG element.
    * @param formatOptions - The format options for the chart which may contains some undefined values.
    * @returns { chartFormatOptions: TDefaultChartFormatOptionsType } - The chart format options with defaults applied.
    * @returns { svg: d3.Selection<SVGSVGElement, any, any, any> } - The D3 selection of the SVG element.
    *
    *
 */
export declare const firstFunctionBeforeRender: (svgRef: React.MutableRefObject<SVGSVGElement>, chartformatOptions: TDefaultChartFormatOptionsType) => {
    formatOptions: TDefaultChartFormatOptionsType;
    svg: d3.Selection<SVGSVGElement, any, any, any>;
    width: number;
    height: number;
};
/**
* adds non defined properties from `defaults` to `target` to avoid further checks for undefined values
* @param defaults -> Object which contains default properties
* @param target -> Object which may contain some undefined properties
* @returns object with all properties from defaults
*/
export declare function addUndefinedDefaults(defaults: any, target: any): any;
/**
 * Applies custom formatting rules to Y-axis values based on user-defined min, max, and interval settings
 * from format options. It determines the maximum number values for both primary and secondary Y-axes
 * to be used for dynamic margin calculations or scale formatting.
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options, including axis settings, number format, intervals, etc.
 * @param {number} YminLeft - The minimum value on the primary (left) Y-axis before applying custom formatting.
 * @param {number} YmaxLeft - The maximum value on the primary (left) Y-axis before applying custom formatting.
 * @param {number} YminRight - The minimum value on the secondary (right) Y-axis before applying custom formatting.
 * @param {number} YmaxRight - The maximum value on the secondary (right) Y-axis before applying custom formatting.
 *
 * @returns {{
 *   maxNumberForPrimaryAxis: number,
 *   maxNumberForSecondaryAxis: number
 * }} An object containing adjusted max values for primary and secondary Y-axes
 * based on the longer formatted values to aid in layout/margin calculation.
 */
export declare function customYscaleLabelFormatting(formatOptions: TDefaultChartFormatOptionsType, YminLeft: number, YmaxLeft: number, YminRight: number, YmaxRight: number): {
    maxNumberForPrimaryAxis: number;
    maxNumberForSecondaryAxis: number;
};
/**
 * Generates a list of evenly spaced numeric Y-axis labels based on the data range,
 * pixel space available, and a target label width. Uses a "nice number" rounding algorithm
 * to produce human-friendly intervals.
 *
 * @param {number} dataMin - The minimum data value to display on the Y-axis.
 * @param {number} dataMax - The maximum data value to display on the Y-axis.
 * @param {number} axisLengthPx - The length of the Y-axis in pixels.
 * @param {number} [labelWidthPx=80] - The approximate pixel width allocated per label (optional; defaults to 80).
 *
 * @returns {number[]} An array of numeric values to be used as Y-axis tick labels.
 */
export declare function getYaxisLabelList(dataMin: number, dataMax: number, axisLengthPx: number, labelWidthPx?: number): number[];
/**
 * Formats a numeric value based on display units (e.g., Thousands, Millions),
 * number format (e.g., percent, currency), and decimal precision.
 * Uses D3 formatting under the hood and appends appropriate postfixes.
 *
 * @param {number} measureValue - The raw numeric value to be formatted.
 * @param {string} displayUnits - The display unit for scaling the number (e.g., "None", "Thousands", "Millions", "Billions").
 * @param {string} numberFormat - The number formatting string (e.g., ",.0%", ".2$", ",", etc.).
 * @param {number} decimalPrescision - The number of decimal places to include in the formatted output.
 * @param {boolean} tornadoChart - Whether the chart is a tornadoChart chart (affects formatting).
 *
 * @returns {string} A formatted number string based on the given formatting rules.
 */
export declare function getNumberWithFormat(measureValue: number, displayUnits: string, numberFormat: string, decimalPrescision: string, tornadoChart?: boolean): string;
export declare function getAutoNumberWithFormat(value: any): string;
/**
 * Calculates the dynamic left or right margin size required to accommodate Y-axis labels,
 * based on the maximum number value, formatting options, and axis type.
 *
 * @param {number} maxNumber - The largest number on the axis, used for formatting.
 * @param {number} yMax - The actual Y-axis maximum value, used as fallback.
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options including label styles and display units.
 * @param {boolean} isSecondaryAxis - A flag indicating whether this is for the secondary Y-axis.
 *
 * @returns {number} The computed pixel width required for the Y-axis labels.
 */
export declare function responsiveYaxisMargin(maxNumber: number, yMax: number, formatOptions: TDefaultChartFormatOptionsType, isSecondaryAxis: boolean, isNormalizedChart: boolean): any;
/**
 * Generates a list of labels for the secondary Y-axis based on custom interval, min, and max values
 * or falls back to an automatic labeling algorithm if custom intervals are not provided.
 * It also limits the number of ticks to avoid rendering issues.
 *
 * @param {number} secondaryYmax - The maximum value on the secondary Y-axis.
 * @param {number} secondaryYmin - The minimum value on the secondary Y-axis.
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options including secondary Y-axis label settings.
 * @param {TChartJSON} chartJSON - Chart data including axis min and max values for fallback calculations.
 *
 * @returns {{
 *   secondaryYAxisLabelArray: number[],
 *   secondaryCustomTickValue: number | undefined
 * }} An object containing the array of label values for the secondary Y-axis and the calculated custom tick count.
 */
export declare function responsiveSecondaryYaxisLabel(secondaryYmax: number, secondaryYmin: number, formatOptions: TDefaultChartFormatOptionsType, innerHeight: number): {
    secondaryYAxisLabelArray: any[];
    secondaryCustomTickValue: number;
    autoLabelFlag: boolean;
};
/**
 * Initializes the chart area by appending a <g> element to the given SVG element,
 * translated by the specified margins and setting a default font color.
 *
 * @param {any} svg - The D3-selected SVG element to append the chart area group to.
 * @param {TMargin} margin - An object containing the margin values with properties: top, right, bottom, left.
 *
 * @returns {d3.Selection<SVGGElement, unknown, null, undefined> | undefined} The appended <g> element with applied transformations and styles,
 * or undefined if an error occurs.
 */
export declare function initChartArea(svg: any, margin: TMargin): any;
/**
 * Initializes the floating chart area depending on scroll flags and chart fit options.
 * If the chart is not fit and either horizontal or vertical scrolling is enabled,
 * it appends a new <g> element to the floating SVG with the specified margin translation.
 * Otherwise, it returns the existing group element.
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - The chart format options containing plot area settings.
 * @param {TMargin} margin - The margin object with top, right, bottom, left properties.
 * @param {any} svg - The D3-selected SVG element representing the floating SVG container.
 * @param {any} gTag - The existing <g> element to return if no new group is appended.
 * @param {boolean} chartsWithXScrollFlag - Flag indicating if horizontal scrolling is enabled.
 * @param {boolean} chartsWithYScrollFlag - Flag indicating if vertical scrolling is enabled.
 *
 * @returns {any | undefined} The appended <g> element if a new group is created, otherwise the existing group element.
 * Returns undefined if an error occurs.
 */
/**
 * Initializes the plot area by appending a clipPath and a rectangle to the given group element.
 * The clipPath defines the visible plotting region, and the rectangle represents the plot background,
 * styled according to the format options and chart type.
 *
 * @param {any} g - The D3-selected group element (<g>) to append the plot area elements to.
 * @param {TDefaultChartFormatOptionsType} formatOptions - The chart formatting options including plot area styles.
 * @param {number} dataTableHeight - The height of the data table, used to adjust plot area height.
 * @param {number} innerWidth - The width of the inner plotting area.
 * @param {number} innerHeight - The height of the inner plotting area.
 * @param {string} chartType - The type of chart to determine if plot area styles apply.
 *
 * @returns {void} Does not return a value.
 */
export declare function initPlotArea(g: any, formatOptions: TDefaultChartFormatOptionsType, dataTableHeight: number, innerWidth: number, innerHeight: number, chartType: string, chartId?: string): void;
/**
 * Checks whether two objects overlap vertically based on their y-position and height.
 *
 * @param {object} obj1 - The first object with `yPosition` and `height` properties.
 * @param {number} obj1.yPosition - The vertical start position of the first object.
 * @param {number} obj1.height - The height of the first object.
 * @param {object} obj2 - The second object with `yPosition` and `height` properties.
 * @param {number} obj2.yPosition - The vertical start position of the second object.
 * @param {number} obj2.height - The height of the second object.
 *
 * @returns {boolean} True if the objects vertically overlap; otherwise false.
 */
export declare function isVerticallyOverlapping(obj1: any, obj2: any): boolean;
/**
* Generates an array of Y-axis labels based on provided min, max values,
* chart dimensions, format options, and optional custom min/max values.
*
* @param {number} Ymax - The maximum Y value from data or chart.
* @param {number} Ymin - The minimum Y value from data or chart.
* @param {number} innerHeight - The inner height of the chart area in pixels.
* @param {TDefaultChartFormatOptionsType} formatOptions - Configuration options for formatting the axis labels.
* @param {TChartJSON} chartJSON - Chart metadata including Y axis min/max values.
* @param {number} customYaxisMinValue - Optional custom minimum Y-axis value.
* @param {number} customYaxisMaxValue - Optional custom maximum Y-axis value.
* @param {boolean} barChart - Optional flag indicating if the chart is a bar chart.
* @param {number} innerWidth - The inner width of the chart area in pixels.
*
* @returns {{ yAxisLabelArray: number[], customTickValue?: number }} Object containing the array of Y-axis labels and optionally the computed custom tick count.
*/
export declare function responsiveYaxisLabel(Ymax: number, Ymin: number, innerHeight: number, formatOptions: TDefaultChartFormatOptionsType, chartJSON: TChartJSON, customYaxisMinValue: number, customYaxisMaxValue: number, barChart?: boolean, innerWidth?: number): {
    yAxisLabelArray: number[];
    customTickValue: any;
    autoLabelFlag: boolean;
};
/**
 * Calculates a list of nicely spaced numeric labels for an axis given data range and display constraints.
 *
 * @param {number} dataMin - The minimum data value for the axis.
 * @param {number} dataMax - The maximum data value for the axis.
 * @param {number} axisLengthPx - The pixel length available for the axis.
 * @param {number} [labelWidthPx=80] - The approximate width in pixels allocated per label.
 *
 * @returns {number[]} An array of numeric labels evenly spaced and formatted for display on the axis.
 */
export declare function getLabelsFromAlgo(dataMin: number, dataMax: number, axisLengthPx: number, labelWidthPx?: number): number[];
/**
 * Initializes the Y-axis of a chart within an SVG group, including axis line, ticks, labels, and background.
 *
 * @param {any} gTag - The SVG group element where the Y-axis will be appended.
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options including axis styles and colors.
 * @param {number} dataTableHeight - Height of the data table area below the plot, used to adjust axis height.
 * @param {number} yLabel - Width of the Y-axis label area (used for positioning background rect).
 * @param {any} yAxisLeft - D3 axis generator function for the left Y-axis.
 * @param {number} innerHeight - Inner height of the chart area.
 * @param {any} gTag - Optional floating SVG group for scrolling charts.
 * @param {boolean} chartsWithXScrollFlag - Flag indicating if the chart has horizontal scroll.
 * @param {boolean} chartsWithYScrollFlag - Flag indicating if the chart has vertical scroll.
 */
export declare function initYaxis(gTag: any, formatOptions: TDefaultChartFormatOptionsType, dataTableHeight: number, yLabel: number, yAxisLeft: number, innerHeight: number): void;
/**
 * Initializes the secondary (right) Y-axis of a chart with labels, gridlines, background, and optional floating area.
 *
 * @param {any} gTag - SVG group element where the right Y-axis will be appended.
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options.
 * @param {number} dataTableHeight - Height of the data table below the plot, affects axis height.
 * @param {number} secondaryYLabel - Width of the secondary Y-axis label area.
 * @param {any} yAxisRight - D3 axis generator function for the right Y-axis.
 * @param {number} innerHeight - Inner height of the chart area.
 * @param {number} innerWidth - Inner width of the chart area (needed for floating group transform).
 * @param {any} floatingTagG - Optional floating SVG group for scrollable charts.
 */
export declare function initYaxisRight(gTag: any, formatOptions: TDefaultChartFormatOptionsType, dataTableHeight: number, secondaryYLabel: number, yAxisRight: number, innerHeight: number, innerWidth: number): void;
/**
 * Filters the dimension list to generate a responsive set of X-axis labels
 * based on available width, ensuring labels do not overlap.
 *
 * @param {string[]} dimensionList - Array of all possible dimension labels.
 * @param {number} innerWidth - Available width in pixels for the axis.
 * @returns {string[]} Filtered list of dimension labels for the X-axis.
 */
export declare function responsiveXaxisLabel(dimensionList: string[], innerWidth: number): any[];
/**
 * Initializes and renders the X axis with responsive labels on the chart.
 *
 * @param {any} gTag - The SVG group element to append the X axis to.
 * @param {TChartJSON} chartJSON - The chart configuration and data object.
 * @param {number} xLabel - The height allocated for the X axis labels.
 * @param {TDefaultChartFormatOptionsType} formatOptions - Formatting options for the chart and axis.
 * @param {IXaxisObject} xAxisObj - Object representing the X axis scale and properties.
 * @param {number} dataTableHeight - Height of the data table (if present) at the bottom of the chart.
 * @param {any} yScaleLeft - Scale function for the Y axis (left).
 * @param {any} Xaxis - D3 axis function for the X axis.
 * @param {number[]} dimensionHeightWidthArray - Array containing dimension widths and heights for label sizing.
 * @param {number} height - Total height of the chart container.
 * @param {number} barWidth - Width of each bar (if bar chart).
 * @param {string} dataType - Data type of the X axis (e.g., "DATE").
 * @param {number} innerWidth - Inner width of the chart area.
 * @param {number} innerHeight - Inner height of the chart area.
 * @param {string[]} filteredDimensionList - Filtered list of dimension labels for the X axis.
 *
 * @returns {any} The updated SVG group element (`gTag`) with the initialized X axis.
 */
export declare function initXaxis(gTag: any, chartJSON: TChartJSON, xLabel: number, formatOptions: TDefaultChartFormatOptionsType, dataTableHeight: number, yScaleLeft: any, xAxis: any, dimensionHeightWidthArray: number[], height: number, barWidth: number, isDateType: boolean, innerWidth: number, innerHeight: number, filteredDimensionList: string[], xScale: any): any;
export declare function detectBrowserName(): string;
/**
 * Formats date dimension marks based on the specified format and datasource.
 *
 * @param {string} format - The desired date format string (e.g., "Month", "YYYY-MM-DD").
 * @param {string[]} dimensionmarks - Array of date dimension marks to format.
 *
 * @returns {string[]|Array} The array of formatted date strings or original dimension marks if no formatting applied.
 */
export declare const setDateFormats: (format: string, dimensionmarks: string[]) => string[];
/**
 * Draws series labels on the chart using SVG foreignObject elements for styled HTML content.
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - Configuration options for chart formatting, including series label styles and visibility.
 * @param {any} gTag - D3 selection of the group (`<g>`) element where series labels will be appended.
 * @param {Array<{isVisible: boolean, xPosition: number, yPosition: number, width: number, height: number, seriesValue: string}>} seriesLabels - Array of label data with visibility, position, size, and text.
 *
 * @returns {void}
 */
export declare function drawSeriesLabels(formatOptions: TDefaultChartFormatOptionsType, gTag: any, seriesLabels: string[]): void;
export declare function setXaxistitle(formatOptions: TDefaultChartFormatOptionsType, barChart: boolean, svg: any, margin: TMargin, xLabel: number, height: number, xTitle: number, chartType: string, yLabel: number, innerWidth: number, innerHeight: number): void;
/**
 * Adds a Y-axis title to the SVG chart, handling visibility, positioning, rotation, and styling based on format options.
 *
 * @param {number} innerHeight - The height of the inner chart area (excluding margins).
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options, including Y-axis title settings.
 * @param {number} dataTableHeight - Height of any data table below the chart, used to adjust positioning.
 * @param {boolean} barChart - Whether the chart is a bar chart.
 * @param {any} svg - D3 selection of the SVG element where the Y-axis title will be appended.
 * @param {TMargin} margin - Margins around the chart.
 * @param {number} yTitle - Height allocated for the Y-axis title element.
 * @param {number} yLabel - Offset for the Y-axis label, used for positioning.
 * @param {number} width - Width allocated for the Y-axis title element.
 *
 * @returns {any} The SVG selection with the appended Y-axis title.
 */
export declare function yAxistitle(innerHeight: number, formatOptions: TDefaultChartFormatOptionsType, dataTableHeight: number, barChart: boolean, svg: any, margin: TMargin, yTitle: number, yLabel: number, width?: number, xTitle?: number, xLabel?: number): any;
/**
 * Adds a Y-axis title on the right side (secondary axis) of the chart,
 * handling visibility, positioning, rotation, and styling based on format options.
 *
 * @param svg - D3 selection of the SVG element to append the title.
 * @param isSecondaryAxisDrawn - Flag to determine if the secondary Y axis is drawn.
 * @param margin - Margins around the chart.
 * @param formatOptions - Chart formatting options, including secondary Y-axis title settings.
 * @param dataTableHeight - Height of any data table below the chart, used to adjust positioning.
 * @param innerHeight - Inner height of the SVG container.
 * @param innerWidth - Inner width of the SVG container.
 * @param secondaryYLabel - Offset for the secondary Y label.
 * @param secondaryAxisTitleWidth - Width allocated for the secondary Y-axis title.
 * @param innerHeight - Inner height for the chart area.
 */
export declare function yAxistitleRight(svg: any, isSecondaryAxisDrawn: boolean, margin: TMargin, formatOptions: TDefaultChartFormatOptionsType, dataTableHeight: number, innerHeight: number, innerWidth: number, secondaryYLabel: number, secondaryAxisTitleWidth: number, isBarChart?: boolean): void;
/**
 * @param svg - The SVG container to append the chart title to.
 * @param formatOptions - Configuration object containing chart title settings and styles.
 * @param width - The width allocated for the chart title.
 * @param chartTitleHeight - The height allocated for the chart title.
 *
 * @returns The modified SVG element with the appended chart title.
 */
export declare function setChartTitle(svg: any, formatOptions: TDefaultChartFormatOptionsType, width: number, chartTitleHeight: number): void;
/**
 * @param formatOptions - Configuration object containing line chart interpolation and smoothing options.
 *
 * @returns The appropriate D3 curve function based on the interpolation and smoothing settings.
 */
export declare function getCurveType(formatOptions: TDefaultChartFormatOptionsType): d3.CurveFactory;
/**
 * Filters an annotation list based on the user-configured range condition in the right pane
 * (formatOptions.annotation.annotationRangeFilter).
 *
 * @param annotationsList - The array of built annotation objects to filter.
 * @param formatOptions   - Chart format options containing the range filter config.
 * @param getMeasure      - Callback that extracts the numeric measure from one annotation item.
 * @returns The filtered array (same reference when the filter is disabled).
 */
export declare function applyAnnotationRangeFilter<T>(annotationsList: T[], formatOptions: TDefaultChartFormatOptionsType, getMeasure: (item: T) => number): T[];
export declare function commonAnnotations(chartData: TSeries[], xScale: any, yScaleLeft: any, yScaleRight: any, margin: TMargin, d3Annotation: any, labelExcludeList: string[], individualLabelColor: any[], formatOptions: TDefaultChartFormatOptionsType, chartType: string, height: number, width: number, innerWidth: number, dimensionList: string[], innerHeight: number, widgetId: string, svg: any, onDataLabelCoordinatesChange: (coordinates: any[]) => void, xScaleForLegends?: any, columnWidth?: number, isReportEditable?: boolean, isSensitivityChart?: boolean, barChart?: boolean, isAATornado?: boolean): void;
/**
 * @param {Array} chartData - The main data used to render the chart.
 * @param {Function} xscale - D3 scale function for the x-axis.
 * @param {Function} yScaleLeft - D3 scale function for the left y-axis.
 * @param {Function} yScaleRight - D3 scale function for the right y-axis (if dual axis is used).
 * @param {Object} margin - The margin object defining top, right, bottom, left margins.
 * @param {Object} d3Annotation - D3 annotation configuration or plugin.
 * @param {Array} stackColumnData - Data formatted for stacked column charts.
 * @param {Array} stackAreaData - Data formatted for stacked area charts.
 * @param {Array<string>} labelExcludeList - List of label keys to exclude from annotation.
 * @param {Object} individualLabelColor - Map of label names to their individual colors.
 * @param {number} barWidth - The width of individual bars in bar charts.
 * @param {Array<Object>} oldAnnotationList - Previously rendered annotations (if updating or redrawing).
 * @param {Object} formatOptions - Options for number/date formatting.
 * @param {number} height - Total height of the SVG/chart.
 * @param {number} width - Total width of the SVG/chart.
 * @param {number} innerWidth - Width of the chart area (excluding margins).
 * @param {Array<string>} dimensionList - List of dimensions used in the chart (e.g., ['date', 'region']).
 * @param {number} innerHeight - Height of the chart area (excluding margins).
 * @param {string} widgetId - Unique ID for the chart widget.
 * @param {Object} svg - D3-selected SVG element where the chart is rendered.
 * @param {Function} xScaleForLegends - Alternate x-scale used specifically for positioning legends.
 *
 * @return {void} - This function does not return a value; it updates the SVG with annotations.
 */
export declare function commonAnnotationsForCustomChart(chartData: TSeries[], xScale: any, yScaleLeft: any, yScaleRight: any, margin: TMargin, d3Annotation: any, stackColumnData: any[], stackAreaData: any[], labelExcludeList: string[], individualLabelColor: any[], columnWidth: number, formatOptions: TDefaultChartFormatOptionsType, height: number, width: number, innerWidth: number, dimensionList: string[], innerHeight: number, widgetId: string, svg: any, onDataLabelCoordinatesChange: (coordinates: any[]) => void, xScaleForLegends: any, isReportEditable: boolean): void;
/**
 * Pre-calculates data table layout information based on format options and series data.
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options including data table properties.
 * @param {number} yLabel - The width reserved for Y axis labels.
 * @param {number} yTitle - The width reserved for Y axis title.
 * @param {TSeries[]} seriesData - Array of data series for the chart.
 * @param {string[]} dimensionList - List of dimensions to include in the data table.
 *
 * @return {{ dataTable: any[], dataTableHeight: number }} An object containing the data table array and its total calculated height.
 */
export declare const dataTablePreCalculation: (formatOptions: TDefaultChartFormatOptionsType, yLabel: number, yTitle: number, seriesData: TSeries[], dimensionList: string[]) => {
    dataTable: any[];
    dataTableHeight: number;
};
/**
 * Adds a data table to the chart SVG element, rendering legends and values with styling and layout.
 *
 * @param {boolean} isFitChart - Flag indicating if the chart is fitted to the container.
 * @param {any} svg - The root SVG element selection.
 * @param {any} currentTag - The current SVG group (`<g>`) to append elements to.
 * @param {any[]} dataTable - Array of data table objects containing data and properties.
 * @param {number} colWidth - Width of each column in the data table.
 * @param {any} yAxis - Y-axis scale or axis object.
 * @param {any} xAxis - X-axis scale or axis object.
 * @param {any} xScaleForLegends - Additional X-axis scale or axis (possibly duplicate or different).
 * @param {Function} getBarColor - Function to get bar colors.
 * @param {boolean} isColorScaleApplied - Flag indicating if color scaling is applied.
 * @param {number} dataTableHeight - Total height reserved for the data table.
 * @param {string} chartType - Type of chart (e.g., chartTypes.LineChart, "stackColumn").
 * @param {TDefaultChartFormatOptionsType} formatOptions - Formatting options for chart and data table.
 * @param {number} yLabel - Space allocated for y-axis labels.
 * @param {number} yTitle - Space allocated for y-axis title.
 * @param {string[]} dimensionList - List of dimension names used in the chart.
 * @param {number} innerWidth - Inner width of the chart plotting area.
 * @param {number[]} calculatedRange - Range of the data calculated for the axis.
 * @param {any} formatedDimensionMap - Map for formatting dimension labels.
 * @param {string} chartId - Unique identifier for the chart.
 * @param {TMargin} margin - Margins around the chart.
 * @param {number} innerHeight - Inner height of the chart plotting area.
 *
 * @return {void} This function does not return a value.
 */
export declare function addDataTable(isFitChart: boolean, svg: any, currentTag: any, dataTable: any[], colWidth: number, yAxis: any, xAxis: any, xScaleForLegends: any, getBarColor: any, isColorScaleApplied: boolean, dataTableHeight: number, chartType: string, formatOptions: TDefaultChartFormatOptionsType, yLabel: number, yTitle: number, dimensionList: string[], innerWidth: number, calculatedRange: number[], formatedDimensionMap: any, chartId: string, margin: TMargin, innerHeight: number): void;
/**
 * Determines the CSS border style property (width, style, or color) for a data table cell.
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options containing border settings.
 * @param {number} position - The index position of the current row (legend index).
 * @param {number} currentCellIndex - The index of the current cell (column index).
 * @param {number} totalDimensionCount - Total number of dimensions (columns).
 * @param {number} legendsCount - Total number of legend entries (rows).
 * @param {string} functionType - Type of CSS property to return ("width", "style", or "color").
 * @param {string} [type] - Optional type of border context, e.g. "colHeaders" for column headers.
 *
 * @returns {string} - The CSS value for the requested border property.
 */
export declare function getBorderStyle(formatOptions: TDefaultChartFormatOptionsType, position: number, currentCellIndex: number, totalDimensionCount: number, legendsCount: number, functionType: string, type?: string): string;
/**
 * Processes dimension and series data to generate stacked chart data with totals.
 *
 * @param {string[]} dimensionList - An array of dimension strings; each represents a category or group.
 * @param {TSeries[]} seriesData - An array of series data objects, each containing properties like measures and legend.
 * @param {boolean} isNormalizedChart - Flag indicating whether to normalize the measures by their absolute values.
 *
 * @returns {Array<Record<string, any>>} An array of objects where each object represents stacked data for a dimension,
 *                                      including total sums, absolute totals, and display totals.
 */
export declare function getStackedData(dimensionList: string[], seriesData: TSeries[], isNormalizedChart: any): any[];
/**
 * Prepares data required to render series labels (like legends) on the chart,
 * calculating their position, visibility, width, and height based on chart settings.
 *
 * @param innerWidth - The inner width of the chart (used to position labels on the x-axis).
 * @param yScaleLeft - D3 scale function for the primary (left) y-axis.
 * @param formatOptions - Object containing chart formatting options such as font size, label visibility, and positioning.
 * @param filteredData - The data series array filtered for plotting, each including legend and measurement data.
 * @param yScaleRight - D3 scale function for the secondary (right) y-axis.
 * @param isSecondaryAxisDrawn - Flag indicating if a secondary y-axis is present.
 * @param isStackedChart - (Optional) Flag indicating if the chart is a stacked chart (affects y-position calculation).
 *
 * @returns An object containing:
 * - `labelArray`: Array of objects for each visible label with position and size.
 * - `heightWidth`: Tuple representing the max label width and height for layout purposes.
 */
export declare function prepareDataForSeriesLabel(innerWidth: number, yScaleLeft: any, formatOptions: TDefaultChartFormatOptionsType, filteredData: TSeries[], yScaleRight: any, isSecondaryAxisDrawn: boolean, innerHeight: number, isStackedChart?: boolean): {
    labelArray: any[];
    heightWidth: number[];
};
/**
 * @param chartData - The dataset used for generating annotations.
 * @param xScale - D3 scale function for the x-axis.
 * @param yScaleLeft - D3 scale function for the left y-axis.
 * @param yScaleRight - D3 scale function for the right y-axis.
 * @param margin - Margin object that defines spacing around the chart.
 * @param d3Annotation - D3 annotation utility used to create annotations.
 * @param labelExcludeList - List of labels to exclude from annotation rendering.
 * @param individualLabelColor - Array defining individual colors for specific labels.
 * @param oldAnnotationList - Previously rendered annotations, possibly used for comparison or re-rendering.
 * @param formatOptions - Object specifying formatting and styling options for annotations.
 * @param chartType - Type of the chart (e.g., "stackline", "line", etc.).
 * @param height - Total height of the chart including margins.
 * @param width - Total width of the chart including margins.
 * @param innerWidth - Width of the drawable chart area (excluding margins).
 * @param dimensionList - List of dimensions used in the chart, relevant for annotation placement.
 * @param innerHeight - Height of the drawable chart area (excluding margins).
 * @param widgetId - Identifier for the widget/chart, possibly used for DOM selection or state management.
 * @param svg - D3 SVG selection where annotations will be drawn.
 * @param dataTableHeight - Height of the associated data table, may affect vertical placement of annotations.barChartbarChart
 * @param barChart - Height of the associated data table, may affect vertical placement of annotations.barChartbarChart
 *
 * @return - void. This function performs side effects by rendering annotations onto the provided SVG element.
 */
export declare function stacklineAnnotations(chartData: any[], xScale: any, yScaleLeft: any, yScaleRight: any, margin: TMargin, d3Annotation: any, labelExcludeList: string[], individualLabelColor: any[], formatOptions: TDefaultChartFormatOptionsType, chartType: string, height: number, width: number, innerWidth: number, dimensionList: string[], innerHeight: number, widgetId: string, svg: any, onDataLabelCoordinatesChange: (coordinates: any[]) => void, dataTableHeight: number, isReportEditable: boolean, barChart?: boolean): void;
/**
 * Initializes the X-axis of a bar chart using provided formatting options and axis configuration.
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - Configuration options for formatting the chart (e.g. tick formatting, scale, etc.).
 * @param {any} gTag - The SVG group element where the axis should be appended or updated.
 * @param {number} xLabel - The number of ticks or label count for the X-axis.
 * @param {number} innerHeight - The height of the chart area excluding margins.
 * @param {number} innerWidth - The width of the chart area excluding margins.
 * @param {any} xAxis - The D3 axis object to be used for rendering the X-axis.
 *
 * @returns {void}
 */
export declare const initXaxisBar: (formatOptions: TDefaultChartFormatOptionsType, gTag: any, yLabel: number, innerHeight: number, innerWidth: number, xAxisBottom: any) => void;
/**
 * Initializes the Y-axis for a bar chart, including scales, dimensions, and axis adjustments
 * based on provided formatting and chart configuration options.
 *
 * @param {TDefaultChartFormatOptionsType} formatOptions - Chart format settings including tick formatting, axis labels, etc.
 * @param {*} gTag - The D3 selection or container group element used for appending SVG elements.
 * @param {number} xLabel - X-axis label height or offset.
 * @param {number} innerHeight - Height of the chart's drawable area (excluding margins).
 * @param {number} innerWidth - Width of the chart's drawable area (excluding margins).
 * @param {*} yAxis - The D3 Y-axis generator or group element for rendering the Y-axis.
 * @param {*} xAxisTop - The D3 X-axis generator or group element for the top axis.
 * @param {*} xScaleBottom - D3 scale used for positioning bars on the bottom X-axis.
 * @param {number} yMaxLeft - Maximum Y-axis value on the left side (for scale setting).
 * @param {string[]} dimensionList - List of dimensions used to determine bar grouping or stacking.
 * @param {string} chartType - Type of the chart (e.g., 'bar', 'grouped', 'stacked').
 * @param {*} xAxisObject - Object or group used to control or render the X-axis.
 * @param {number} width - Total chart width including margins.
 * @param {number[]} dimensionHeightWidthArray - Array of calculated dimensions used for layout (e.g., bar widths or heights).
 * @param {number} columnWidth - Width of each bar column.
 *
 * @returns {void} This function does not return a value; it modifies the chart by rendering or adjusting axes.
 */
export declare const initYaxisBar: (formatOptions: TDefaultChartFormatOptionsType, gTag: any, xLabel: number, innerHeight: number, innerWidth: number, yAxis: any, xAxisTop: any, xScaleBottom: any, yMaxLeft: number, dimensionList: string[], chartType: string, isDateType: any, width: number, dimensionHeightWidthArray: number[], columnWidth: number, xScale: any, xLabelSecondaryAxis?: number) => void;
export declare const dataLabelsPositionForBarChartFamily: (formatOptions: TDefaultChartFormatOptionsType, xCordinate: number, position: number, xScale: any, minValue: number, prevValue?: number, chartType?: string, isSensitivityChart?: boolean, axis?: string) => any;
export declare const initXaxisTop: (formatOptions: TDefaultChartFormatOptionsType, gTag: any, xLabelSecondary: number, xAxisTop: any, innerWidth: number) => void;
export declare const xAxisTitleTop: (formatOptions: TDefaultChartFormatOptionsType, svg: any, margin: TMargin, isSecondaryAxisDrawn: boolean, xLabelSecondary: number, xTitleSecondary: number) => void;
export declare const bandWidthFromBar: (gapFraction: any, barWidth: number) => number;
export declare const barWidthFromBand: (gapFraction: any, bandWidth: number) => number;
/**
 * Calculate how many bars can be visible without horizontal scroll and the resulting
 * per-bar column width and gap width. This is a pure function that takes required
 * inputs and returns the computed layout values instead of mutating outer-scope variables.
 *
 * @param innerWidth - drawable width of the plot area in pixels
 * @param formatOptions - chart formatting options (used for plotAreaGapWidth)
 * @param chartJSON - chart data/meta (used for number of categories)
 * @param minBarWidthPx - minimum allowed bar width in pixels (default: 25)
 *
 * @returns object containing:
 *  - visibleBars: number of bars that can be shown without scrolling
 *  - columnWidth: computed width of each bar (px)
 *  - gapWidthPx: computed gap width between bars (px)
 *  - scrollbarVisible: whether a horizontal scrollbar would be required to see all bars
 */
export declare function calculateVisibleBars(innerWidth: number, formatOptions: TDefaultChartFormatOptionsType, chartJSON: TChartJSON): {
    visibleBars: number;
    columnWidth: number;
    scrollbarVisible: boolean;
};
export declare const clamp: (v: any, a: any, b: any) => number;
export declare const horizontalScrollBar: (seriesData: any, height: any, width: any, svg: any, margin: any, innerWidth: any, scrollbarVisible: any, visibleBars: any, chartJSON: any, scrollPosition: any, isStackedChart: any, setAndUpdateChartData: any, isBarChart?: boolean) => void;
export declare function addTotalValue(totalValueMap: Map<string, number>, xScale: any, yScale: any, margin: TMargin, d3Annotation: any, oldAnnotationList: any[], formatOptions: TDefaultChartFormatOptionsType, chartType: string, height: number, width: number, svg: any, isReportEditable?: boolean, isBarChart?: boolean): void;
export declare function createTotalMeasureValueMap(data: TData, totalValueMap: Map<string, number>, filteredDimension: string[]): void;
export declare function getVerticalGridLinesTickSize(formatOptions: TDefaultChartFormatOptionsType, innerHeight: number, dataTableHeight: number, shouldAdjustForAxisPosition?: boolean): number;
export declare function getHorizontalGridLinesTickSize(formatOptions: TDefaultChartFormatOptionsType, innerWidth: number, seriesLabelWidth?: number): number;
