@sisense/sdk-ui 1.10.0 → 1.11.0
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.
- package/dist/ai/ai-context-provider.d.ts +1 -1
- package/dist/ai/chatbot.d.ts +1 -1
- package/dist/ai/common/beta-label.d.ts +1 -0
- package/dist/ai/get-nlg-query-result.d.ts +1 -1
- package/dist/ai/messages/get-widget-options.d.ts +6 -1
- package/dist/ai/use-get-nlg-query-result.d.ts +1 -1
- package/dist/ai/use-get-query-recommendations.d.ts +1 -1
- package/dist/ai.js +505 -457
- package/dist/api/types/dashboard-dto.d.ts +3 -3
- package/dist/area-range-chart.d.ts +67 -0
- package/dist/areamap-chart.d.ts +0 -1
- package/dist/boxplot-chart.d.ts +0 -1
- package/dist/chart/chart.d.ts +0 -2
- package/dist/chart/helpers/should-skip-sisense-context-waiting.d.ts +3 -0
- package/dist/chart/helpers/use-chart-renderer-props.d.ts +27 -0
- package/dist/chart/regular-chart.d.ts +7 -0
- package/dist/chart/types.d.ts +21 -0
- package/dist/chart-data/range-data.d.ts +11 -0
- package/dist/chart-data/types.d.ts +15 -1
- package/dist/chart-data-options/translate-range-data-options.d.ts +2 -0
- package/dist/chart-data-options/types.d.ts +56 -4
- package/dist/chart-data-processor/data-table-date-period.d.ts +0 -1
- package/dist/chart-options-processor/chart-options-service.d.ts +5 -0
- package/dist/chart-options-processor/range-chart-options.d.ts +17 -0
- package/dist/chart-options-processor/translations/design-options.d.ts +55 -7
- package/dist/chart-options-processor/translations/range/tooltip-range.d.ts +4 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +3 -0
- package/dist/chart-options-processor/translations/types.d.ts +12 -6
- package/dist/charts/map-charts/areamap/areamap.d.ts +2 -3
- package/dist/charts/map-charts/scattermap/scattermap.d.ts +2 -1
- package/dist/charts/table/helpers/calc-column-widths.d.ts +1 -0
- package/dist/charts/table/styles/style-constants.d.ts +1 -0
- package/dist/charts/table/types.d.ts +13 -4
- package/dist/dashboard-widget/translate-widget-filters.d.ts +664 -4
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -1
- package/dist/dashboard-widget/utils.d.ts +2 -2
- package/dist/{debounce-2yQ2123W.js → debounce-BbwkW3DX.js} +50809 -50707
- package/dist/decorators/component-decorators/as-sisense-component.d.ts +6 -2
- package/dist/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +2 -1
- package/dist/decorators/component-decorators/with-tracking/with-tracking.d.ts +4 -1
- package/dist/filters/components/common/basic-input.d.ts +0 -1
- package/dist/filters/components/filters-panel/filters-panel-tile.d.ts +18 -0
- package/dist/filters/components/filters-panel/filters-panel.d.ts +18 -0
- package/dist/filters/components/filters-panel/index.d.ts +2 -0
- package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +3 -1
- package/dist/filters/components/member-filter-tile/use-members.d.ts +1 -1
- package/dist/filters/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +34633 -25584
- package/dist/indicator-canvas.d.ts +2 -3
- package/dist/models/dashboard/get-dashboard-model.d.ts +8 -0
- package/dist/models/dashboard/translate-dashboard.d.ts +1 -1
- package/dist/models/dashboard/types.d.ts +3 -1
- package/dist/models/widget/widget-model.d.ts +3 -3
- package/dist/pivot-table/formatters/header-cell-formatters/header-cell-highlight-formatter.d.ts +2 -0
- package/dist/pivot-table/formatters/types.d.ts +2 -2
- package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +1 -0
- package/dist/pivot-table/pivot-table.d.ts +1 -1
- package/dist/pivot-table/use-get-pivot-table-query.d.ts +2 -1
- package/dist/props.d.ts +57 -2
- package/dist/query/date-formats/apply-date-format.d.ts +0 -1
- package/dist/query/query-result-date-formatting.d.ts +0 -1
- package/dist/query-execution/types.d.ts +11 -1
- package/dist/query-execution/use-execute-pivot-query.d.ts +1 -1
- package/dist/scattermap-chart.d.ts +0 -1
- package/dist/sisense-chart/sisense-chart.d.ts +8 -5
- package/dist/table/table-component.d.ts +8 -0
- package/dist/table/table.d.ts +2 -2
- package/dist/table/translations/design-options.d.ts +3 -0
- package/dist/translation/resources/en.d.ts +11 -1
- package/dist/translation/resources/index.d.ts +22 -2
- package/dist/types.d.ts +72 -7
- package/dist/utils/check-and-notify-about-deprecated-prop.d.ts +1 -0
- package/dist/widgets/drilldown-widget.d.ts +2 -1
- package/package.json +7 -7
|
@@ -16,13 +16,13 @@ export type Layout = {
|
|
|
16
16
|
}[];
|
|
17
17
|
}[];
|
|
18
18
|
};
|
|
19
|
-
export type
|
|
19
|
+
export type FilterDto = {
|
|
20
20
|
isCascading?: false;
|
|
21
21
|
jaql: FilterJaql & AnyObject;
|
|
22
22
|
instanceid?: string;
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export type
|
|
25
|
+
export type CascadingFilterDto = {
|
|
26
26
|
isCascading: true;
|
|
27
27
|
levels: FilterJaql[];
|
|
28
28
|
instanceid?: string;
|
|
@@ -33,7 +33,7 @@ export type DashboardDto = {
|
|
|
33
33
|
title: string;
|
|
34
34
|
datasource: Datasource;
|
|
35
35
|
widgets?: WidgetDto[];
|
|
36
|
-
filters?: Array<
|
|
36
|
+
filters?: Array<FilterDto | CascadingFilterDto>;
|
|
37
37
|
filterRelations?: {
|
|
38
38
|
filterRelations: FilterRelationsModel;
|
|
39
39
|
}[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AreaRangeChartProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* A React component that displays a range of data over a given time period or across multiple categories.
|
|
5
|
+
* It is particularly useful for visualizing the minimum and maximum values in a dataset, along with the area between these values.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* An example of using the component to visualize the `Sample ECommerce` data source:
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <AreaRangeChart
|
|
11
|
+
* dataSet={DM.DataSource}
|
|
12
|
+
* dataOptions={{
|
|
13
|
+
* category: [DM.Commerce.Date.Months],
|
|
14
|
+
* value: [
|
|
15
|
+
* {
|
|
16
|
+
* title: 'Revenue',
|
|
17
|
+
* upperBound: measureFactory.multiply(
|
|
18
|
+
* measureFactory.sum(DM.Commerce.Revenue, 'Lower Revenue'),
|
|
19
|
+
* 0.6,
|
|
20
|
+
* ),
|
|
21
|
+
* lowerBound: measureFactory.multiply(
|
|
22
|
+
* measureFactory.sum(DM.Commerce.Revenue, 'Upper Revenue'),
|
|
23
|
+
* 1.4,
|
|
24
|
+
* ),
|
|
25
|
+
* },
|
|
26
|
+
* {
|
|
27
|
+
* title: 'Cost',
|
|
28
|
+
* upperBound: measureFactory.multiply(
|
|
29
|
+
* measureFactory.sum(DM.Commerce.Cost, 'Lower Cost'),
|
|
30
|
+
* 0.9,
|
|
31
|
+
* ),
|
|
32
|
+
* lowerBound: measureFactory.multiply(
|
|
33
|
+
* measureFactory.sum(DM.Commerce.Cost, 'Upper Cost'),
|
|
34
|
+
* 2.4,
|
|
35
|
+
* ),
|
|
36
|
+
* },
|
|
37
|
+
* ],
|
|
38
|
+
* breakBy: [],
|
|
39
|
+
* }}
|
|
40
|
+
* styleOptions={{
|
|
41
|
+
* legend: {
|
|
42
|
+
* enabled: true,
|
|
43
|
+
* position: 'top',
|
|
44
|
+
* },
|
|
45
|
+
* lineWidth: {
|
|
46
|
+
* width: 'thick',
|
|
47
|
+
* },
|
|
48
|
+
* yAxis: {
|
|
49
|
+
* title: {
|
|
50
|
+
* enabled: true,
|
|
51
|
+
* text: 'ray style options',
|
|
52
|
+
* },
|
|
53
|
+
* enabled: true,
|
|
54
|
+
* gridLines: true,
|
|
55
|
+
* logarithmic: false,
|
|
56
|
+
* },
|
|
57
|
+
* }}
|
|
58
|
+
* />
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* <img src="media://area-range-chart-example-1.png" width="800"/>
|
|
62
|
+
* @param props - Area Range chart properties
|
|
63
|
+
* @returns Area Range Chart component
|
|
64
|
+
* @group Charts
|
|
65
|
+
* @beta
|
|
66
|
+
*/
|
|
67
|
+
export declare const AreaRangeChart: import("react").FunctionComponent<AreaRangeChartProps>;
|
package/dist/areamap-chart.d.ts
CHANGED
package/dist/boxplot-chart.d.ts
CHANGED
package/dist/chart/chart.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChartProps } from '../props';
|
|
3
|
-
/** Function to check if we should wait for sisense context for rendering the chart */
|
|
4
|
-
export declare const shouldSkipSisenseContextWaiting: (props: ChartProps) => boolean;
|
|
5
3
|
/**
|
|
6
4
|
* A React component used for easily switching chart types or rendering multiple series of different chart types.
|
|
7
5
|
*
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
2
|
+
import { ChartData } from '../../chart-data/types';
|
|
3
|
+
import { DesignOptions } from '../../chart-options-processor/translations/types';
|
|
4
|
+
import { ChartProps } from '../../props';
|
|
5
|
+
import { ChartType } from '../../types';
|
|
6
|
+
import { Data, DataSource } from '@sisense/sdk-data';
|
|
7
|
+
import { ChartRendererProps } from '../types';
|
|
8
|
+
type UnpreparedInternalChartProps = {
|
|
9
|
+
dataSet?: DataSource | Data;
|
|
10
|
+
chartType: ChartType;
|
|
11
|
+
chartData: ChartData | null;
|
|
12
|
+
internalDataOptions: ChartDataOptionsInternal;
|
|
13
|
+
designOptions: DesignOptions | null;
|
|
14
|
+
onDataPointClick?: ChartProps['onDataPointClick'];
|
|
15
|
+
onDataPointContextMenu?: ChartProps['onDataPointContextMenu'];
|
|
16
|
+
onDataPointsSelected?: ChartProps['onDataPointsSelected'];
|
|
17
|
+
onBeforeRender?: ChartProps['onBeforeRender'];
|
|
18
|
+
filters?: ChartProps['filters'];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Prepares the props for the chart renderer.
|
|
22
|
+
* @param internalProps - unprepared internal chart props.
|
|
23
|
+
* @returns Chart renderer props or null if the chart props is not ready yet
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function useChartRendererProps(internalProps: UnpreparedInternalChartProps): ChartRendererProps | null;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChartData } from '../chart-data/types';
|
|
2
|
+
import { DesignOptions } from '../chart-options-processor/translations/types';
|
|
3
|
+
import { DataSource } from '@sisense/sdk-data';
|
|
4
|
+
import { ChartDataOptionsInternal, ChartProps, ChartType } from '..';
|
|
5
|
+
/**
|
|
6
|
+
* Props object to be passed to the chart renderer.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export type ChartRendererProps = {
|
|
11
|
+
dataSource?: DataSource | null;
|
|
12
|
+
chartType?: ChartType;
|
|
13
|
+
chartData: ChartData | null;
|
|
14
|
+
dataOptions: ChartDataOptionsInternal;
|
|
15
|
+
designOptions: DesignOptions;
|
|
16
|
+
onDataPointClick?: ChartProps['onDataPointClick'];
|
|
17
|
+
onDataPointContextMenu?: ChartProps['onDataPointContextMenu'];
|
|
18
|
+
onDataPointsSelected?: ChartProps['onDataPointsSelected'];
|
|
19
|
+
onBeforeRender?: ChartProps['onBeforeRender'];
|
|
20
|
+
filters?: ChartProps['filters'];
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataTable } from '../chart-data-processor/table-processor';
|
|
2
|
+
import { RangeChartData } from './types';
|
|
3
|
+
import { RangeChartDataOptionsInternal } from '../chart-data-options/types';
|
|
4
|
+
/**
|
|
5
|
+
* Creates data for range charts given chart data table and data options
|
|
6
|
+
*
|
|
7
|
+
* @param chartDataOptions - Data options for range charts
|
|
8
|
+
* @param dataTable - Chart data table
|
|
9
|
+
* @returns range chart data
|
|
10
|
+
*/
|
|
11
|
+
export declare const rangeData: (chartDataOptions: RangeChartDataOptionsInternal, dataTable: DataTable) => RangeChartData;
|
|
@@ -98,6 +98,19 @@ export type ScattermapChartData = {
|
|
|
98
98
|
type: 'scattermap';
|
|
99
99
|
locations: ScattermapChartLocation[];
|
|
100
100
|
};
|
|
101
|
+
type AreaRangeSeriesValue = [number, number, number];
|
|
102
|
+
export type AreaRangeSeriesValues = {
|
|
103
|
+
name: string;
|
|
104
|
+
title?: string;
|
|
105
|
+
data: AreaRangeSeriesValue[];
|
|
106
|
+
};
|
|
107
|
+
export type RangeChartData = {
|
|
108
|
+
type: 'range';
|
|
109
|
+
xValues: CategoricalXValues[];
|
|
110
|
+
xAxisCount: number;
|
|
111
|
+
series: CategoricalSeriesValues[];
|
|
112
|
+
seriesOther: CartesianChartData;
|
|
113
|
+
};
|
|
101
114
|
/**
|
|
102
115
|
* Fact final data that will be passed to chart-component to render
|
|
103
116
|
*
|
|
@@ -152,4 +165,5 @@ export type BoxplotChartData = {
|
|
|
152
165
|
*
|
|
153
166
|
* @internal
|
|
154
167
|
*/
|
|
155
|
-
export type ChartData = CartesianChartData | CategoricalChartData | ScatterChartData | IndicatorChartData | BoxplotChartData | AreamapData | ScattermapChartData;
|
|
168
|
+
export type ChartData = CartesianChartData | CategoricalChartData | ScatterChartData | IndicatorChartData | BoxplotChartData | AreamapData | ScattermapChartData | RangeChartData;
|
|
169
|
+
export {};
|
|
@@ -339,15 +339,17 @@ export interface AreamapChartDataOptions {
|
|
|
339
339
|
export declare function isMeasureColumn(arg: AnyColumn): arg is MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
|
|
340
340
|
/**
|
|
341
341
|
* Configuration for how to query data and assign data to Table.
|
|
342
|
-
*
|
|
343
342
|
*/
|
|
344
343
|
export interface TableDataOptions {
|
|
345
344
|
/**
|
|
346
345
|
* Columns (or attributes) whose values represent data columns in table
|
|
347
|
-
*
|
|
348
346
|
*/
|
|
349
347
|
columns: (Column | StyledColumn | MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
|
|
350
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Configuration for how to query data and assign data to tabular charts.
|
|
351
|
+
*/
|
|
352
|
+
export type TabularChartDataOptions = TableDataOptions;
|
|
351
353
|
/**
|
|
352
354
|
* Configuration for how to query data and assign data to PivotTable.
|
|
353
355
|
*
|
|
@@ -465,6 +467,43 @@ export type BoxplotChartCustomDataOptions = {
|
|
|
465
467
|
*/
|
|
466
468
|
valueTitle: string;
|
|
467
469
|
};
|
|
470
|
+
export interface AreaRangeMeasureColumn extends ValueStyle, SeriesStyle {
|
|
471
|
+
title: string;
|
|
472
|
+
chartType?: 'arearange';
|
|
473
|
+
lowerBound: MeasureColumn | CalculatedMeasureColumn;
|
|
474
|
+
upperBound: MeasureColumn | CalculatedMeasureColumn;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Configuration for how to query aggregate data and assign data
|
|
478
|
+
* to axes of a Range chart.
|
|
479
|
+
*/
|
|
480
|
+
export interface RangeChartDataOptions {
|
|
481
|
+
/**
|
|
482
|
+
* Columns (or attributes) whose values are placed on the X-axis.
|
|
483
|
+
*
|
|
484
|
+
* Typically, the X-axis represents descriptive data.
|
|
485
|
+
*/
|
|
486
|
+
category: (Column | StyledColumn)[];
|
|
487
|
+
/**
|
|
488
|
+
* An array of measure columns used to represent the target numeric values for computing the metrics
|
|
489
|
+
* in an area range chart.
|
|
490
|
+
*
|
|
491
|
+
* Each measure column defines the range of values by specifying a lower and an upper bound,
|
|
492
|
+
* providing the necessary data to visualize the area range on the chart.
|
|
493
|
+
*/
|
|
494
|
+
value: AreaRangeMeasureColumn[];
|
|
495
|
+
/**
|
|
496
|
+
* Columns (or attributes) by which to break (group) the data represented in the chart.
|
|
497
|
+
*
|
|
498
|
+
* Each group is represented by a different visual encoding - for example, color of bars in a bar chart,
|
|
499
|
+
* and is automatically added to the chart's legend.
|
|
500
|
+
*/
|
|
501
|
+
breakBy: (Column | StyledColumn)[];
|
|
502
|
+
/**
|
|
503
|
+
* Optional mapping of each of the series to colors.
|
|
504
|
+
*/
|
|
505
|
+
seriesToColorMap?: ValueToColorMap;
|
|
506
|
+
}
|
|
468
507
|
/**
|
|
469
508
|
* Configuration for querying aggregate data and assigning data to chart encodings.
|
|
470
509
|
*
|
|
@@ -472,11 +511,16 @@ export type BoxplotChartCustomDataOptions = {
|
|
|
472
511
|
* {@link CategoricalChartDataOptions | Categorical},
|
|
473
512
|
* {@link ScatterChartDataOptions | Scatter},
|
|
474
513
|
* {@link IndicatorChartDataOptions | Indicator},
|
|
514
|
+
* {@link TableDataOptions | Table},
|
|
475
515
|
* {@link BoxplotChartDataOptions | Boxplot},
|
|
476
516
|
* {@link AreamapChartDataOptions | Areamap}, and
|
|
477
517
|
* {@link ScattermapChartDataOptions | Scattermap} charts.
|
|
478
518
|
*/
|
|
479
|
-
export type ChartDataOptions =
|
|
519
|
+
export type ChartDataOptions = RegularChartDataOptions | TabularChartDataOptions;
|
|
520
|
+
/**
|
|
521
|
+
* Configuration for how to query aggregate data and assigning data to chart encodings of regular charts.
|
|
522
|
+
*/
|
|
523
|
+
export type RegularChartDataOptions = CartesianChartDataOptions | CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorChartDataOptions | BoxplotChartDataOptions | BoxplotChartCustomDataOptions | AreamapChartDataOptions | ScattermapChartDataOptions | RangeChartDataOptions;
|
|
480
524
|
/** @internal */
|
|
481
525
|
export interface Category extends CategoryStyle {
|
|
482
526
|
name: string;
|
|
@@ -524,6 +568,14 @@ export interface ScattermapChartDataOptionsInternal {
|
|
|
524
568
|
locationLevel: ScattermapLocationLevel;
|
|
525
569
|
}
|
|
526
570
|
/** @internal */
|
|
571
|
+
export type RangeChartDataOptionsInternal = {
|
|
572
|
+
x: Category[];
|
|
573
|
+
rangeValues: Value[][];
|
|
574
|
+
breakBy: Category[];
|
|
575
|
+
y: Value[];
|
|
576
|
+
seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
|
|
577
|
+
};
|
|
578
|
+
/** @internal */
|
|
527
579
|
export type TableDataOptionsInternal = {
|
|
528
580
|
columns: (Category | Value)[];
|
|
529
581
|
};
|
|
@@ -557,7 +609,7 @@ export interface PivotTableDataOptionsInternal {
|
|
|
557
609
|
grandTotals?: PivotGrandTotals;
|
|
558
610
|
}
|
|
559
611
|
/** @internal */
|
|
560
|
-
export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorChartDataOptionsInternal | BoxplotChartDataOptionsInternal | AreamapChartDataOptionsInternal | ScattermapChartDataOptionsInternal;
|
|
612
|
+
export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorChartDataOptionsInternal | BoxplotChartDataOptionsInternal | AreamapChartDataOptionsInternal | ScattermapChartDataOptionsInternal | RangeChartDataOptionsInternal;
|
|
561
613
|
/** @internal */
|
|
562
614
|
export type IndicatorChartDataOptionsInternal = {
|
|
563
615
|
min?: Value[];
|
|
@@ -129,6 +129,11 @@ export type HighchartsOptionsInternal = {
|
|
|
129
129
|
marginTop?: number;
|
|
130
130
|
alignTicks?: boolean;
|
|
131
131
|
polar: boolean;
|
|
132
|
+
zoomType?: 'x' | 'y';
|
|
133
|
+
scrollablePlotArea?: {
|
|
134
|
+
minWidth?: number;
|
|
135
|
+
scrollPositionX?: number;
|
|
136
|
+
};
|
|
132
137
|
animation?: {
|
|
133
138
|
duration?: number;
|
|
134
139
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RangeChartData } from '../chart-data/types';
|
|
2
|
+
import { ChartDesignOptions } from './translations/types';
|
|
3
|
+
import { ChartType, CompleteThemeSettings } from '../types';
|
|
4
|
+
import { RangeChartDataOptionsInternal } from '../chart-data-options/types';
|
|
5
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
6
|
+
/**
|
|
7
|
+
* Convert intermediate chart data, data options, and design options
|
|
8
|
+
* into pure highcharts config data.
|
|
9
|
+
*
|
|
10
|
+
* @param chartData - the data for the chart in an intermediate format
|
|
11
|
+
* @param chartType -
|
|
12
|
+
* @param chartDesignOptions -
|
|
13
|
+
* @param dataOptions -
|
|
14
|
+
* @param themeSettings -
|
|
15
|
+
* @param dateFormatter
|
|
16
|
+
*/
|
|
17
|
+
export declare const getRangeChartOptions: (chartData: RangeChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: RangeChartDataOptionsInternal, translate: TFunction, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => import("../types").OptionsWithAlerts<import("./chart-options-service").HighchartsOptionsInternal>;
|
|
@@ -60,26 +60,73 @@ export type ScatterChartDesignOptions = BaseDesignOptionsType & {
|
|
|
60
60
|
export type AreamapChartDesignOptions = BaseDesignOptionsType & {
|
|
61
61
|
mapType: AreamapType;
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Configuration for Table color options
|
|
65
|
+
*/
|
|
66
|
+
export type TableColorOptions = {
|
|
67
|
+
/**
|
|
68
|
+
* Boolean flag whether to fill with color
|
|
69
|
+
*/
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Color used for background fill
|
|
73
|
+
*/
|
|
74
|
+
backgroundColor?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Color used for text
|
|
77
|
+
*/
|
|
78
|
+
textColor?: string;
|
|
79
|
+
};
|
|
63
80
|
/**
|
|
64
81
|
* Configuration for Table design options
|
|
65
82
|
*
|
|
66
83
|
*/
|
|
67
84
|
export type TableDesignOptions = {
|
|
68
85
|
/**
|
|
69
|
-
*
|
|
86
|
+
* Vertical padding around whole table
|
|
87
|
+
* Default value is 20
|
|
70
88
|
*
|
|
71
89
|
*/
|
|
72
|
-
|
|
90
|
+
paddingVertical?: number;
|
|
73
91
|
/**
|
|
74
|
-
*
|
|
92
|
+
* Horizontal padding around whole table
|
|
93
|
+
* Default value is 20
|
|
75
94
|
*
|
|
76
95
|
*/
|
|
77
|
-
|
|
96
|
+
paddingHorizontal?: number;
|
|
78
97
|
/**
|
|
79
|
-
*
|
|
80
|
-
|
|
98
|
+
* Header options
|
|
99
|
+
*/
|
|
100
|
+
header?: {
|
|
101
|
+
/**
|
|
102
|
+
* Color of header
|
|
103
|
+
*/
|
|
104
|
+
color?: TableColorOptions;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Columns options
|
|
81
108
|
*/
|
|
82
|
-
|
|
109
|
+
columns?: {
|
|
110
|
+
/**
|
|
111
|
+
* Alternating color for columns
|
|
112
|
+
*/
|
|
113
|
+
alternatingColor?: TableColorOptions;
|
|
114
|
+
/**
|
|
115
|
+
* Modes of columns width
|
|
116
|
+
* 'auto' - all columns will have the same width and fit the table width (no horizontal scroll)
|
|
117
|
+
* 'content' - columns width will be based on content (default option)
|
|
118
|
+
*/
|
|
119
|
+
width?: 'auto' | 'content';
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Rows options
|
|
123
|
+
*/
|
|
124
|
+
rows?: {
|
|
125
|
+
/**
|
|
126
|
+
* Alternating color for rows
|
|
127
|
+
*/
|
|
128
|
+
alternatingColor?: TableColorOptions;
|
|
129
|
+
};
|
|
83
130
|
};
|
|
84
131
|
export type IndicatorStyleType = 'numeric' | 'gauge';
|
|
85
132
|
export type NumericIndicatorSubType = 'numericSimple' | 'numericBar';
|
|
@@ -133,4 +180,5 @@ export type BoxplotChartDesignOptions = BaseDesignOptionsType & {
|
|
|
133
180
|
export type ScattermapChartDesignOptions = BaseDesignOptionsType & {
|
|
134
181
|
markers: Required<ScattermapMarkers>;
|
|
135
182
|
};
|
|
183
|
+
export type AreaRangeChartDesignOptions = BaseDesignOptionsType;
|
|
136
184
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RangeChartDataOptionsInternal } from '../../../chart-data-options/types';
|
|
2
|
+
import { TooltipSettings } from '../tooltip-utils';
|
|
3
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
4
|
+
export declare const getRangeTooltipSettings: (showDecimals: boolean | undefined, chartDataOptions: RangeChartDataOptionsInternal, translate: TFunction) => TooltipSettings;
|
|
@@ -11,6 +11,8 @@ export type TooltipSettings = {
|
|
|
11
11
|
borderRadius?: number;
|
|
12
12
|
borderWidth?: number;
|
|
13
13
|
useHTML?: boolean;
|
|
14
|
+
crosshairs?: boolean;
|
|
15
|
+
shared?: boolean;
|
|
14
16
|
formatter?: () => string;
|
|
15
17
|
style?: {
|
|
16
18
|
fontFamily?: string;
|
|
@@ -26,6 +28,7 @@ export type InternalSeries = {
|
|
|
26
28
|
point: {
|
|
27
29
|
x?: number | string;
|
|
28
30
|
y?: number;
|
|
31
|
+
yBottom?: number;
|
|
29
32
|
z?: number;
|
|
30
33
|
high?: number;
|
|
31
34
|
low?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartType } from '../../types';
|
|
2
|
-
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, AreamapChartDesignOptions, ScattermapChartDesignOptions, BaseDesignOptionsType } from './design-options';
|
|
2
|
+
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, AreamapChartDesignOptions, ScattermapChartDesignOptions, AreaRangeChartDesignOptions, BaseDesignOptionsType } from './design-options';
|
|
3
3
|
export declare const POLAR_CHART_TYPES: readonly ["polar"];
|
|
4
4
|
export type PolarChartType = (typeof POLAR_CHART_TYPES)[number];
|
|
5
5
|
export declare const CARTESIAN_CHART_TYPES: readonly ["line", "area", "bar", "column", "polar"];
|
|
@@ -13,14 +13,16 @@ export declare const SCATTER_CHART_TYPES: readonly ["scatter"];
|
|
|
13
13
|
export type ScatterChartType = (typeof SCATTER_CHART_TYPES)[number];
|
|
14
14
|
export declare const TABLE_TYPES: readonly ["table"];
|
|
15
15
|
/** Table chart types @expandType */
|
|
16
|
-
export type
|
|
16
|
+
export type TableChartType = (typeof TABLE_TYPES)[number];
|
|
17
|
+
/** Table chart types @expandType */
|
|
18
|
+
export type TableType = TableChartType;
|
|
17
19
|
declare const INDICATOR_CHART_TYPES: readonly ["indicator"];
|
|
18
20
|
/** Indicator chart types @expandType */
|
|
19
21
|
export type IndicatorChartType = (typeof INDICATOR_CHART_TYPES)[number];
|
|
20
|
-
declare const BOXPLOT_CHART_TYPES: readonly ["boxplot"];
|
|
22
|
+
export declare const BOXPLOT_CHART_TYPES: readonly ["boxplot"];
|
|
21
23
|
/** Boxplot chart types @expandType */
|
|
22
24
|
export type BoxplotChartType = (typeof BOXPLOT_CHART_TYPES)[number];
|
|
23
|
-
declare const AREAMAP_CHART_TYPES: readonly ["areamap"];
|
|
25
|
+
export declare const AREAMAP_CHART_TYPES: readonly ["areamap"];
|
|
24
26
|
/** Areamap chart types @expandType */
|
|
25
27
|
export type AreamapChartType = (typeof AREAMAP_CHART_TYPES)[number];
|
|
26
28
|
declare const IMAGE_CHART_TYPES: readonly ["image"];
|
|
@@ -28,11 +30,14 @@ export type ImageChartType = (typeof IMAGE_CHART_TYPES)[number];
|
|
|
28
30
|
export declare const SCATTERMAP_CHART_TYPES: readonly ["scattermap"];
|
|
29
31
|
/** Scattermap chart types @expandType */
|
|
30
32
|
export type ScattermapChartType = (typeof SCATTERMAP_CHART_TYPES)[number];
|
|
31
|
-
export
|
|
33
|
+
export declare const RANGE_CHART_TYPES: readonly ["arearange"];
|
|
34
|
+
/** AreaRange chart types @expandType */
|
|
35
|
+
export type RangeChartType = (typeof RANGE_CHART_TYPES)[number];
|
|
36
|
+
export type ChartDataType = 'cartesian' | 'categorical' | 'scatter' | 'table' | 'indicator' | 'areamap' | 'arearange';
|
|
32
37
|
/**
|
|
33
38
|
* Design options for a specific chart type
|
|
34
39
|
*/
|
|
35
|
-
export type DesignOptions<SpecificChartType extends ChartType = ChartType> = SpecificChartType extends 'line' ? LineChartDesignOptions : SpecificChartType extends 'area' ? AreaChartDesignOptions : SpecificChartType extends 'bar' ? BarChartDesignOptions : SpecificChartType extends 'column' ? ColumnChartDesignOptions : SpecificChartType extends 'pie' ? PieChartDesignOptions : SpecificChartType extends 'funnel' ? FunnelChartDesignOptions : SpecificChartType extends 'polar' ? PolarChartDesignOptions : SpecificChartType extends 'indicator' ? IndicatorChartDesignOptions : SpecificChartType extends 'scatter' ? ScatterChartDesignOptions : SpecificChartType extends 'treemap' ? TreemapChartDesignOptions : SpecificChartType extends 'boxplot' ? BoxplotChartDesignOptions : SpecificChartType extends 'areamap' ? AreamapChartDesignOptions : SpecificChartType extends 'scattermap' ? ScattermapChartDesignOptions : never;
|
|
40
|
+
export type DesignOptions<SpecificChartType extends ChartType = ChartType> = SpecificChartType extends 'line' ? LineChartDesignOptions : SpecificChartType extends 'area' ? AreaChartDesignOptions : SpecificChartType extends 'bar' ? BarChartDesignOptions : SpecificChartType extends 'column' ? ColumnChartDesignOptions : SpecificChartType extends 'pie' ? PieChartDesignOptions : SpecificChartType extends 'funnel' ? FunnelChartDesignOptions : SpecificChartType extends 'polar' ? PolarChartDesignOptions : SpecificChartType extends 'indicator' ? IndicatorChartDesignOptions : SpecificChartType extends 'scatter' ? ScatterChartDesignOptions : SpecificChartType extends 'treemap' ? TreemapChartDesignOptions : SpecificChartType extends 'boxplot' ? BoxplotChartDesignOptions : SpecificChartType extends 'areamap' ? AreamapChartDesignOptions : SpecificChartType extends 'scattermap' ? ScattermapChartDesignOptions : SpecificChartType extends 'arearange' ? AreaRangeChartDesignOptions : never;
|
|
36
41
|
/** A unique identifier for a series to be found in {@link ChartDataOptionsInternal} */
|
|
37
42
|
type SeriesId = string;
|
|
38
43
|
/**
|
|
@@ -58,4 +63,5 @@ export declare const isPolar: (chartType: ChartType) => chartType is "polar";
|
|
|
58
63
|
export declare const isTable: (chartType: ChartType | TableType) => chartType is "table";
|
|
59
64
|
export declare const isBoxplot: (chartType: ChartType) => chartType is "boxplot";
|
|
60
65
|
export declare const isAreamap: (chartType: ChartType) => chartType is "areamap";
|
|
66
|
+
export declare const isRange: (chartType: ChartType) => chartType is "arearange";
|
|
61
67
|
export {};
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
import { AreamapChartDataOptionsInternal } from '../../../chart-data-options/types.js';
|
|
3
3
|
import { AreamapData } from '../../../chart-data/types.js';
|
|
4
4
|
import { AreamapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
|
|
5
|
-
import { ThemeSettings } from '../../../types.js';
|
|
6
5
|
import { AreamapDataPointEventHandler } from '../../../props';
|
|
6
|
+
import { ChartRendererProps } from '../../../chart/types.js';
|
|
7
7
|
export type AreamapProps = {
|
|
8
8
|
chartData: AreamapData;
|
|
9
9
|
dataOptions: AreamapChartDataOptionsInternal;
|
|
10
10
|
designOptions: AreamapChartDesignOptions;
|
|
11
|
-
themeSettings: ThemeSettings;
|
|
12
11
|
onDataPointClick?: AreamapDataPointEventHandler;
|
|
13
12
|
};
|
|
14
13
|
export declare const Areamap: React.FC<AreamapProps>;
|
|
15
|
-
export declare const isAreamapProps: (props:
|
|
14
|
+
export declare const isAreamapProps: (props: ChartRendererProps) => props is AreamapProps;
|
|
@@ -3,6 +3,7 @@ import { ScattermapDataPointEventHandler } from '../../../props.js';
|
|
|
3
3
|
import { ScattermapChartDataOptionsInternal } from '../../../chart-data-options/types.js';
|
|
4
4
|
import { ScattermapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
|
|
5
5
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
6
|
+
import { ChartRendererProps } from '../../../chart/types.js';
|
|
6
7
|
export type ScattermapProps = {
|
|
7
8
|
chartData: ScattermapChartData;
|
|
8
9
|
dataOptions: ScattermapChartDataOptionsInternal;
|
|
@@ -12,4 +13,4 @@ export type ScattermapProps = {
|
|
|
12
13
|
onDataPointClick?: ScattermapDataPointEventHandler;
|
|
13
14
|
};
|
|
14
15
|
export declare const Scattermap: ({ chartData, dataOptions, dataSource, filters, designOptions, onDataPointClick, }: ScattermapProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const isScattermapProps: (props:
|
|
16
|
+
export declare const isScattermapProps: (props: ChartRendererProps) => props is ScattermapProps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DataTable } from '../../../chart-data-processor/table-processor';
|
|
2
2
|
export declare const calcColumnWidths: (dataTable: DataTable, isLoading: boolean, isShowFieldTypeIcon: boolean, columnsOptions: {
|
|
3
3
|
isHtml: boolean;
|
|
4
|
+
width?: number;
|
|
4
5
|
}[], fontFamily?: string) => number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Column, DataTable } from '../../chart-data-processor/table-processor';
|
|
2
|
-
import { TableDesignOptions } from '../../chart-options-processor/translations/design-options';
|
|
2
|
+
import { TableColorOptions, TableDesignOptions } from '../../chart-options-processor/translations/design-options';
|
|
3
3
|
import { CompleteThemeSettings } from '../../types';
|
|
4
4
|
import { TableDataOptionsInternal } from '../../chart-data-options/types';
|
|
5
5
|
/**
|
|
@@ -56,9 +56,18 @@ export type TableCustomStyles = {
|
|
|
56
56
|
sortIcon?: 'caret' | 'standard';
|
|
57
57
|
headerHeight?: number;
|
|
58
58
|
rowHeight?: number;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
paddingVertical?: number;
|
|
60
|
+
paddingHorizontal?: number;
|
|
61
|
+
header?: {
|
|
62
|
+
color?: TableColorOptions;
|
|
63
|
+
};
|
|
64
|
+
columns?: {
|
|
65
|
+
alternatingColor?: TableColorOptions;
|
|
66
|
+
width?: 'auto' | 'content';
|
|
67
|
+
};
|
|
68
|
+
rows?: {
|
|
69
|
+
alternatingColor?: TableColorOptions;
|
|
70
|
+
};
|
|
62
71
|
};
|
|
63
72
|
export type TableReducerState = {
|
|
64
73
|
sortedDataTable: DataTable;
|