pace-chart-lib 1.0.10 → 1.0.13

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.
Files changed (49) hide show
  1. package/dist/pace-chart-lib.es.js +177 -209
  2. package/dist/pace-chart-lib.umd.js +177 -209
  3. package/package.json +1 -1
  4. package/dist/Components/Charts/ChartsWithAxis/AreaFamily/AreaChart.d.ts +0 -4
  5. package/dist/Components/Charts/ChartsWithAxis/AreaFamily/NormalizedStackAreaChart.d.ts +0 -4
  6. package/dist/Components/Charts/ChartsWithAxis/AreaFamily/StackAreaChart.d.ts +0 -4
  7. package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +0 -667
  8. package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +0 -171
  9. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnChart.d.ts +0 -4
  10. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnHistogramChart.d.ts +0 -4
  11. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/CustomColumnChart.d.ts +0 -4
  12. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/LayeredColumnChart.d.ts +0 -4
  13. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/NormalizedStackColumnChart.d.ts +0 -4
  14. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/StackColumnChart.d.ts +0 -4
  15. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalBarChart.d.ts +0 -4
  16. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalHistogramChart.d.ts +0 -4
  17. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/LayeredHorizontalBarChart.d.ts +0 -4
  18. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/NormalizedStackHorizontalBarChart.d.ts +0 -4
  19. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/StackHorizontalBarChart.d.ts +0 -4
  20. package/dist/Components/Charts/ChartsWithAxis/LineFamily/LineChart.d.ts +0 -4
  21. package/dist/Components/Charts/ChartsWithAxis/LineFamily/NormalizedStackLineChart.d.ts +0 -4
  22. package/dist/Components/Charts/ChartsWithAxis/LineFamily/StackLineChart.d.ts +0 -4
  23. package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/TornadoChart.d.ts +0 -4
  24. package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/WaterfallChart.d.ts +0 -4
  25. package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisFunctions.d.ts +0 -92
  26. package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisTypes.types.d.ts +0 -111
  27. package/dist/Components/Charts/ChartsWithoutAxis/Maps/Cordinates.d.ts +0 -26
  28. package/dist/Components/Charts/ChartsWithoutAxis/Maps/Maps.d.ts +0 -4
  29. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/BubbleChart.d.ts +0 -4
  30. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/OrganizationChart.d.ts +0 -4
  31. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ProgressChart.d.ts +0 -3
  32. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/PyramidChart.d.ts +0 -3
  33. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/RadialBarChart.d.ts +0 -4
  34. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/SankeyChart.d.ts +0 -4
  35. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ScatterChart.d.ts +0 -4
  36. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/Speedometer.d.ts +0 -3
  37. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/VennChart.d.ts +0 -4
  38. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/WordCloud.d.ts +0 -4
  39. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/DonutChart.d.ts +0 -4
  40. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieChart.d.ts +0 -4
  41. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieFamilyCommonFunctions.d.ts +0 -10
  42. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieofPieChart.d.ts +0 -3
  43. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/TreemapChart.d.ts +0 -3
  44. package/dist/Components/Charts/Core/Common.types.d.ts +0 -369
  45. package/dist/Components/Charts/Core/CommonFunctions.d.ts +0 -239
  46. package/dist/Components/Charts/Core/DefaultChartDataProperties.d.ts +0 -65
  47. package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +0 -595
  48. package/dist/Services/ErrorLog.d.ts +0 -1
  49. package/dist/index.d.ts +0 -35
