pace-chart-lib 1.0.62 → 1.0.64

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.
@@ -9,6 +9,7 @@ interface ICJSAreaChartProps {
9
9
  isChartStacked?: boolean;
10
10
  /** Active theme colour bank from the host application. Falls back to default palette. */
11
11
  colorBank?: string[];
12
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
12
13
  }
13
14
  /**
14
15
  * Chart.js area chart.
@@ -7,6 +7,7 @@ interface ICJSBubbleChartProps {
7
7
  clientHeight: number;
8
8
  /** Active theme colour bank from the host application. Falls back to default palette. */
9
9
  colorBank?: string[];
10
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
10
11
  }
11
12
  /**
12
13
  * Chart.js bubble chart.
@@ -9,6 +9,7 @@ interface ICJSColumnChartProps {
9
9
  isChartStacked?: boolean;
10
10
  /** Active theme colour bank from the host application. Falls back to default palette. */
11
11
  colorBank?: string[];
12
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
12
13
  }
13
14
  /**
14
15
  * Chart.js vertical bar chart.
@@ -7,6 +7,7 @@ interface ICJSDonutChartProps {
7
7
  clientHeight: number;
8
8
  /** Active theme colour bank from the host application. Falls back to default palette. */
9
9
  colorBank?: string[];
10
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
10
11
  }
11
12
  /**
12
13
  * Chart.js doughnut (donut) chart.
@@ -8,6 +8,7 @@ interface ICJSHorizontalBarChartProps {
8
8
  isChartStacked?: boolean;
9
9
  /** Active theme colour bank from the host application. Falls back to default palette. */
10
10
  colorBank?: string[];
11
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
11
12
  }
12
13
  /**
13
14
  * Chart.js horizontal bar chart.
@@ -9,6 +9,7 @@ interface ICJSLineChartProps {
9
9
  isChartStacked?: boolean;
10
10
  /** Active theme colour bank from the host application. Falls back to default palette. */
11
11
  colorBank?: string[];
12
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
12
13
  }
13
14
  /**
14
15
  * Chart.js line chart.
@@ -6,6 +6,7 @@ interface ICJSNormalizedStackAreaChartProps {
6
6
  clientWidth?: number;
7
7
  clientHeight?: number;
8
8
  colorBank?: string[];
9
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
9
10
  }
10
11
  /**
11
12
  * Chart.js 100% normalized stacked area chart.
@@ -6,6 +6,7 @@ interface ICJSNormalizedStackColumnChartProps {
6
6
  clientWidth?: number;
7
7
  clientHeight?: number;
8
8
  colorBank?: string[];
9
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
9
10
  }
10
11
  /**
11
12
  * Chart.js 100% normalized stacked vertical bar chart.
@@ -6,6 +6,7 @@ interface ICJSNormalizedStackHorizontalBarChartProps {
6
6
  clientWidth?: number;
7
7
  clientHeight?: number;
8
8
  colorBank?: string[];
9
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
9
10
  }
10
11
  /**
11
12
  * Chart.js 100% normalized stacked horizontal bar chart.
@@ -6,6 +6,7 @@ interface ICJSNormalizedStackLineChartProps {
6
6
  clientWidth?: number;
7
7
  clientHeight?: number;
8
8
  colorBank?: string[];
9
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
9
10
  }
10
11
  /**
11
12
  * Chart.js 100% normalized stacked line chart.
@@ -7,6 +7,7 @@ interface ICJSPieChartProps {
7
7
  clientHeight: number;
8
8
  /** Active theme colour bank from the host application. Falls back to default palette. */
9
9
  colorBank?: string[];
10
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
10
11
  }
11
12
  /**
12
13
  * Chart.js pie chart.
@@ -7,6 +7,7 @@ interface ICJSPolarAreaChartProps {
7
7
  clientHeight: number;
8
8
  /** Active theme colour bank from the host application. Falls back to default palette. */
9
9
  colorBank?: string[];
10
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
10
11
  }
11
12
  /**
12
13
  * Chart.js polar area chart.
@@ -6,4 +6,4 @@ import type { TCJSChartType } from "./ChartJSDataTransformer";
6
6
  * All colours, fonts, and visibility flags are derived from formatOptions so the
7
7
  * CJS charts match the styling configured in the host application's right pane.
8
8
  */
9
- export declare function mapFormatOptionsToChartJS(formatOptions: TDefaultChartFormatOptionsType, chartType: TCJSChartType, hasSecondaryAxis?: boolean): ChartOptions;
9
+ export declare function mapFormatOptionsToChartJS(formatOptions: TDefaultChartFormatOptionsType, chartType: TCJSChartType, hasSecondaryAxis?: boolean, addLocalFilterFromLib?: (clickedLegendData: any) => void, legendList?: any[]): ChartOptions;
@@ -56,6 +56,7 @@ export type TChartProps = {
56
56
  isReportEditable?: any;
57
57
  isAdvancedAnalyticsWaterFall?: boolean;
58
58
  onDataLabelCoordinatesChange?: (coords: any[]) => void;
59
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
59
60
  };
