@sisense/sdk-ui 0.12.1 → 0.13.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/chart-data-options/types.d.ts +1 -1
- package/dist/chart-options-processor/chart-options-service.d.ts +6 -2
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +5 -2
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +2 -1
- package/dist/chart-options-processor/tooltip.d.ts +1 -0
- package/dist/chart-options-processor/translations/design-options.d.ts +2 -1
- package/dist/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +12 -0
- package/dist/chart-options-processor/translations/sunburst/sunburst-options.d.ts +6 -0
- package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +37 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +2 -0
- package/dist/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +8 -2
- package/dist/chart-options-processor/translations/types.d.ts +2 -2
- package/dist/chart.d.ts +1 -1
- package/dist/dashboard-widget/types.d.ts +9 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26600 -26155
- package/dist/no-results-overlay/images/index.d.ts +1 -1
- package/dist/props.d.ts +60 -39
- package/dist/query/execute-query.d.ts +13 -2
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +3 -1
- package/dist/query-execution/use-execute-query.d.ts +4 -0
- package/dist/sunburst-chart.d.ts +27 -0
- package/dist/theme-provider/theme-provider.d.ts +1 -1
- package/dist/types.d.ts +19 -1
- package/dist/widgets/chart-widget-deprecated.d.ts +30 -0
- package/dist/widgets/chart-widget.d.ts +1 -5
- package/package.json +5 -5
|
@@ -35,7 +35,7 @@ export interface CategoryStyle {
|
|
|
35
35
|
isColored?: boolean;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* Wrapped {@link @sisense/sdk-data!Column} with styles controlling how the column is visualized in a chart.
|
|
38
|
+
* Wrapped {@link @sisense/sdk-data!Column | Column} with styles controlling how the column is visualized in a chart.
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* An example of using `StyledColumn` to change the date format of the months displayed on the x-axis.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Options, DrilldownOptions } from '@sisense/sisense-charts';
|
|
1
|
+
import type { Options, DrilldownOptions, SeriesLegendItemClickCallbackFunction } from '@sisense/sisense-charts';
|
|
2
2
|
import { ChartData } from '../chart-data/types';
|
|
3
3
|
import { ChartDesignOptions } from './translations/types';
|
|
4
4
|
import { LegendSettings } from './translations/legend-section';
|
|
@@ -53,9 +53,12 @@ type ChartPlotOptions = {
|
|
|
53
53
|
pointPadding?: number;
|
|
54
54
|
pointPlacement?: null;
|
|
55
55
|
animation?: boolean;
|
|
56
|
-
shadow
|
|
56
|
+
shadow?: boolean;
|
|
57
57
|
marker?: MarkerSettings;
|
|
58
58
|
borderWidth?: number;
|
|
59
|
+
events?: {
|
|
60
|
+
legendItemClick?: SeriesLegendItemClickCallbackFunction;
|
|
61
|
+
};
|
|
59
62
|
};
|
|
60
63
|
export type Stacking = 'normal' | 'percent';
|
|
61
64
|
export type PlotOptions = {
|
|
@@ -91,6 +94,7 @@ export type PlotOptions = {
|
|
|
91
94
|
pie?: PieOptions;
|
|
92
95
|
funnel?: FunnelOptions;
|
|
93
96
|
bubble?: ScatterBubbleOptions;
|
|
97
|
+
sunburst?: ChartPlotOptions;
|
|
94
98
|
};
|
|
95
99
|
/**
|
|
96
100
|
* Highcharts options internal
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions } from '../../types';
|
|
2
|
-
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions } from '../translations/design-options';
|
|
1
|
+
import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions } from '../../types';
|
|
2
|
+
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions } from '../translations/design-options';
|
|
3
|
+
import { LegendPosition } from '../translations/legend-section';
|
|
3
4
|
import { StackType } from '../translations/translations-to-highcharts';
|
|
5
|
+
export declare const getLegend: (legend?: Legend) => LegendPosition;
|
|
4
6
|
export declare const DefaultStackType: StackType;
|
|
5
7
|
export declare const getStackableChartDesignOptions: (styleOptions: AreaStyleOptions | StackableStyleOptions, hasY2Axis: boolean) => StackableChartDesignOptions;
|
|
6
8
|
export declare const getLineChartDesignOptions: (styleOptions: LineStyleOptions, hasY2Axis: boolean) => LineChartDesignOptions;
|
|
@@ -9,5 +11,6 @@ export declare const DefaultPieType = "classic";
|
|
|
9
11
|
export declare const getPieChartDesignOptions: (styleOptions: PieStyleOptions) => PieChartDesignOptions;
|
|
10
12
|
export declare const getFunnelChartDesignOptions: (styleOptions: FunnelStyleOptions) => FunnelChartDesignOptions;
|
|
11
13
|
export declare const getTreemapChartDesignOptions: (styleOptions: TreemapStyleOptions) => TreemapChartDesignOptions;
|
|
14
|
+
export declare const getSunburstChartDesignOptions: (styleOptions: SunburstStyleOptions) => SunburstChartDesignOptions;
|
|
12
15
|
export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions) => PolarChartDesignOptions;
|
|
13
16
|
export declare const getScatterChartDesignOptions: (styleOptions: ScatterStyleOptions) => ScatterChartDesignOptions;
|
|
@@ -87,7 +87,8 @@ export type IndicatorSubtype = 'indicator/numeric' | 'indicator/gauge';
|
|
|
87
87
|
* - `treemap` - default treemap.
|
|
88
88
|
*/
|
|
89
89
|
export type TreemapSubtype = 'treemap';
|
|
90
|
-
export type
|
|
90
|
+
export type SunburstSubtype = 'sunburst';
|
|
91
|
+
export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype;
|
|
91
92
|
export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
|
|
92
93
|
lineType?: LineType | undefined;
|
|
93
94
|
stackType?: StackType | undefined;
|
|
@@ -5,7 +5,7 @@ import { LegendPosition } from './legend-section';
|
|
|
5
5
|
import { LineType, StackType } from './translations-to-highcharts';
|
|
6
6
|
import { PieType, PieLabels } from './pie-plot-options';
|
|
7
7
|
import { FunnelSize, FunnelType, FunnelDirection, FunnelLabels } from './funnel-plot-options';
|
|
8
|
-
import { Convolution, TreemapStyleOptions } from '../../types';
|
|
8
|
+
import { Convolution, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
|
|
9
9
|
import { ScatterMarkerSize } from './scatter-plot-options';
|
|
10
10
|
type DataLimits = {
|
|
11
11
|
seriesCapacity: number;
|
|
@@ -44,6 +44,7 @@ export type FunnelChartDesignOptions = BaseDesignOptionsType & {
|
|
|
44
44
|
funnelLabels?: FunnelLabels;
|
|
45
45
|
};
|
|
46
46
|
export type TreemapChartDesignOptions = BaseDesignOptionsType & TreemapStyleOptions;
|
|
47
|
+
export type SunburstChartDesignOptions = BaseDesignOptionsType & SunburstStyleOptions;
|
|
47
48
|
export type ScatterChartDesignOptions = BaseDesignOptionsType & {
|
|
48
49
|
markerSize?: ScatterMarkerSize;
|
|
49
50
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CategoricalChartData } from '../../../chart-data/types';
|
|
2
|
+
import { PointLabelObject } from '@sisense/sisense-charts';
|
|
3
|
+
import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
|
|
4
|
+
import { SunburstChartDesignOptions } from '../design-options';
|
|
5
|
+
import { CompleteThemeSettings } from '../../../types';
|
|
6
|
+
export declare function prepareSunburstLevels(chartData: CategoricalChartData, dataOptions: CategoricalChartDataOptionsInternal, designOptions: SunburstChartDesignOptions, themeSettings?: CompleteThemeSettings): {
|
|
7
|
+
level: number;
|
|
8
|
+
dataLabels: {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
formatter(this: PointLabelObject): string;
|
|
11
|
+
};
|
|
12
|
+
}[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CategoricalChartData } from '../../../chart-data/types';
|
|
2
|
+
import { HighchartsOptionsInternal } from '../../chart-options-service';
|
|
3
|
+
import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
|
|
4
|
+
import { CompleteThemeSettings } from '../../../types';
|
|
5
|
+
import { SunburstChartDesignOptions } from '../design-options';
|
|
6
|
+
export declare function prepareSunburstOptions(chartData: CategoricalChartData, dataOptions: CategoricalChartDataOptionsInternal, designOptions: SunburstChartDesignOptions, themeSettings?: CompleteThemeSettings): HighchartsOptionsInternal;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CategoricalChartData } from '../../../chart-data/types';
|
|
2
|
+
import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options/types';
|
|
3
|
+
import { CompleteThemeSettings } from '../../../types';
|
|
4
|
+
export declare const SUNBURST_ROOT_PARENT_ID = "SUNBURST_ROOT_PARENT_ID";
|
|
5
|
+
export declare function prepareSunburstDataItems(chartData: CategoricalChartData, dataOptions: CategoricalChartDataOptionsInternal, themeSettings?: CompleteThemeSettings): ({
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
custom: {
|
|
9
|
+
level: number;
|
|
10
|
+
levelsCount: number;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
color: string;
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
y?: number | null | undefined;
|
|
16
|
+
x?: number | null | undefined;
|
|
17
|
+
z?: number | null | undefined;
|
|
18
|
+
marker?: {
|
|
19
|
+
enabled?: boolean | undefined;
|
|
20
|
+
isIsolatedPoint?: boolean | undefined;
|
|
21
|
+
lineColor?: string | undefined;
|
|
22
|
+
lineWidth?: number | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
selected?: boolean | undefined;
|
|
25
|
+
custom?: {
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
number1?: number | undefined;
|
|
28
|
+
string1?: string | undefined;
|
|
29
|
+
level?: number | undefined;
|
|
30
|
+
maskedBreakByPoint?: string | undefined;
|
|
31
|
+
maskedBreakByColor?: string | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
value?: number | null | undefined;
|
|
34
|
+
id?: string | undefined;
|
|
35
|
+
drilldown?: string | undefined;
|
|
36
|
+
parent?: string | undefined;
|
|
37
|
+
})[];
|
|
@@ -2,5 +2,11 @@ import { CategoricalChartDataOptionsInternal } from '../../../chart-data-options
|
|
|
2
2
|
import { TreemapChartDesignOptions } from '../design-options';
|
|
3
3
|
import { TooltipSettings } from '../../tooltip';
|
|
4
4
|
import { TooltipFormatterContextObject } from '@sisense/sisense-charts';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type TooltipFormatterOptions = {
|
|
6
|
+
displayTotalContribution: boolean;
|
|
7
|
+
displayColorCircles: boolean;
|
|
8
|
+
shouldSkip: (context: TooltipFormatterContextObject) => boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const getTreemapTooltipSettings: (chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, formatterOptions?: TooltipFormatterOptions) => TooltipSettings;
|
|
11
|
+
export declare function treemapTooltipFormatter(context: TooltipFormatterContextObject, chartDataOptions: CategoricalChartDataOptionsInternal, designOptions: TreemapChartDesignOptions, formatterOptions?: TooltipFormatterOptions): string | false;
|
|
12
|
+
export {};
|
|
@@ -6,7 +6,7 @@ export type PolarChartType = (typeof POLAR_CHART_TYPES)[number];
|
|
|
6
6
|
export declare const CARTESIAN_CHART_TYPES: readonly ["line", "area", "bar", "column", "polar"];
|
|
7
7
|
/** Cartesian family of chart types @expandType */
|
|
8
8
|
export type CartesianChartType = (typeof CARTESIAN_CHART_TYPES)[number];
|
|
9
|
-
export declare const CATEGORICAL_CHART_TYPES: readonly ["pie", "funnel", "treemap"];
|
|
9
|
+
export declare const CATEGORICAL_CHART_TYPES: readonly ["pie", "funnel", "treemap", "sunburst"];
|
|
10
10
|
/** Categorical family of chart types @expandType */
|
|
11
11
|
export type CategoricalChartType = (typeof CATEGORICAL_CHART_TYPES)[number];
|
|
12
12
|
export declare const SCATTER_CHART_TYPES: readonly ["scatter"];
|
|
@@ -28,7 +28,7 @@ export type ChartConfig = {
|
|
|
28
28
|
designOptions: ChartDesignOptions;
|
|
29
29
|
};
|
|
30
30
|
export declare const isCartesian: (chartType: ChartType) => chartType is "area" | "line" | "bar" | "column" | "polar";
|
|
31
|
-
export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap";
|
|
31
|
+
export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap" | "sunburst";
|
|
32
32
|
export declare const isScatter: (chartType: ChartType) => chartType is "scatter";
|
|
33
33
|
export declare const isIndicator: (chartType: ChartType) => chartType is "indicator";
|
|
34
34
|
export declare const isPolar: (chartType: ChartType) => chartType is "polar";
|
package/dist/chart.d.ts
CHANGED
|
@@ -75,6 +75,6 @@ export declare const shouldSkipSisenseContextWaiting: (props: ChartProps) => boo
|
|
|
75
75
|
*
|
|
76
76
|
* <img src="media://chart-local-data-example-1.png" width="800px" />
|
|
77
77
|
* @param props - Chart properties
|
|
78
|
-
* @returns Chart component representing a chart type as specified in `ChartProps.`{@link ChartProps.chartType}
|
|
78
|
+
* @returns Chart component representing a chart type as specified in `ChartProps.`{@link ChartProps.chartType | chartType}
|
|
79
79
|
*/
|
|
80
80
|
export declare const Chart: import("react").FunctionComponent<ChartProps>;
|
|
@@ -6,13 +6,14 @@ export declare const enum WidgetType {
|
|
|
6
6
|
AreaChart = "chart/area",
|
|
7
7
|
FunnelChart = "chart/funnel",
|
|
8
8
|
TreemapChart = "treemap",
|
|
9
|
+
SunburstChart = "sunburst",
|
|
9
10
|
ScatterChart = "chart/scatter",
|
|
10
11
|
IndicatorChart = "indicator",
|
|
11
12
|
PolarChart = "chart/polar",
|
|
12
13
|
Table = "tablewidget",
|
|
13
14
|
TableWithAggregation = "tablewidgetagg"
|
|
14
15
|
}
|
|
15
|
-
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap';
|
|
16
|
+
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst';
|
|
16
17
|
export type Datasource = {
|
|
17
18
|
title: string;
|
|
18
19
|
id: string;
|
|
@@ -327,7 +328,13 @@ export type TreemapWidgetStyle = {
|
|
|
327
328
|
'tooltip/contribution': boolean;
|
|
328
329
|
'tooltip/value': boolean;
|
|
329
330
|
};
|
|
330
|
-
export type
|
|
331
|
+
export type SunburstWidgetStyle = {
|
|
332
|
+
'legend/enabled': boolean;
|
|
333
|
+
'legend/position': 'top' | 'bottom' | 'left' | 'right';
|
|
334
|
+
'tooltip/contribution': boolean;
|
|
335
|
+
'tooltip/value': boolean;
|
|
336
|
+
};
|
|
337
|
+
export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle;
|
|
331
338
|
export declare enum FiltersMergeStrategyEnum {
|
|
332
339
|
WIDGET_FIRST = "widgetFirst",
|
|
333
340
|
CODE_FIRST = "codeFirst",
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from './scatter-chart';
|
|
|
26
26
|
export * from './indicator-chart';
|
|
27
27
|
export * from './table';
|
|
28
28
|
export * from './treemap-chart';
|
|
29
|
+
export * from './sunburst-chart';
|
|
29
30
|
export * from './sisense-context/custom-sisense-context-provider';
|
|
30
31
|
export * from './theme-provider/custom-theme-provider';
|
|
31
32
|
export { getThemeSettingsByOid } from './themes/theme-loader';
|