@sisense/sdk-ui 0.16.0 → 1.1.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/messages/get-widget-options.d.ts +3 -3
- package/dist/ai.js +334 -308
- package/dist/api/rest-api.d.ts +9 -0
- package/dist/app/settings/settings.d.ts +1 -0
- package/dist/area-chart.d.ts +2 -2
- package/dist/areamap-chart.d.ts +28 -0
- package/dist/bar-chart.d.ts +2 -2
- package/dist/boxplot-chart.d.ts +38 -0
- package/dist/boxplot-utils.d.ts +30 -0
- package/dist/chart-data/areamap-data.d.ts +4 -0
- package/dist/chart-data/boxplot-data.d.ts +11 -0
- package/dist/chart-data/cartesian-data.d.ts +6 -3
- package/dist/chart-data/data-coloring/create-data-coloring-function.d.ts +7 -0
- package/dist/chart-data/data-coloring/geo-data-coloring-function.d.ts +2 -0
- package/dist/chart-data/data-coloring/index.d.ts +3 -0
- package/dist/chart-data/{series-data-color-service → data-coloring}/legend-color.d.ts +1 -1
- package/dist/chart-data/data-coloring/series-data-coloring-function.d.ts +11 -0
- package/dist/chart-data/indicator-data.d.ts +2 -2
- package/dist/chart-data/scatter-data.d.ts +2 -2
- package/dist/chart-data/scattermap-data.d.ts +4 -0
- package/dist/chart-data/types.d.ts +74 -3
- package/dist/chart-data-options/translate-boxplot-data-options.d.ts +7 -0
- package/dist/chart-data-options/translate-scattermap-data-options.d.ts +3 -0
- package/dist/chart-data-options/types.d.ts +140 -10
- package/dist/chart-data-options/utils.d.ts +6 -1
- package/dist/chart-options-processor/boxplot-chart-options.d.ts +11 -0
- package/dist/chart-options-processor/chart-options-service.d.ts +24 -6
- package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +3 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +8 -2
- package/dist/chart-options-processor/theme-option-service.d.ts +0 -1
- package/dist/chart-options-processor/translations/axis-section.d.ts +1 -2
- package/dist/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +10 -0
- package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +3 -0
- package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +5 -0
- package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +4 -0
- package/dist/chart-options-processor/translations/design-options.d.ts +15 -2
- package/dist/chart-options-processor/translations/legend-section.d.ts +4 -3
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -1
- package/dist/chart-options-processor/translations/types.d.ts +15 -3
- package/dist/chart-options-processor/translations/value-label-section.d.ts +2 -1
- package/dist/chart.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +2 -2
- package/dist/charts/map-charts/areamap/alternative-country-names-dictionary.d.ts +9 -0
- package/dist/charts/map-charts/areamap/areamap-map.d.ts +16 -0
- package/dist/charts/map-charts/areamap/areamap.d.ts +16 -0
- package/dist/charts/map-charts/areamap/feature-styles-dictionary.d.ts +16 -0
- package/dist/charts/map-charts/areamap/use-geo-json.d.ts +9 -0
- package/dist/charts/map-charts/scattermap/hooks/use-locations.d.ts +3 -0
- package/dist/charts/map-charts/scattermap/hooks/use-settings.d.ts +5 -0
- package/dist/charts/map-charts/scattermap/hooks/use-tooltip-handler.d.ts +14 -0
- package/dist/charts/map-charts/scattermap/scattermap.d.ts +13 -0
- package/dist/charts/map-charts/scattermap/types.d.ts +16 -0
- package/dist/charts/map-charts/scattermap/utils/color.d.ts +3 -0
- package/dist/charts/map-charts/scattermap/utils/copyright.d.ts +2 -0
- package/dist/charts/map-charts/scattermap/utils/location.d.ts +5 -0
- package/dist/charts/map-charts/scattermap/utils/map.d.ts +2 -0
- package/dist/charts/map-charts/scattermap/utils/markers.d.ts +28 -0
- package/dist/charts/map-charts/scattermap/utils/size.d.ts +2 -0
- package/dist/charts/map-charts/scattermap/utils/tooltip.d.ts +8 -0
- package/dist/charts/map-charts/scattermap/utils/values.d.ts +4 -0
- package/dist/charts/table/types.d.ts +1 -1
- package/dist/column-chart.d.ts +2 -2
- package/dist/common/components/loading-dots.d.ts +4 -0
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +1 -1
- package/dist/dashboard-widget/translate-panel-color-format.d.ts +1 -1
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +4 -3
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +2 -2
- package/dist/dashboard-widget/types.d.ts +28 -3
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -4
- package/dist/decorators/component-decorators/as-sisense-component.d.ts +1 -0
- package/dist/filters/components/common/basic-input.d.ts +1 -1
- package/dist/filters/components/common/date-range-field-button.d.ts +3 -2
- package/dist/filters/components/common/dropdown.d.ts +1 -0
- package/dist/filters/components/common/filter-utils.d.ts +13 -0
- package/dist/filters/components/common/index.d.ts +1 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
- package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +0 -9
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -2
- package/dist/filters/components/criteria-filter-tile/index.d.ts +0 -1
- package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +10 -8
- package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +4 -4
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
- package/dist/filters/components/date-filter/index.d.ts +1 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/index.d.ts +1 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-display.d.ts +14 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +36 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +26 -0
- package/dist/filters/components/filter-tile.d.ts +1 -1
- package/dist/filters/index.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4712 -4876
- package/dist/indicator-canvas.d.ts +3 -3
- package/dist/indicator-chart.d.ts +4 -4
- package/dist/line-chart.d.ts +2 -2
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
- package/dist/models/widget/use-get-widget-model.d.ts +1 -0
- package/dist/models/widget/widget-model.d.ts +5 -4
- package/dist/pie-chart.d.ts +2 -2
- package/dist/polar-chart.d.ts +2 -2
- package/dist/props.d.ts +84 -62
- package/dist/query/execute-query.d.ts +1 -1
- package/dist/query-execution/execute-query-by-widget-id.d.ts +10 -2
- package/dist/query-execution/execute-query.d.ts +11 -4
- package/dist/query-execution/index.d.ts +1 -1
- package/dist/query-execution/types.d.ts +10 -8
- package/dist/query-execution/use-execute-csv-query.d.ts +4 -6
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +6 -2
- package/dist/query-execution/use-execute-query.d.ts +2 -2
- package/dist/scatter-chart.d.ts +4 -4
- package/dist/scattermap-chart.d.ts +36 -0
- package/dist/sunburst-chart.d.ts +1 -1
- package/dist/table/hooks/use-table-data.d.ts +3 -2
- package/dist/table/table.d.ts +2 -2
- package/dist/table-widget-4275c061.js +77714 -0
- package/dist/themes/theme-loader.d.ts +0 -1
- package/dist/translation/resources/en.d.ts +25 -0
- package/dist/translation/resources/index.d.ts +50 -0
- package/dist/treemap-chart.d.ts +2 -2
- package/dist/types.d.ts +89 -8
- package/dist/utils/filters-comparator.d.ts +13 -1
- package/dist/widgets/chart-widget-deprecated.d.ts +1 -1
- package/dist/widgets/chart-widget.d.ts +1 -1
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
- package/dist/widgets/common/drilldown.d.ts +12 -2
- package/dist/widgets/drilldown-widget.d.ts +2 -2
- package/package.json +22 -6
- package/dist/chart-data/series-data-color-service/index.d.ts +0 -3
- package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +0 -4
- package/dist/table-widget-5f3b1d03.js +0 -64456
- /package/dist/chart-data/{series-data-color-service → data-coloring}/types.d.ts +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Options, DrilldownOptions, SeriesLegendItemClickCallbackFunction } from '@sisense/sisense-charts';
|
|
2
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
2
3
|
import { ChartData } from '../chart-data/types';
|
|
3
4
|
import { ChartDesignOptions } from './translations/types';
|
|
4
5
|
import { LegendSettings } from './translations/legend-section';
|
|
@@ -9,7 +10,7 @@ import { HighchartsType, HighchartsSeriesValues } from './translations/translati
|
|
|
9
10
|
import { TooltipSettings } from './tooltip';
|
|
10
11
|
import { PieOptions } from './translations/pie-plot-options';
|
|
11
12
|
import { FunnelOptions } from './translations/funnel-plot-options';
|
|
12
|
-
import { ChartType, OptionsWithAlerts, CompleteThemeSettings,
|
|
13
|
+
import { ChartType, OptionsWithAlerts, CompleteThemeSettings, ChartStyleOptions, HighchartsSelectEvent } from '../types';
|
|
13
14
|
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
14
15
|
import { ScatterBubbleOptions } from './translations/scatter-plot-options';
|
|
15
16
|
/**
|
|
@@ -26,10 +27,11 @@ export type HighchartsOptions = Pick<Options, keyof Options>;
|
|
|
26
27
|
* @param chartType -
|
|
27
28
|
* @param chartDesignOptions -
|
|
28
29
|
* @param dataOptions -
|
|
30
|
+
* @param translate - translation function
|
|
29
31
|
* @param themeSettings -
|
|
30
32
|
* @param dateFormatter
|
|
31
33
|
*/
|
|
32
|
-
export declare const highchartsOptionsService: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
34
|
+
export declare const highchartsOptionsService: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, translate: TFunction, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
33
35
|
export type SeriesType = HighchartsSeriesValues & {
|
|
34
36
|
index?: number;
|
|
35
37
|
animation?: boolean;
|
|
@@ -43,6 +45,14 @@ export type SeriesType = HighchartsSeriesValues & {
|
|
|
43
45
|
marker?: MarkerSettings;
|
|
44
46
|
type?: string;
|
|
45
47
|
id?: string;
|
|
48
|
+
medianWidth?: number;
|
|
49
|
+
maxPointWidth?: number;
|
|
50
|
+
minPointWidth?: number;
|
|
51
|
+
whiskerWidth?: number;
|
|
52
|
+
whiskerLength?: number | string;
|
|
53
|
+
fillOpacity?: number;
|
|
54
|
+
strokeOpacity?: number;
|
|
55
|
+
legendIndex?: number;
|
|
46
56
|
};
|
|
47
57
|
type ChartPlotOptions = {
|
|
48
58
|
dataLabels?: ValueLabelSettings;
|
|
@@ -78,6 +88,7 @@ export type PlotOptions = {
|
|
|
78
88
|
allowPointSelect?: boolean;
|
|
79
89
|
boostThreshold?: number;
|
|
80
90
|
turboThreshold?: number;
|
|
91
|
+
softThreshold?: boolean;
|
|
81
92
|
fillOpacity?: number;
|
|
82
93
|
connectNulls?: boolean;
|
|
83
94
|
animation?: {
|
|
@@ -92,6 +103,8 @@ export type PlotOptions = {
|
|
|
92
103
|
funnel?: FunnelOptions;
|
|
93
104
|
bubble?: ScatterBubbleOptions;
|
|
94
105
|
sunburst?: ChartPlotOptions;
|
|
106
|
+
boxplot?: ChartPlotOptions;
|
|
107
|
+
scatter?: ChartPlotOptions;
|
|
95
108
|
};
|
|
96
109
|
/**
|
|
97
110
|
* Highcharts options internal
|
|
@@ -103,6 +116,7 @@ export type HighchartsOptionsInternal = {
|
|
|
103
116
|
events?: {
|
|
104
117
|
load?: () => void;
|
|
105
118
|
redraw?: () => void;
|
|
119
|
+
selection?: (nativeEvent: HighchartsSelectEvent) => void;
|
|
106
120
|
};
|
|
107
121
|
spacing?: number[];
|
|
108
122
|
marginTop?: number;
|
|
@@ -111,6 +125,9 @@ export type HighchartsOptionsInternal = {
|
|
|
111
125
|
animation?: {
|
|
112
126
|
duration?: number;
|
|
113
127
|
};
|
|
128
|
+
zooming?: {
|
|
129
|
+
type: string;
|
|
130
|
+
};
|
|
114
131
|
};
|
|
115
132
|
title?: {
|
|
116
133
|
text: string | null;
|
|
@@ -155,15 +172,16 @@ type Navigator = {
|
|
|
155
172
|
dataGrouping: {
|
|
156
173
|
enabled: boolean;
|
|
157
174
|
};
|
|
175
|
+
color?: string;
|
|
158
176
|
};
|
|
159
177
|
enabled: boolean;
|
|
160
178
|
margin: number;
|
|
161
179
|
height: number;
|
|
162
180
|
xAxis: AxisSettings;
|
|
163
181
|
handles: {
|
|
164
|
-
symbols
|
|
165
|
-
backgroundColor
|
|
166
|
-
borderColor
|
|
182
|
+
symbols?: string[];
|
|
183
|
+
backgroundColor?: string;
|
|
184
|
+
borderColor?: string;
|
|
167
185
|
};
|
|
168
186
|
maskInside: boolean;
|
|
169
187
|
maskFill: string;
|
|
@@ -175,7 +193,7 @@ type Navigator = {
|
|
|
175
193
|
right: string;
|
|
176
194
|
};
|
|
177
195
|
};
|
|
178
|
-
declare const DEFAULT_STYLE_OPTIONS:
|
|
196
|
+
declare const DEFAULT_STYLE_OPTIONS: ChartStyleOptions;
|
|
179
197
|
/**
|
|
180
198
|
* Returns default style options, which can be used as base for custom style options.
|
|
181
199
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartType,
|
|
1
|
+
import { ChartType, ChartStyleOptions } from '../../types';
|
|
2
2
|
import { ChartDesignOptions } from '../translations/types';
|
|
3
3
|
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
4
|
-
export declare const translateStyleOptionsToDesignOptions: (chartType: ChartType, styleOptions:
|
|
4
|
+
export declare const translateStyleOptionsToDesignOptions: (chartType: ChartType, styleOptions: ChartStyleOptions, dataOptions: ChartDataOptionsInternal) => ChartDesignOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
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';
|
|
1
|
+
import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions } from '../../types';
|
|
2
|
+
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions } from '../translations/design-options';
|
|
3
3
|
import { LegendPosition } from '../translations/legend-section';
|
|
4
4
|
import { StackType } from '../translations/translations-to-highcharts';
|
|
5
5
|
export declare const getLegend: (legend?: Legend) => LegendPosition;
|
|
@@ -14,3 +14,5 @@ export declare const getTreemapChartDesignOptions: (styleOptions: TreemapStyleOp
|
|
|
14
14
|
export declare const getSunburstChartDesignOptions: (styleOptions: SunburstStyleOptions) => SunburstChartDesignOptions;
|
|
15
15
|
export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions) => PolarChartDesignOptions;
|
|
16
16
|
export declare const getScatterChartDesignOptions: (styleOptions: ScatterStyleOptions) => ScatterChartDesignOptions;
|
|
17
|
+
export declare const getBoxplotChartDesignOptions: (styleOptions: BoxplotStyleOptions) => BoxplotChartDesignOptions;
|
|
18
|
+
export declare const getScattermapChartDesignOptions: (styleOptions: ScattermapStyleOptions) => ScattermapChartDesignOptions;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LineType, StackType } from './translations/translations-to-highcharts';
|
|
2
|
-
import { IndicatorStyleType, PolarType } from './translations/design-options';
|
|
2
|
+
import { IndicatorStyleType, PolarType, BoxplotType } from './translations/design-options';
|
|
3
|
+
import { AreamapType } from '../types';
|
|
3
4
|
/**
|
|
4
5
|
* Property of {@link LineStyleOptions}
|
|
5
6
|
*
|
|
@@ -88,11 +89,16 @@ export type IndicatorSubtype = 'indicator/numeric' | 'indicator/gauge';
|
|
|
88
89
|
*/
|
|
89
90
|
export type TreemapSubtype = 'treemap';
|
|
90
91
|
export type SunburstSubtype = 'sunburst';
|
|
91
|
-
export type
|
|
92
|
+
export type BoxplotSubtype = 'boxplot/full' | 'boxplot/hollow';
|
|
93
|
+
export type ScattermapSubtype = 'scattermap';
|
|
94
|
+
export type AreamapSubtype = 'areamap/world' | 'areamap/usa';
|
|
95
|
+
export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype | BoxplotSubtype | ScattermapSubtype | AreamapSubtype;
|
|
92
96
|
export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
|
|
93
97
|
lineType?: LineType | undefined;
|
|
94
98
|
stackType?: StackType | undefined;
|
|
95
99
|
pieType?: "classic" | "donut" | "ring" | undefined;
|
|
96
100
|
polarType?: PolarType | undefined;
|
|
97
101
|
indicatorType?: IndicatorStyleType | undefined;
|
|
102
|
+
boxplotType?: BoxplotType | undefined;
|
|
103
|
+
mapType?: AreamapType | undefined;
|
|
98
104
|
}>>;
|
|
@@ -5,7 +5,6 @@ export declare const applyThemeToChart: (chartOptions: HighchartsOptionsInternal
|
|
|
5
5
|
* Returns default theme settings, which can be used as base for custom theme options.
|
|
6
6
|
*
|
|
7
7
|
* @returns Theme settings object
|
|
8
|
-
*
|
|
9
8
|
* @internal
|
|
10
9
|
*/
|
|
11
10
|
export declare const getDefaultThemeSettings: () => CompleteThemeSettings;
|
|
@@ -19,7 +19,7 @@ export type AxisMinMax = {
|
|
|
19
19
|
max: number;
|
|
20
20
|
};
|
|
21
21
|
export type AxisOrientation = 'horizontal' | 'vertical';
|
|
22
|
-
interface AxisLabelsFormatterContextObject {
|
|
22
|
+
export interface AxisLabelsFormatterContextObject {
|
|
23
23
|
value: string | number;
|
|
24
24
|
axis: {
|
|
25
25
|
categories: (string | number)[];
|
|
@@ -105,4 +105,3 @@ export declare const getDateFormatter: (category: Category, dateFormatter?: ((da
|
|
|
105
105
|
export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
|
|
106
106
|
export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
|
|
107
107
|
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => [AxisSettings[], AxisClipped[]];
|
|
108
|
-
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoxplotChartData } from '../../../chart-data/types';
|
|
2
|
+
import { Axis, AxisSettings } from '../axis-section';
|
|
3
|
+
import { Value, type Category } from '../../../chart-data-options/types';
|
|
4
|
+
export declare const commonColor = "#d1d1d7";
|
|
5
|
+
export declare const calculateYAxisMinMax: (chartData: BoxplotChartData) => {
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const getBoxplotXAxisSettings: (axis: Axis, categories: string[], axisDataOption?: Category) => AxisSettings[];
|
|
10
|
+
export declare const getBoxplotYAxisSettings: (axis: Axis, chartData: BoxplotChartData, axisDataOption?: Value) => AxisSettings[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SeriesType } from '../../chart-options-service.js';
|
|
2
|
+
import { BoxplotChartData } from '../../../chart-data/types.js';
|
|
3
|
+
import { SeriesWithAlerts } from '../../../types.js';
|
|
4
|
+
import { BoxplotChartDesignOptions } from '../design-options.js';
|
|
5
|
+
export declare const buildBoxplotSeries: (data: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions) => SeriesWithAlerts<SeriesType[]>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
2
|
+
import { BoxplotChartDataOptionsInternal } from '../../../chart-data-options/types';
|
|
3
|
+
import { TooltipSettings } from '../tooltip-utils';
|
|
4
|
+
export declare const getBoxplotTooltipSettings: (dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction) => TooltipSettings;
|
|
@@ -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, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
|
|
8
|
+
import { AreamapType, Convolution, ScattermapMarkers, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
|
|
9
9
|
import { ScatterMarkerSize } from './scatter-plot-options';
|
|
10
10
|
type DataLimits = {
|
|
11
11
|
seriesCapacity: number;
|
|
@@ -48,6 +48,12 @@ export type SunburstChartDesignOptions = BaseDesignOptionsType & SunburstStyleOp
|
|
|
48
48
|
export type ScatterChartDesignOptions = BaseDesignOptionsType & {
|
|
49
49
|
markerSize?: ScatterMarkerSize;
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Configuration for Areamap design options
|
|
53
|
+
*/
|
|
54
|
+
export type AreamapChartDesignOptions = BaseDesignOptionsType & {
|
|
55
|
+
mapType: AreamapType;
|
|
56
|
+
};
|
|
51
57
|
/**
|
|
52
58
|
* Configuration for Table design options
|
|
53
59
|
*
|
|
@@ -81,7 +87,7 @@ export type IndicatorComponents = {
|
|
|
81
87
|
/** The text of the title */
|
|
82
88
|
text?: string;
|
|
83
89
|
};
|
|
84
|
-
/** The secondary title of the indicator chart to be shown when `secondary` is specified in {@link
|
|
90
|
+
/** The secondary title of the indicator chart to be shown when `secondary` is specified in {@link IndicatorChartDataOptions} */
|
|
85
91
|
secondaryTitle?: {
|
|
86
92
|
/** The text of the secondary title */
|
|
87
93
|
text?: string;
|
|
@@ -116,4 +122,11 @@ export type PolarType = 'line' | 'area' | 'column';
|
|
|
116
122
|
export type PolarChartDesignOptions = BaseDesignOptionsType & {
|
|
117
123
|
polarType: PolarType;
|
|
118
124
|
};
|
|
125
|
+
export type BoxplotType = 'full' | 'hollow';
|
|
126
|
+
export type BoxplotChartDesignOptions = BaseDesignOptionsType & {
|
|
127
|
+
boxplotType: BoxplotType;
|
|
128
|
+
};
|
|
129
|
+
export type ScattermapChartDesignOptions = BaseDesignOptionsType & {
|
|
130
|
+
markers: Required<ScattermapMarkers>;
|
|
131
|
+
};
|
|
119
132
|
export {};
|
|
@@ -2,9 +2,9 @@ import { Style } from '../chart-options-service';
|
|
|
2
2
|
export type LegendPosition = 'top' | 'left' | 'right' | 'bottom' | null;
|
|
3
3
|
export type LegendSettings = {
|
|
4
4
|
enabled: boolean;
|
|
5
|
-
align
|
|
6
|
-
verticalAlign
|
|
7
|
-
layout
|
|
5
|
+
align?: 'center' | 'left' | 'right';
|
|
6
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
7
|
+
layout?: 'horizontal' | 'vertical';
|
|
8
8
|
itemStyle?: Style & {
|
|
9
9
|
cursor?: string;
|
|
10
10
|
};
|
|
@@ -19,6 +19,7 @@ export type LegendSettings = {
|
|
|
19
19
|
[key: string]: string | number;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
maxHeight?: number;
|
|
22
23
|
};
|
|
23
24
|
export declare const legendItemStyleDefault: LegendSettings['itemStyle'];
|
|
24
25
|
export declare const getLegendSettings: (position: LegendPosition) => LegendSettings;
|
|
@@ -65,9 +65,13 @@ export declare const addStackingIfSpecified: (chartType: ChartType, designOption
|
|
|
65
65
|
* @param categories -
|
|
66
66
|
* @param index -
|
|
67
67
|
*/
|
|
68
|
-
export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (
|
|
68
|
+
export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (-1 | 0)[];
|
|
69
69
|
export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string, yAxisSettings: AxisSettings, axisClipped: AxisClipped) => HighchartsSeriesValues;
|
|
70
70
|
export declare const formatSeries: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, categories?: string[], categoryColors?: string[]) => HighchartsSeriesValues;
|
|
71
|
+
export declare const adjustMinMaxWhenInvalid: (explicitAxis: AxisMinMax, autoMinMax: AxisMinMax) => {
|
|
72
|
+
min: number;
|
|
73
|
+
max: number;
|
|
74
|
+
};
|
|
71
75
|
export declare const adjustMinWhenColumnBar: (chartType: ChartType, autoMinMax: AxisMinMax) => {
|
|
72
76
|
min: number;
|
|
73
77
|
max: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
2
2
|
import { ChartType } from '../../types';
|
|
3
|
-
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions } from './design-options';
|
|
3
|
+
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, AreamapChartDesignOptions, ScattermapChartDesignOptions } from './design-options';
|
|
4
4
|
export declare const POLAR_CHART_TYPES: readonly ["polar"];
|
|
5
5
|
export type PolarChartType = (typeof POLAR_CHART_TYPES)[number];
|
|
6
6
|
export declare const CARTESIAN_CHART_TYPES: readonly ["line", "area", "bar", "column", "polar"];
|
|
@@ -18,10 +18,19 @@ export type TableType = (typeof TABLE_TYPES)[number];
|
|
|
18
18
|
declare const INDICATOR_CHART_TYPES: readonly ["indicator"];
|
|
19
19
|
/** Indicator chart types @expandType */
|
|
20
20
|
export type IndicatorChartType = (typeof INDICATOR_CHART_TYPES)[number];
|
|
21
|
+
declare const BOXPLOT_CHART_TYPES: readonly ["boxplot"];
|
|
22
|
+
/** Boxplot chart types @expandType */
|
|
23
|
+
export type BoxplotChartType = (typeof BOXPLOT_CHART_TYPES)[number];
|
|
24
|
+
declare const AREAMAP_CHART_TYPES: readonly ["areamap"];
|
|
25
|
+
/** Areamap chart types @expandType */
|
|
26
|
+
export type AreamapChartType = (typeof AREAMAP_CHART_TYPES)[number];
|
|
21
27
|
declare const IMAGE_CHART_TYPES: readonly ["image"];
|
|
22
28
|
export type ImageChartType = (typeof IMAGE_CHART_TYPES)[number];
|
|
23
|
-
export
|
|
24
|
-
|
|
29
|
+
export declare const SCATTERMAP_CHART_TYPES: readonly ["scattermap"];
|
|
30
|
+
/** Scattermap chart types @expandType */
|
|
31
|
+
export type ScattermapChartType = (typeof SCATTERMAP_CHART_TYPES)[number];
|
|
32
|
+
export type ChartDataType = 'cartesian' | 'categorical' | 'scatter' | 'table' | 'indicator' | 'areamap';
|
|
33
|
+
export type ChartDesignOptions = LineChartDesignOptions | AreaChartDesignOptions | BarChartDesignOptions | ColumnChartDesignOptions | PieChartDesignOptions | FunnelChartDesignOptions | PolarChartDesignOptions | IndicatorChartDesignOptions | ScatterChartDesignOptions | TreemapChartDesignOptions | BoxplotChartDesignOptions | AreamapChartDesignOptions | ScattermapChartDesignOptions;
|
|
25
34
|
export type ChartConfig = {
|
|
26
35
|
chartType: ChartType;
|
|
27
36
|
dataOptions: ChartDataOptionsInternal;
|
|
@@ -30,7 +39,10 @@ export type ChartConfig = {
|
|
|
30
39
|
export declare const isCartesian: (chartType: ChartType) => chartType is "area" | "line" | "bar" | "column" | "polar";
|
|
31
40
|
export declare const isCategorical: (chartType: ChartType) => chartType is "pie" | "funnel" | "treemap" | "sunburst";
|
|
32
41
|
export declare const isScatter: (chartType: ChartType) => chartType is "scatter";
|
|
42
|
+
export declare const isScattermap: (chartType: ChartType) => chartType is "scattermap";
|
|
33
43
|
export declare const isIndicator: (chartType: ChartType) => chartType is "indicator";
|
|
34
44
|
export declare const isPolar: (chartType: ChartType) => chartType is "polar";
|
|
35
45
|
export declare const isTable: (chartType: ChartType | TableType) => chartType is "table";
|
|
46
|
+
export declare const isBoxplot: (chartType: ChartType) => chartType is "boxplot";
|
|
47
|
+
export declare const isAreamap: (chartType: ChartType) => chartType is "areamap";
|
|
36
48
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataLabelsOptions } from '@sisense/sisense-charts';
|
|
1
2
|
import { Style } from '../chart-options-service';
|
|
2
3
|
import { NumberFormatConfig } from './number-format-config';
|
|
3
4
|
import { AxisOrientation } from './axis-section';
|
|
@@ -21,7 +22,7 @@ export type ValueLabelSettings = {
|
|
|
21
22
|
relative: boolean;
|
|
22
23
|
totals: boolean;
|
|
23
24
|
};
|
|
24
|
-
formatter?: (this: InternalSeries) => string;
|
|
25
|
+
formatter?: (this: InternalSeries, options?: DataLabelsOptions, valuePropName?: string) => string;
|
|
25
26
|
};
|
|
26
27
|
export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig) => (this: InternalSeries) => string;
|
|
27
28
|
export declare const getValueLabelSettings: (xAxisOrientation: AxisOrientation, valueLabel: ValueLabel, inside?: boolean) => ValueLabelSettings;
|
package/dist/chart.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ export declare const shouldSkipSisenseContextWaiting: (props: ChartProps) => boo
|
|
|
14
14
|
* dataSet={DM.DataSource}
|
|
15
15
|
* dataOptions={{
|
|
16
16
|
* category: [DM.Commerce.AgeRange],
|
|
17
|
-
* value: [
|
|
17
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue)],
|
|
18
18
|
* breakBy: [DM.Commerce.Gender],
|
|
19
19
|
* }}
|
|
20
|
-
* filters={[
|
|
20
|
+
* filters={[filterFactory.members(DM.Commerce.Gender,['Female', 'Male'])]}
|
|
21
21
|
* onDataPointClick= {(point, nativeEvent) => { console.log('clicked', point, nativeEvent); }}
|
|
22
22
|
* />
|
|
23
23
|
* ```
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IndicatorChartDataOptions } from '../../chart-data-options/types';
|
|
2
2
|
import { IndicatorChartDesignOptions } from '../../chart-options-processor/translations/design-options';
|
|
3
3
|
import { IndicatorChartData } from '../../chart-data/types';
|
|
4
4
|
import { LegacyIndicatorChartTypes } from './types';
|
|
5
5
|
export type IndicatorLegacyChartDataOptions = ReturnType<typeof createLegacyChartDataOptions>;
|
|
6
|
-
export declare const createLegacyChartDataOptions: (chartData: IndicatorChartData, chartDesignOptions: IndicatorChartDesignOptions, chartDataOptions:
|
|
6
|
+
export declare const createLegacyChartDataOptions: (chartData: IndicatorChartData, chartDesignOptions: IndicatorChartDesignOptions, chartDataOptions: IndicatorChartDataOptions) => {
|
|
7
7
|
type: LegacyIndicatorChartTypes;
|
|
8
8
|
skin: 1 | 2 | "vertical" | "horizontal";
|
|
9
9
|
title: {
|
package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IndicatorStyleType, NumericIndicatorSubType } from '../../../chart-options-processor/translations/design-options';
|
|
2
|
-
import {
|
|
2
|
+
import { IndicatorChartDataOptions, ThemeSettings } from '../../../types';
|
|
3
3
|
import { LegacyIndicatorChartOptions } from '../types';
|
|
4
4
|
import { IndicatorChartData } from '../../../chart-data/types';
|
|
5
5
|
export type ChartRenderingOptions = {
|
|
6
6
|
chartData: IndicatorChartData;
|
|
7
|
-
dataOptions:
|
|
7
|
+
dataOptions: IndicatorChartDataOptions;
|
|
8
8
|
themeSettings?: ThemeSettings;
|
|
9
9
|
};
|
|
10
10
|
export type IndicatorTypeOptions = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IndicatorChartDataOptions, ConditionalDataColorOptions, DataColorOptions, UniformDataColorOptions } from '../../../types';
|
|
2
2
|
import { LegacyIndicatorChartOptions } from '../types';
|
|
3
3
|
import { IndicatorTypeOptions } from './indicator-legacy-chart-options';
|
|
4
4
|
/**
|
|
@@ -15,7 +15,7 @@ export type AllowedIndicatorColoringTypes = 'Static' | 'Absolute';
|
|
|
15
15
|
* @param dataOptions - The indicator data options to extract the color options from.
|
|
16
16
|
* @returns The color options from the indicator data options.
|
|
17
17
|
*/
|
|
18
|
-
export declare function getValueColorOptions(dataOptions:
|
|
18
|
+
export declare function getValueColorOptions(dataOptions: IndicatorChartDataOptions): DataColorOptions | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* Overrides the value color in the legacy indicator chart options with the specified color.
|
|
21
21
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of alternative country names (synonyms) that can be used to match country names from data.
|
|
3
|
+
* For example, 'United States', 'USA' and 'United States of America' should be understood as the same country.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ALTERNATIVE_COUNTRY_NAMES_DICTIONARY: {
|
|
6
|
+
officialName: string;
|
|
7
|
+
allNames: string[];
|
|
8
|
+
id: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
3
|
+
import { GeoDataElement } from '../../../chart-data/types.js';
|
|
4
|
+
import { AreamapType } from '../../../types.js';
|
|
5
|
+
export type AreamapProps = {
|
|
6
|
+
geoJson: GeoJsonFeatureCollection;
|
|
7
|
+
geoData: GeoDataElement[];
|
|
8
|
+
dataOptions: {
|
|
9
|
+
originalValueTitle: string;
|
|
10
|
+
};
|
|
11
|
+
mapType: AreamapType;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Component that renders a map with areas (countries or states) for using in Areamap chart
|
|
15
|
+
*/
|
|
16
|
+
export declare const AreamapMap: React.FC<AreamapProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AreamapChartDataOptionsInternal, ChartDataOptionsInternal } from '../../../chart-data-options/types.js';
|
|
3
|
+
import { AreamapData, ChartData } from '../../../chart-data/types.js';
|
|
4
|
+
import { AreamapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
|
|
5
|
+
import { ChartDesignOptions } from '../../../chart-options-processor/translations/types.js';
|
|
6
|
+
import { ThemeSettings } from '../../../types.js';
|
|
7
|
+
export type AreamapChartProps = {
|
|
8
|
+
chartData: AreamapData;
|
|
9
|
+
dataOptions: AreamapChartDataOptionsInternal;
|
|
10
|
+
designOptions: AreamapChartDesignOptions;
|
|
11
|
+
themeSettings: ThemeSettings;
|
|
12
|
+
};
|
|
13
|
+
export declare const Areamap: React.FC<AreamapChartProps>;
|
|
14
|
+
export declare const isAreamapData: (chartData: ChartData) => chartData is AreamapData;
|
|
15
|
+
export declare const isAreamapDataOptions: (dataOptions: ChartDataOptionsInternal) => dataOptions is AreamapChartDataOptionsInternal;
|
|
16
|
+
export declare const isAreamapChartDesignOptions: (designOptions: ChartDesignOptions) => designOptions is AreamapChartDesignOptions;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Feature as GeoJsonFeature } from 'geojson';
|
|
2
|
+
import { PathOptions } from 'leaflet';
|
|
3
|
+
import { GeoDataElement } from '../../../chart-data/types.js';
|
|
4
|
+
import { AreamapType } from '../../../types.js';
|
|
5
|
+
export type FeatureId = GeoJsonFeature['id'] & string;
|
|
6
|
+
export type FeatureInfo = {
|
|
7
|
+
/** Corresponding GeoDataElement from GeoData */
|
|
8
|
+
geoDataElement?: GeoDataElement;
|
|
9
|
+
style: PathOptions;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export type FeaturesDictionary = Record<FeatureId, FeatureInfo>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a dictionary of feature styles for each feature in geoJson
|
|
15
|
+
*/
|
|
16
|
+
export declare function createFeatureStylesDictionary(geoFeatures: GeoJsonFeature[], geoData: GeoDataElement[], mapType: AreamapType): FeaturesDictionary;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
2
|
+
import { AreamapType } from '../../../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to get geoJson from API or cache (LocalStorage)
|
|
5
|
+
*/
|
|
6
|
+
export declare const useGeoJson: (mapType: AreamapType) => {
|
|
7
|
+
geoJson: GeoJsonFeatureCollection | undefined;
|
|
8
|
+
error: Error | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ScattermapLocationLevel } from '../../../../chart-data-options/types.js';
|
|
2
|
+
import { ScattermapChartLocation } from '../../../../chart-data/types';
|
|
3
|
+
export declare const useLocations: (locations: ScattermapChartLocation[], locationLevel: ScattermapLocationLevel) => ScattermapChartLocation[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ScattermapChartLocation } from '../../../../chart-data/types';
|
|
2
|
+
import { ScattermapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
|
|
3
|
+
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
4
|
+
export type TooltipOptions = {
|
|
5
|
+
content: string;
|
|
6
|
+
postponedContent?: Promise<string>;
|
|
7
|
+
};
|
|
8
|
+
type TooltipHandler = (location: ScattermapChartLocation) => TooltipOptions;
|
|
9
|
+
export declare const useTooltipHandler: ({ dataOptions, dataSource, filters, }: {
|
|
10
|
+
dataOptions: ScattermapChartDataOptionsInternal;
|
|
11
|
+
dataSource: DataSource | null;
|
|
12
|
+
filters?: Filter[] | undefined;
|
|
13
|
+
}) => TooltipHandler;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ScattermapChartData } from '../../../chart-data/types.js';
|
|
3
|
+
import { ScattermapChartDataOptionsInternal } from '../../../chart-data-options/types.js';
|
|
4
|
+
import { ScattermapChartDesignOptions } from '../../../chart-options-processor/translations/design-options.js';
|
|
5
|
+
import { DataSource, Filter, FilterRelation } from '@sisense/sdk-data';
|
|
6
|
+
export type ScattermapProps = {
|
|
7
|
+
chartData: ScattermapChartData;
|
|
8
|
+
dataOptions: ScattermapChartDataOptionsInternal;
|
|
9
|
+
designOptions: ScattermapChartDesignOptions;
|
|
10
|
+
dataSource: DataSource | null;
|
|
11
|
+
filters?: Filter[] | FilterRelation;
|
|
12
|
+
};
|
|
13
|
+
export declare const Scattermap: ({ chartData, dataOptions, dataSource, filters, designOptions, }: ScattermapProps) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Coordinates = {
|
|
2
|
+
lat: number;
|
|
3
|
+
lng: number;
|
|
4
|
+
};
|
|
5
|
+
export type Location = {
|
|
6
|
+
_id: string;
|
|
7
|
+
lookupKey: string;
|
|
8
|
+
placetype: null | string;
|
|
9
|
+
context: null | string;
|
|
10
|
+
err: null | string;
|
|
11
|
+
latLng: Coordinates;
|
|
12
|
+
name: string;
|
|
13
|
+
place_name: string;
|
|
14
|
+
text: string;
|
|
15
|
+
version: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ScattermapLocationLevel } from 'packages/sdk-ui/src/chart-data-options/types';
|
|
2
|
+
export declare const LOCATION_DELIMITER = ",";
|
|
3
|
+
export declare function combineLocationNames(names: string[]): string;
|
|
4
|
+
export declare function splitLocationName(combinedLocation: string): string[];
|
|
5
|
+
export declare function getLocationGeoLevel(level: ScattermapLocationLevel): "country" | "city" | "adm" | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import leaflet from 'leaflet';
|
|
2
|
+
import { ScattermapMarkers } from 'packages/sdk-ui/src/types';
|
|
3
|
+
type PrepareMarkerOptionsProps = {
|
|
4
|
+
color: string;
|
|
5
|
+
size: number;
|
|
6
|
+
fill: Required<ScattermapMarkers>['fill'];
|
|
7
|
+
blur: boolean;
|
|
8
|
+
};
|
|
9
|
+
type CreateMarkerProps = {
|
|
10
|
+
coordinates: {
|
|
11
|
+
lat: number;
|
|
12
|
+
lng: number;
|
|
13
|
+
};
|
|
14
|
+
style: PrepareMarkerOptionsProps;
|
|
15
|
+
};
|
|
16
|
+
export declare function prepareMarkerOptions(style: PrepareMarkerOptionsProps): {
|
|
17
|
+
radius: number;
|
|
18
|
+
fillOpacity: number;
|
|
19
|
+
opacity: number;
|
|
20
|
+
fillColor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
stroke: boolean;
|
|
23
|
+
weight: number;
|
|
24
|
+
customStyle: PrepareMarkerOptionsProps;
|
|
25
|
+
};
|
|
26
|
+
export declare function createMarker({ coordinates, style }: CreateMarkerProps): leaflet.CircleMarker<any>;
|
|
27
|
+
export declare function removeMarkers(markers: leaflet.CircleMarker[]): void;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScattermapChartLocation } from '../../../../chart-data/types';
|
|
2
|
+
import { ScattermapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
|
|
3
|
+
export declare const enum TooltipShowDetails {
|
|
4
|
+
YES = 0,
|
|
5
|
+
NO = 1,
|
|
6
|
+
LOADING = 2
|
|
7
|
+
}
|
|
8
|
+
export declare const createScattermapTooltip: (location: ScattermapChartLocation, dataOptions: ScattermapChartDataOptionsInternal, showDetails?: TooltipShowDetails) => string;
|