60
61
  export type TChartJSON = {
61
62
  dimensionList: string[];
@@ -8,7 +8,8 @@ export interface IChartProps {
8
8
  clientHeight: number;
9
9
  formatOptions: TDefaultChartFormatOptionsType;
10
10
  isReportEditable?: boolean;
11
- onDataLabelCoordinatesChange?: any;
11
+ onDataLabelCoordinatesChange?: (coords: any[]) => void;
12
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
12
13
  }
13
14
  export interface IPieofPieChartProps {
14
15
  chartId: string;
@@ -372,6 +372,7 @@ export type TBubbleChartProps = {
372
372
  data: any;
373
373
  legendEntries?: TLegendsFormatting[];
374
374
  formatOptions?: TDefaultChartFormatOptionsType;
375
+ addLocalFilterFromLib?: (clickedLegendData: any) => void;
375
376
  };
376
377
  export declare const referenceLineTypes: {
377
378
  None: string;
@@ -23,7 +23,7 @@ export declare function getRandomColor(): {
23
23
  *
24
24
  * @return {void} - This function does not return anything. It updates the SVG by rendering legends.
25
25
  */
26
- export declare function drawLegends(height: number, svg: any, maxLegendDimensions: number[], chartTitleHeight: number, width: number, legendMargin: number, formatOptions: TDefaultChartFormatOptionsType, seriesData: TSeries[], chartId: string, dataTableHeight: number, margin: TChartMargins, legendShape: string, chartType?: string): void;
26
+ export declare function drawLegends(height: number, svg: any, maxLegendDimensions: number[], chartTitleHeight: number, width: number, legendMargin: number, formatOptions: TDefaultChartFormatOptionsType, seriesData: TSeries[], chartId: string, dataTableHeight: number, margin: TChartMargins, legendShape: string, chartType?: string, addLocalFilterFromLib?: (clickedLegendData: any) => void): void;
27
27
  /**
28
28
  * @param {string[]} list - Array of legend strings.
29
29
  * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options including legend font size and family.
@@ -123,7 +123,7 @@ export declare const findStringWithLongestLength: (data: (string | Record<string
123
123
  * @param {TDefaultChartFormatOptionsType} chartFormatOptions - Configuration object for formatting styles and settings.
124
124
  * @param {string} chartId - Unique ID for the chart, used to identify elements within the SVG.
125
125
  */
126
- export declare const legendsWithScroll: (svg: any, seriesData: TSeries[] | TVennSeries[], x: number, y: number, width: number, height: number, legendPosition: string, alignment: string, legendShape: string, chartFormatOptions: TDefaultChartFormatOptionsType, chartId: string, isVennChart?: boolean) => void;
126
+ export declare const legendsWithScroll: (svg: any, seriesData: TSeries[] | TVennSeries[], x: number, y: number, width: number, height: number, legendPosition: string, alignment: string, legendShape: string, chartFormatOptions: TDefaultChartFormatOptionsType, chartId: string, isVennChart?: boolean, addLocalFilterFromLib?: (clickedLegendData: any) => void) => void;
127
127
  /**
128
128
  *
129
129
  * Appends a filled circle shape to the given legend container.
@@ -207,7 +207,7 @@ export declare const marginCalculationsForChartsWithoutAxis: (chartFormatOptions
207
207
  * @param chartId - The unique identifier for the chart.
208
208
  * @param margins - The margins for the chart area.
209
209
  */
210
- export declare const initLegendListWithTotalValueAllowance: (chartFormatOptions: TDefaultChartFormatOptionsType, svg: d3.Selection<SVGGElement, any, any, any>, seriesData: TSeries[], width: number, height: number, legendListWidth: number, chartTitleHeight: number, chartId: string, margins: TChartMargins, staticLegendShape: string, shouldAllowTotalValueMargin?: boolean) => void;
210
+ export declare const initLegendListWithTotalValueAllowance: (chartFormatOptions: TDefaultChartFormatOptionsType, svg: d3.Selection<SVGGElement, any, any, any>, seriesData: TSeries[], width: number, height: number, legendListWidth: number, chartTitleHeight: number, chartId: string, margins: TChartMargins, staticLegendShape: string, shouldAllowTotalValueMargin?: boolean, addLocalFilterFromLib?: any) => void;
211
211
  /**
212
212
  * Calculates the maximum possible width and height for the legends based on the longest legend string.
213
213
  * @param chartFormatOptions - The format options for the chart.