@@ -1,369 +0,0 @@
1
- export declare enum staticLegendShape {
2
- rectangle = "rectangle",
3
- circle = "circle",
4
- hollowCircle = "hollowCircle",
5
- areaWithLine = "areaWithLine",
6
- line = "line",
7
- custom = "custom",
8
- none = "none"
9
- }
10
- export declare enum connectedStyle {
11
- "solid" = "unset",
12
- "dotted" = 2,
13
- "dashed" = 7
14
- }
15
- export declare enum staticLineStyle {
16
- "solid" = "solid",
17
- "dotted" = "dotted",
18
- "dashed" = "dashed"
19
- }
20
- import { defaultChartFormatOptions } from "./DefaultProperties.types";
21
- import * as d3 from "d3";
22
- import * as d3Annotation from "d3-svg-annotation";
23
- export type TTextMeasureOptions = {
24
- content: string;
25
- fontSize?: number;
26
- fontFamily?: string;
27
- rotationDegree?: number;
28
- fixedWidth?: number;
29
- };
30
- export type TTextDimensions = {
31
- width: number;
32
- height: number;
33
- rotatedWidth: number;
34
- rotatedHeight: number;
35
- };
36
- export type TDefaultChartFormatOptionsType = typeof defaultChartFormatOptions;
37
- export interface ICustomArcDatum extends d3.DefaultArcObject {
38
- x0: number;
39
- x1: number;
40
- y0: number;
41
- y1: number;
42
- depth: number;
43
- data: TSeries;
44
- }
45
- export type TNode = {
46
- height: any;
47
- parent: any;
48
- value: any;
49
- x0: number;
50
- x1: number;
51
- y0: number;
52
- y1: number;
53
- depth: number;
54
- data: TSeries;
55
- };
56
- export type TLegendEntry = {
57
- color?: string;
58
- name?: string;
59
- type?: string;
60
- axis?: string;
61
- alias?: string;
62
- fontSize?: number;
63
- fontStyle?: string[];
64
- fontFamily?: string;
65
- labelColor?: string;
66
- markerShape?: string;
67
- markerColor?: string;
68
- lineWidth?: number;
69
- lineStyle?: string;
70
- markerSize?: number;
71
- opacity?: number;
72
- annotation?: number;
73
- disableAnnotation?: boolean;
74
- connector?: number;
75
- disableConnector?: boolean;
76
- measureUniqueId?: string;
77
- legendUniqueId?: string;
78
- borderStyle?: string;
79
- borderWidth?: number;
80
- borderRadius?: number;
81
- borderColor?: string;
82
- labelFontSize?: number;
83
- labelFontStyle?: string[];
84
- labelFont?: string;
85
- labelFontColor?: string;
86
- valueFontSize?: number;
87
- valueFontStyle?: string[];
88
- valueFont?: string;
89
- valueFontColor?: string;
90
- backgroundColor?: string;
91
- nodeHeight?: number;
92
- nodeWidth?: number;
93
- dataLabelPosition?: string;
94
- secondaryAxisBgColor?: string;
95
- actualChartType?: string;
96
- hideZeroValues?: boolean;
97
- stackBorderWidth?: number;
98
- stackBorderColor?: string;
99
- stackBorderStyle?: number;
100
- seriesLabelVisibility?: boolean;
101
- totalValue?: number;
102
- currentMeasure?: string;
103
- legend?: string;
104
- dimensions?: string[];
105
- maximumMeasure?: number;
106
- measures?: number[];
107
- minimumMeasure?: number;
108
- disableLineStyle?: boolean;
109
- endColor?: string;
110
- disableAnnotationPosition?: boolean;
111
- startColor?: string;
112
- disableMarkerShape?: boolean;
113
- disableMarkerColor?: boolean;
114
- setColorScale?: boolean;
115
- areaBorderColor?: string;
116
- disableDataLabelPosition?: boolean;
117
- disableMarkerSize?: boolean;
118
- annotationPosition?: number;
119
- individualAnnotationVisibility?: string;
120
- currentLegend?: string;
121
- tooltip?: string;
122
- tooltipMeasure?: number;
123
- themeColor?: string;
124
- };
125
- export declare const ConnecterCurve: {
126
- "1": string;
127
- "2": d3.CurveFactory;
128
- "3": d3.CurveFactory;
129
- };
130
- export declare const AnnotationTypeMap: {
131
- 1: typeof d3Annotation.annotationLabel;
132
- 2: typeof d3Annotation.annotationLabel;
133
- 3: typeof d3Annotation.annotationCallout;
134
- 4: typeof d3Annotation.annotationCalloutElbow;
135
- 5: typeof d3Annotation.annotationCalloutCurve;
136
- };
137
- export declare const ConnectedStyle: {
138
- solid: string;
139
- Dotted: string;
140
- Dashed: string;
141
- };
142
- export type TChartMargins = {
143
- top: number;
144
- right: number;
145
- bottom: number;
146
- left: number;
147
- };
148
- export type TPieOfPieSeries = {
149
- legend: string;
150
- data: TDataPoint[];
151
- children?: TPieOfPieSeries[];
152
- };
153
- export type TAnnotationObject = {
154
- note: {
155
- title: string;
156
- label: string;
157
- align: string;
158
- };
159
- data: {
160
- x: number;
161
- y: number;
162
- legend: string;
163
- dimension: string;
164
- measure: number;
165
- labelFontFamily: string;
166
- labelFontColor: string;
167
- labelFontSize: number;
168
- labelFontStyle: string[];
169
- valueFontFamily: string;
170
- valueFontColor: string;
171
- valueFontSize: number;
172
- valueFontStyle: string[];
173
- isVisible: boolean;
174
- };
175
- dx: 0;
176
- dy: 0;
177
- connector: {
178
- end: string;
179
- curve: d3.CurveFactory;
180
- };
181
- subject: {
182
- height: number;
183
- width: number;
184
- };
185
- type: d3Annotation.annotationLabel<any>;
186
- color: string;
187
- height: number;
188
- width: number;
189
- index: number;
190
- };
191
- export declare enum staticLegendPosition {
192
- "left" = "Left",
193
- "right" = "Right",
194
- "top" = "Top",
195
- "bottom" = "Bottom",
196
- "none" = "None"
197
- }
198
- export declare enum staticDisplayUnits {
199
- "thousands" = "Thousands",
200
- "millions" = "Millions",
201
- "billions" = "Billions",
202
- "none" = "None"
203
- }
204
- export declare enum staticNumberUnits {
205
- "percentage" = ",.0%",
206
- "general" = "",
207
- "scientific" = ".2n",
208
- "currency_USD" = ".2$",
209
- "currency_CAD" = ".2c",
210
- "currency_EUR" = ".2\u0113",
211
- "currency_CHF" = ".2ch",
212
- "currency_UK" = ".2\u00A3",
213
- "currency_INR" = ".2\u20B9",
214
- "commaSeparated" = ","
215
- }
216
- export declare enum staticDataLabelPositions {
217
- "top" = "1",
218
- "bottom" = "3",
219
- "middle" = "2"
220
- }
221
- export declare enum staticTotalAlignment {
222
- "start" = "1",
223
- "middle" = "2",
224
- "end" = "3"
225
- }
226
- export declare enum staticTotalPosition {
227
- "top" = "1",
228
- "bottom" = "2"
229
- }
230
- export declare const colorThemeTypes: {
231
- none: string;
232
- discrete: string;
233
- colorTheme: string;
234
- };
235
- export declare const dataLabelPositionType: {
236
- automatic: string;
237
- startOnly: string;
238
- endOnly: string;
239
- startAndEndBoth: string;
240
- none: string;
241
- };
242
- export declare enum connectorKPIforSpeedometerType {
243
- PointerValue = "1",
244
- Absolute = "2",
245
- CAGR = "3",
246
- PercentageGrowth = "4"
247
- }
248
- export declare const legendColorMode: {
249
- singleColor: string;
250
- multiColor: string;
251
- };
252
- export declare const fontStyleOptions: {
253
- underline: string;
254
- bold: string;
255
- italic: string;
256
- normal: string;
257
- };
258
- export declare enum verticalLegendAllignment {
259
- top = "Top",
260
- middle = "Middle",
261
- bottom = "Bottom"
262
- }
263
- export declare enum horizontalLegendAllignment {
264
- start = "Start",
265
- middle = "Middle",
266
- end = "End"
267
- }
268
- export type TSeries = {
269
- legend: string;
270
- data: TDataPoint[];
271
- properties?: TLegendEntry;
272
- };
273
- export type TData = {
274
- ChartData: TSeries[];
275
- DimensionList: string[];
276
- };
277
- export type TDataPoint = {
278
- 0?: number;
279
- 1?: number;
280
- dimension: string;
281
- value: number;
282
- legend: string;
283
- hideZero?: boolean;
284
- axis?: string;
285
- key?: string;
286
- type?: string;
287
- labelPosition?: string;
288
- labelColor?: string;
289
- };
290
- export interface ICustomArcDatum extends d3.DefaultArcObject {
291
- x0: number;
292
- x1: number;
293
- y0: number;
294
- y1: number;
295
- depth: number;
296
- data: TSeries;
297
- }
298
- export interface IMapsProps {
299
- chartId: string;
300
- data: TSeries[];
301
- geoJsonNode: TGeoJsonNode;
302
- formatOptions: TDefaultChartFormatOptionsType;
303
- }
304
- type TGeoJsonNode = {
305
- dimensionName: string;
306
- mappings: {
307
- actualName: string;
308
- mappedName: string;
309
- }[];
310
- dimensionNode: TDimensionNode;
311
- groups: {
312
- groupName: string;
313
- groupedRegions: string[];
314
- }[];
315
- };
316
- type TDimensionNode = {
317
- "actualName": string;
318
- "dataType": string;
319
- "name": string;
320
- "datasourceId": string;
321
- "isVisible": boolean;
322
- "type": string;
323
- "datasourceName": string;
324
- };
325
- export type TLegendsFormatting = {
326
- color?: string;
327
- name?: string;
328
- alias?: string;
329
- fontSize?: number;
330
- fontStyle?: string[];
331
- fontFamily?: string;
332
- markerShape?: string;
333
- markerColor?: string;
334
- actualChartType?: string;
335
- };
336
- export type bubbleScatterData = {
337
- dimension: number;
338
- dimensionName: string;
339
- legendColor: string;
340
- legendName: string;
341
- measure: number;
342
- measureName: string;
343
- sizeName: string;
344
- sizeValue: number;
345
- };
346
- export type TBubbleChartProps = {
347
- chartId?: string;
348
- clientWidth: number;
349
- clientHeight: number;
350
- data: bubbleScatterData[];
351
- legendEntries?: TLegendsFormatting[];
352
- formatOptions?: TDefaultChartFormatOptionsType;
353
- };
354
- export declare const referenceLineTypes: {
355
- None: string;
356
- Mean: string;
357
- Median: string;
358
- Custom: string;
359
- };
360
- export type TScatterChartProps = {
361
- chartId: string;
362
- clientWidth: number;
363
- clientHeight: number;
364
- data: bubbleScatterData[];
365
- shapesList: TLegendsFormatting[];
366
- colorsList: TLegendsFormatting[];
367
- formatOptions: TDefaultChartFormatOptionsType;
368
- };
369
- export {};
@@ -1,239 +0,0 @@
1
- import * as d3 from "d3";
2
- import type { TChartJSON } from "../ChartsWithAxis/ChartsWithAxisTypes.types";
3
- import { type TAnnotationObject, type TChartMargins, type TDefaultChartFormatOptionsType, type TSeries, type TTextDimensions } from "./Common.types";
4
- import { TVennSeries } from "../ChartsWithoutAxis/ChartsWithoutAxisTypes.types";
5
- export declare const svgID = "scaling-svg-";
6
- export declare function getRandomColor(): {
7
- color: string;
8
- };
9
- /**
10
- * Draws chart legends in the specified position with optional scroll behavior,
11
- * using layout and format options defined in the configuration.
12
- *
13
- * @param {number} height - The total height of the chart container.
14
- * @param {any} svg - The SVG element where the chart and legends are rendered.
15
- * @param {number[]} maxLegendDimensions - Array with the maximum dimensions [width, height] of the legends.
16
- * @param {number} chartTitleHeight - Height occupied by the chart title (used to offset legends).
17
- * @param {number} width - The total width of the chart container.
18
- * @param {number} legendMargin - Margin to be applied around the legend area.
19
- * @param {TDefaultChartFormatOptionsType} formatOptions - Formatting options for the chart including legend settings.
20
- * @param {TSeries[]} seriesData - Array of data series to be represented in the legend.
21
- * @param {string} chartId - A unique identifier for the chart, used to bind legend elements.
22
- * @param {string} legendShape - A shape for chart legends.
23
- *
24
- * @return {void} - This function does not return anything. It updates the SVG by rendering legends.
25
- */
26
- export declare function drawLegends(height: number, svg: any, maxLegendDimensions: number[], chartTitleHeight: number, width: number, legendMargin: number, formatOptions: TDefaultChartFormatOptionsType, inputSeries: TSeries[], chartId: string, legendShape: string): void;
27
- /**
28
- * @param {string[]} list - Array of legend strings.
29
- * @param {TDefaultChartFormatOptionsType} formatOptions - Chart formatting options including legend font size and family.
30
- * @return {{width: number, height: number}} - The calculated width and height of the longest legend text.
31
- */
32
- export declare function calculateMaxLegendWidth(list: string[], formatOptions: TDefaultChartFormatOptionsType): number[];
33
- /**
34
- * Renders markers for line or area chart series on the provided D3 selection.
35
- * Binds marker shapes, sizes, colors, and handles visibility and interaction (tooltips).
36
- *
37
- * @param {d3.Selection<SVGGElement, unknown, null, undefined>} lines - The D3 selection (SVG group) where marker groups will be appended.
38
- * @param {TSeries[]} chartData - The data array representing chart series, each with data points and properties.
39
- * @param {string} type - The chart type (e.g., "CombiLine", "Area", "StackArea") affecting marker rendering logic.
40
- * @param {Function} xScale - D3 scale function for x-axis, used to position markers horizontally.
41
- * @param {Function} yScale - D3 scale function for y-axis, used to position markers vertically.
42
- * @param {Function} yScaleRight - D3 scale function for secodary y-axis, used to position markers vertically.
43
- * @param {Function} tooltipHandle - (Not used in current snippet but assumed) Function to manage tooltip display.
44
- * @param {TDefaultChartFormatOptionsType} formatOptions - Configuration object for chart formatting and visibility settings.
45
- * @param {TChartJSON} chartJSON - Object containing chart metadata, formatting info, and dimension mappings.
46
- * @param {number} secondaryCustomYaxisMaxValue - Maximum value for secondary Y axis scale, used for visibility logic.
47
- * @param {number} secondaryCustomYaxisMinValue - Minimum value for secondary Y axis scale, used for visibility logic.
48
- * @param {number} customYaxisMinValue - Minimum value for primary Y axis scale, used for visibility logic.
49
- * @param {number} customYaxisMaxValue - Maximum value for primary Y axis scale, used for visibility logic.
50
- * @param {boolean} isNormalizedChart - 100% chart type validation.
51
- *
52
- * @returns {void} This function does not return a value; it appends and updates SVG marker elements in the DOM.
53
- */
54
- export declare function lineMarkers(lines: any, chartData: TSeries[], type: string, xScale: any, yScale: any, yScaleRight: any, tooltipHandle: any, formatOptions: TDefaultChartFormatOptionsType, chartJSON: TChartJSON, secondaryCustomYaxisMaxValue: number, secondaryCustomYaxisMinValue: number, customYaxisMinValue: number, customYaxisMaxValue: number, isNormalizedChart: boolean): void;
55
- /**
56
- * Attaches hover interactions to the area chart elements to show markers and tooltips
57
- * when the user moves the mouse over the chart.
58
- *
59
- * @param {TDefaultChartFormatOptionsType} formatOptions - Configuration options for chart appearance and tooltip formatting.
60
- * @param {any} areas - D3 selection representing the area paths of the chart.
61
- * @param {any} focus - D3 selection representing the group or element used for showing the focus marker and tooltip.
62
- * @param {string[]} filteredDimension - Array of dimension values representing the x-axis categories.
63
- * @param {any[]} lineData - Array of data series objects containing values, marker properties, and metadata.
64
- * @param {any} xScale - D3 scale function for the x-axis.
65
- * @param {any} yScaleLeft - D3 scale function for the left y-axis.
66
- * @param {string} chartType - The type of area chart (e.g., "stackArea", "stackArea100").
67
- *
68
- * @return {void} This function modifies the chart's behavior by adding interactivity but does not return a value.
69
- */
70
- export declare function onHoverMarkerForAreaChartFamily(formatOptions: TDefaultChartFormatOptionsType, areas: any, focus: any, filteredDimension: string[], lineData: any[], xScale: any, yScaleLeft: any, chartType: string): void;
71
- /**
72
- * Function to calculate actual height, width of content primarily used for margin calculations
73
- * @returns { width: 0, height: 0, rotatedWidth: 0, rotatedHeight: 0 }
74
- */
75
- export declare function preCalculateTextDimensions(content: string, fontSize?: number, fontFamily?: string, rotationDegree?: number, fixedWidth?: number): TTextDimensions;
76
- /**
77
- * adds non defined properties from `defaults` to `target` to avoid further checks for undefined values
78
- * @param defaults -> Object which contains default properties
79
- * @param target -> Object which may contain some undefined properties
80
- * @returns object with all properties from defaults
81
- */
82
- export declare function addUndefinedDefaults(defaults: any, target: any): any;
83
- /**
84
- * Number formating function
85
- * @returns function which takes number as input and return formatted number
86
- */
87
- export declare function getNumberWithFormatFunction(displayUnits: any, numberFormat: any, decimalPrecision: any): (d: any) => string;
88
- /**
89
- * @param elements -> array of key value pair which should be added to tooltip one after another;
90
- * @param chartFormatOptions -> rightpane format options;
91
- * @param event -> optional mouse event to track mouse;
92
- */
93
- export declare function showTooltipOnMouseMove(elements: any, chartFormatOptions: TDefaultChartFormatOptionsType, event?: MouseEvent, markerProp?: any): void;
94
- export declare function hideTooltipOnMouseOut(): void;
95
- /**
96
- * Adds chart title to svg
97
- * @param chartSvg -> svgRef from use ref hook;
98
- * @param chartTitleHeight -> height of chart title;
99
- * @param chartTitleWidth -> width of chart title;
100
- * @param chartFormatOptions -> rightpane format options;
101
- */
102
- export declare const drawChartTitle: (chartSvg: any, chartTitleHeight: number, chartTitleWidth: number, chartFormatOptions: TDefaultChartFormatOptionsType) => void;
103
- /**
104
- * Finds the longest string from an array of strings or an array of objects.
105
- * @param {Array<string | Object>} data -> The input array containing strings or objects.
106
- * @param {string} [key] -> (Optional) If the array contains objects, specify the key to extract string values.
107
- * @returns {string} The longest string found in the array.
108
- */
109
- export declare const findStringWithLongestLength: (data: (string | Record<string, any>)[], key?: string) => string;
110
- /**
111
- * Renders chart legends within an SVG element with scroll support when needed.
112
- * @param {SVGElement} svg - The D3 or SVG selection where the legends will be appended.
113
- * @param {TSeries[]} seriesData - Array of data series passed to chart as props.
114
- * @param {number} x - The x-coordinate for placing the legends container.
115
- * @param {number} y - The y-coordinate for placing the legends container.
116
- * @param {number} width - The width of the legend container.
117
- * @param {number} height - The height of the legend container.
118
- * @param {string} legendPosition - The position of the legend (e.g., 'top', 'bottom', 'left', 'right').
119
- * @param {string} alignment - Alignment of the legends within the container ('start', 'center', 'end', 'Top','Mid','Bottom').
120
- * @param {string} legendShape - Shape of the legend symbol (e.g., 'circle', 'rect', 'line', 'hollow circle').
121
- * @param {TDefaultChartFormatOptionsType} chartFormatOptions - Configuration object for formatting styles and settings.
122
- * @param {string} chartId - Unique ID for the chart, used to identify elements within the SVG.
123
- */
124
- 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;
125
- /**
126
- *
127
- * Appends a filled circle shape to the given legend container.
128
- * @param d - The data object containing legend properties (like color, size).
129
- * @param innerDiv - The D3 selection where the shape will be appended.
130
- */
131
- export declare function getCircleShape(d: any, innerDiv: any): void;
132
- /**
133
- * Appends a hollow (outlined) circle shape to the given legend container.
134
- * @param d - The data object containing legend properties.
135
- * @param innerDiv - The D3 selection where the shape will be appended.
136
- */
137
- export declare function getHollowCircleShape(d: any, innerDiv: any): void;
138
- /**
139
- * @param {Object} d - Data object containing properties such as lineStyle, color, markerShape, and markerColor.
140
- * @param {Object} innerDiv - A D3 selection of a container element to append the line shape.
141
- * @param {TDefaultChartFormatOptionsType} formatOptions - Formatting options including marker visibility.
142
- * @return {void}
143
- */
144
- export declare function getLineShape(d: any, innerDiv: any, formatOptions: TDefaultChartFormatOptionsType): void;
145
- /**
146
- * @param {Object} d - Data object containing color, markerShape array, and properties including markerColor.
147
- * @param {Object} innerDiv - A D3 selection of a container element to append the area shape.
148
- * @param {TDefaultChartFormatOptionsType} formatOptions - Formatting options including marker visibility.
149
- * @return {void}
150
- */
151
- export declare function getAreaShape(d: any, innerDiv: any, formatOptions: TDefaultChartFormatOptionsType): void;
152
- /**
153
- * Appends a rectangle shape to the given legend container.
154
- * @param d - The data object that includes styling for the rectangle (like color, border).
155
- * @param innerDiv - The D3 selection where the shape will be inserted.
156
- */
157
- export declare function getReactShape(d: any, innerDiv: any): void;
158
- export declare function drawAnnotations(oldAnnotationList: TAnnotationObject[], newAnnotationList: TAnnotationObject[], chartFormatOptions: TDefaultChartFormatOptionsType): void;
159
- /**
160
- * Initializes the SVG element with the specified dimensions and chart format options.
161
- * @param svgRef - The reference to the SVG element.
162
- * @param width - The width of the SVG element.
163
- * @param height - The height of the SVG element.
164
- * @param chartFormatOptions - The format options for the chart, which may include properties like background color and border.
165
- */
166
- export declare const initSvg: (svgRef: React.MutableRefObject<SVGSVGElement>, width: number, height: number, chartFormatOptions: TDefaultChartFormatOptionsType) => void;
167
- /**
168
- * Initializes the chart area within the SVG element, applying margins and setting a default font color.
169
- * @param svg - The D3 selection of the SVG element.
170
- * @param margins - The margins to apply to the chart area.
171
- * @return {d3.Selection<SVGGElement, any, any, any>} - The D3 selection of the chart area group element.
172
- */
173
- export declare const initChartArea: (svg: any, margins: any) => any;
174
- /**
175
- * all common functions to do before draw chart .
176
- * @param svgRef - The reference to the SVG element.
177
- * @param formatOptions - The format options for the chart which may contains some undefined values.
178
- * @returns { chartFormatOptions: TDefaultChartFormatOptionsType } - The chart format options with defaults applied.
179
- * @returns { svg: d3.Selection<SVGSVGElement, any, any, any> } - The D3 selection of the SVG element.
180
- *
181
- *
182
- */
183
- export declare const firstFunctionBeforeRender: (svgRef: React.MutableRefObject<SVGSVGElement>, formatOptions: TDefaultChartFormatOptionsType) => {
184
- chartFormatOptions: TDefaultChartFormatOptionsType;
185
- svg: d3.Selection<SVGSVGElement, any, any, any>;
186
- width: number;
187
- height: number;
188
- };
189
- export declare const marginCalculationsForChartsWithoutAxis: (chartFormatOptions: TDefaultChartFormatOptionsType, width: number, height: number, maxLegendDimensions: number[], margins: TChartMargins, isVennChart?: boolean) => {
190
- margins: TChartMargins;
191
- innerHeight: number;
192
- innerWidth: number;
193
- legendListWidth: number;
194
- chartTitleHeight: number;
195
- };
196
- /**
197
- * Initializes the legend list with total value allowance and appends to svg.
198
- * @param chartFormatOptions - The format options for the chart.
199
- * @param svg - The D3 selection of the SVG element.
200
- * @param seriesData - The data series to be displayed in the legend.
201
- * @param width - The width of the SVG element.
202
- * @param height - The height of the SVG element.
203
- * @param legendListWidth - The width allocated for the legend list.
204
- * @param chartTitleHeight - The height of the chart title.
205
- * @param chartId - The unique identifier for the chart.
206
- * @param margins - The margins for the chart area.
207
- */
208
- 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, shouldAllowTotalValueMargin?: boolean) => void;
209
- /**
210
- * Calculates the maximum possible width and height for the legends based on the longest legend string.
211
- * @param chartFormatOptions - The format options for the chart.
212
- * @param seriesData - The data series to be displayed in the legend.
213
- * @returns The maximum possible width and height for the legends.
214
- */
215
- export declare const calculateLegendsMaxPossibleWidth: (chartFormatOptions: TDefaultChartFormatOptionsType, seriesData: TSeries[], key?: string) => number[];
216
- /**
217
- * Calculates the margins and inner dimensions for the charts without legends.
218
- * @param chartFormatOptions - The format options for the chart.
219
- * @param height - The height of the chart area.
220
- * @param width - The width of the chart area.
221
- * @param shouldShowColorScale - Only allow treemap to show color scale.
222
- * @returns The calculated margins and inner dimensions for the chart.
223
- */
224
- export declare const marginCalculationsForChartsWithoutLegends: (chartFormatOptions: TDefaultChartFormatOptionsType, height: number, width: number, shouldShowColorScale?: boolean) => {
225
- margins: {
226
- top: number;
227
- bottom: number;
228
- left: number;
229
- right: number;
230
- };
231
- chartTitleHeight: number;
232
- innerHeight: number;
233
- innerWidth: number;
234
- };
235
- export declare const convertStringToNumber: (value: any) => any;
236
- export declare function generalizedChartData(chartData: any, dimensionList?: any): any;
237
- export declare const getJQuerySelector: (strSeletor?: string) => string;
238
- export declare const connectorNumberFormat: (numerator: any, denominator: any, decimalValues: any, numberFormat: any, x: any, y: any, formatOptions: TDefaultChartFormatOptionsType) => any;
239
- export declare const getHoverId: (inputText: string) => string;
@@ -1,65 +0,0 @@
1
- export declare const chartProperties: {
2
- color: string;
3
- name: string;
4
- type: string;
5
- axis: string;
6
- alias: string;
7
- fontSize: number;
8
- fontStyle: any[];
9
- fontFamily: string;
10
- labelColor: string;
11
- hideZeroValues: boolean;
12
- markerShape: string;
13
- lineStyle: string;
14
- annotationPosition: number;
15
- markerColor: string;
16
- areaBorderColor: string;
17
- lineWidth: number;
18
- markerSize: number;
19
- opacity: number;
20
- annotation: number;
21
- disableAnnotation: boolean;
22
- disableAnnotationPosition: boolean;
23
- connector: number;
24
- disableConnector: boolean;
25
- measureUniqueId: string;
26
- legendUniqueId: string;
27
- disableMarkerShape: boolean;
28
- disableMarkerSize: boolean;
29
- disableMarkerColor: boolean;
30
- disableLineWidth: boolean;
31
- disableLineStyle: boolean;
32
- borderStyle: string;
33
- borderWidth: number;
34
- borderRadius: number;
35
- borderColor: string;
36
- labelFontSize: number;
37
- labelFontStyle: any[];
38
- labelFont: string;
39
- labelFontColor: string;
40
- valueFontSize: number;
41
- valueFontStyle: any[];
42
- valueFont: string;
43
- valueFontColor: string;
44
- backgroundColor: string;
45
- nodeHeight: number;
46
- nodeWidth: number;
47
- setColorScale: boolean;
48
- startColor: string;
49
- endColor: string;
50
- disableDataLabelPosition: boolean;
51
- dataLabelPosition: number;
52
- actualChartType: string;
53
- secondaryAxisBgColor: string;
54
- stackBorderWidth: number;
55
- stackBorderColor: string;
56
- stackBorderStyle: number;
57
- seriesLabelVisibility: boolean;
58
- individualAnnotationVisibility: string;
59
- currentMeasure: string;
60
- legend: string;
61
- currentLegend: string;
62
- tooltip: string;
63
- tooltipMeasure: string;
64
- };
65
- export type TDefaultChartProperties = typeof chartProperties;