pace-chart-lib 1.0.80 → 1.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,15 @@ import * as d3 from "d3";
2
2
  import { TData, TSeries } from "../Core/Common.types";
3
3
  import { TDefaultChartFormatOptionsType } from "../Core/DefaultProperties.types";
4
4
  import { TChartJSON, TMargin } from "./ChartsWithAxisTypes.types";
5
+ export declare const yAxisTicksModeOptions: {
6
+ auto: string;
7
+ custom: string;
8
+ };
9
+ /**
10
+ * Generates exactly `count` evenly-spaced tick values between min and max (linear interpolation),
11
+ * used for the "Custom" Y-Axis Ticks mode so the chart always renders precisely the requested count.
12
+ */
13
+ export declare function generateEvenlySpacedTicks(min: number, max: number, count: number | string): number[];
5
14
  /**
6
15
  * Dynamically calculates the width and height of a text element rendered with given styles.
7
16
  * Optionally supports text rotation and fixed width wrapping.
@@ -66,7 +75,7 @@ export declare function calculateVerticalMargins(windowWidth: number, windowHeig
66
75
  *
67
76
  * Now computes metrics once and passes the precomputed result to both calculators.
68
77
  */
69
- 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): {
78
+ 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, dataTableLegendsList?: string[]): {
70
79
  margin: TMargin;
71
80
  yLabel: any;
72
81
  xLabel: any;
@@ -118,6 +127,7 @@ export declare const firstFunctionBeforeRender: (svgRef: React.MutableRefObject<
118
127
  };
119
128
  export declare const conditionallyModifyFormatOptions: (formatOptions: TDefaultChartFormatOptionsType, seriesData: TSeries[], dataTableData: TSeries[]) => {
120
129
  formatOptions: TDefaultChartFormatOptionsType;
130
+ dataTableLegendsList: string[];
121
131
  };
122
132
  /**
123
133
  * adds non defined properties from `defaults` to `target` to avoid further checks for undefined values
@@ -331,6 +341,16 @@ export declare function initYaxisRight(gTag: any, formatOptions: TDefaultChartFo
331
341
  * @param {number} innerWidth - Available width in pixels for the axis.
332
342
  * @returns {string[]} Filtered list of dimension labels for the X-axis.
333
343
  */
344
+ /**
345
+ * Picks exactly `count` evenly-spaced category labels out of `dimensionList` (by index),
346
+ * for the "Custom" X-Axis Ticks mode on categorical (dimension-based) X axes.
347
+ */
348
+ export declare function generateEvenlySpacedCategoryTicks(dimensionList: string[], count: number | string): string[];
349
+ /**
350
+ * Resolves which X-axis tick labels to display for categorical (dimension-based) axes:
351
+ * either the existing pixel-width auto-thinning, or exactly N evenly-picked labels in Custom mode.
352
+ */
353
+ export declare function resolveXaxisTickValues(dimensionList: string[], innerWidth: number, formatOptions: TDefaultChartFormatOptionsType): string[];
334
354
  export declare function responsiveXaxisLabel(dimensionList: string[], innerWidth: number): any[];
335
355
  /**
336
356
  * Initializes and renders the X axis with responsive labels on the chart.
@@ -47,6 +47,8 @@ export declare const defaultChartFormatOptions: {
47
47
  xAxisMinText: string;
48
48
  xAxisMaxText: string;
49
49
  xAxisIntervalText: string;
50
+ xAxisTicksMode: string;
51
+ xAxisTicksCount: string;
50
52
  hideZeroValues: boolean;
51
53
  xAxisSortBy: string;
52
54
  customSort: any[];
@@ -96,6 +98,8 @@ export declare const defaultChartFormatOptions: {
96
98
  yAxisMinText: string;
97
99
  yAxisMaxText: string;
98
100
  yAxisIntervalText: string;
101
+ yAxisTicksMode: string;
102
+ yAxisTicksCount: string;
99
103
  hideZeroValues: boolean;
100
104
  yAxisSortBy: string;
101
105
  customSort: any[];