@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.
Files changed (136) hide show
  1. package/dist/ai/messages/get-widget-options.d.ts +3 -3
  2. package/dist/ai.js +334 -308
  3. package/dist/api/rest-api.d.ts +9 -0
  4. package/dist/app/settings/settings.d.ts +1 -0
  5. package/dist/area-chart.d.ts +2 -2
  6. package/dist/areamap-chart.d.ts +28 -0
  7. package/dist/bar-chart.d.ts +2 -2
  8. package/dist/boxplot-chart.d.ts +38 -0
  9. package/dist/boxplot-utils.d.ts +30 -0
  10. package/dist/chart-data/areamap-data.d.ts +4 -0
  11. package/dist/chart-data/boxplot-data.d.ts +11 -0
  12. package/dist/chart-data/cartesian-data.d.ts +6 -3
  13. package/dist/chart-data/data-coloring/create-data-coloring-function.d.ts +7 -0
  14. package/dist/chart-data/data-coloring/geo-data-coloring-function.d.ts +2 -0
  15. package/dist/chart-data/data-coloring/index.d.ts +3 -0
  16. package/dist/chart-data/{series-data-color-service → data-coloring}/legend-color.d.ts +1 -1
  17. package/dist/chart-data/data-coloring/series-data-coloring-function.d.ts +11 -0
  18. package/dist/chart-data/indicator-data.d.ts +2 -2
  19. package/dist/chart-data/scatter-data.d.ts +2 -2
  20. package/dist/chart-data/scattermap-data.d.ts +4 -0
  21. package/dist/chart-data/types.d.ts +74 -3
  22. package/dist/chart-data-options/translate-boxplot-data-options.d.ts +7 -0
  23. package/dist/chart-data-options/translate-scattermap-data-options.d.ts +3 -0
  24. package/dist/chart-data-options/types.d.ts +140 -10
  25. package/dist/chart-data-options/utils.d.ts +6 -1
  26. package/dist/chart-options-processor/boxplot-chart-options.d.ts +11 -0
  27. package/dist/chart-options-processor/chart-options-service.d.ts +24 -6
  28. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  29. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +3 -0
  30. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
  31. package/dist/chart-options-processor/subtype-to-design-options.d.ts +8 -2
  32. package/dist/chart-options-processor/theme-option-service.d.ts +0 -1
  33. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -2
  34. package/dist/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +10 -0
  35. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +3 -0
  36. package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +5 -0
  37. package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +4 -0
  38. package/dist/chart-options-processor/translations/design-options.d.ts +15 -2
  39. package/dist/chart-options-processor/translations/legend-section.d.ts +4 -3
  40. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
  41. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -1
  42. package/dist/chart-options-processor/translations/types.d.ts +15 -3
  43. package/dist/chart-options-processor/translations/value-label-section.d.ts +2 -1
  44. package/dist/chart.d.ts +2 -2
  45. package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +2 -2
  46. package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +2 -2
  47. package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +2 -2
  48. package/dist/charts/map-charts/areamap/alternative-country-names-dictionary.d.ts +9 -0
  49. package/dist/charts/map-charts/areamap/areamap-map.d.ts +16 -0
  50. package/dist/charts/map-charts/areamap/areamap.d.ts +16 -0
  51. package/dist/charts/map-charts/areamap/feature-styles-dictionary.d.ts +16 -0
  52. package/dist/charts/map-charts/areamap/use-geo-json.d.ts +9 -0
  53. package/dist/charts/map-charts/scattermap/hooks/use-locations.d.ts +3 -0
  54. package/dist/charts/map-charts/scattermap/hooks/use-settings.d.ts +5 -0
  55. package/dist/charts/map-charts/scattermap/hooks/use-tooltip-handler.d.ts +14 -0
  56. package/dist/charts/map-charts/scattermap/scattermap.d.ts +13 -0
  57. package/dist/charts/map-charts/scattermap/types.d.ts +16 -0
  58. package/dist/charts/map-charts/scattermap/utils/color.d.ts +3 -0
  59. package/dist/charts/map-charts/scattermap/utils/copyright.d.ts +2 -0
  60. package/dist/charts/map-charts/scattermap/utils/location.d.ts +5 -0
  61. package/dist/charts/map-charts/scattermap/utils/map.d.ts +2 -0
  62. package/dist/charts/map-charts/scattermap/utils/markers.d.ts +28 -0
  63. package/dist/charts/map-charts/scattermap/utils/size.d.ts +2 -0
  64. package/dist/charts/map-charts/scattermap/utils/tooltip.d.ts +8 -0
  65. package/dist/charts/map-charts/scattermap/utils/values.d.ts +4 -0
  66. package/dist/charts/table/types.d.ts +1 -1
  67. package/dist/column-chart.d.ts +2 -2
  68. package/dist/common/components/loading-dots.d.ts +4 -0
  69. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +1 -1
  70. package/dist/dashboard-widget/translate-panel-color-format.d.ts +1 -1
  71. package/dist/dashboard-widget/translate-widget-data-options.d.ts +4 -3
  72. package/dist/dashboard-widget/translate-widget-style-options.d.ts +2 -2
  73. package/dist/dashboard-widget/types.d.ts +28 -3
  74. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -4
  75. package/dist/decorators/component-decorators/as-sisense-component.d.ts +1 -0
  76. package/dist/filters/components/common/basic-input.d.ts +1 -1
  77. package/dist/filters/components/common/date-range-field-button.d.ts +3 -2
  78. package/dist/filters/components/common/dropdown.d.ts +1 -0
  79. package/dist/filters/components/common/filter-utils.d.ts +13 -0
  80. package/dist/filters/components/common/index.d.ts +1 -0
  81. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
  82. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +0 -9
  83. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -2
  84. package/dist/filters/components/criteria-filter-tile/index.d.ts +0 -1
  85. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +10 -8
  86. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +4 -4
  87. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
  88. package/dist/filters/components/date-filter/index.d.ts +1 -0
  89. package/dist/filters/components/date-filter/relative-date-filter-tile/index.d.ts +1 -0
  90. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-display.d.ts +14 -0
  91. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +36 -0
  92. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +26 -0
  93. package/dist/filters/components/filter-tile.d.ts +1 -1
  94. package/dist/filters/index.d.ts +1 -0
  95. package/dist/index.d.ts +4 -1
  96. package/dist/index.js +4712 -4876
  97. package/dist/indicator-canvas.d.ts +3 -3
  98. package/dist/indicator-chart.d.ts +4 -4
  99. package/dist/line-chart.d.ts +2 -2
  100. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
  101. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
  102. package/dist/models/widget/use-get-widget-model.d.ts +1 -0
  103. package/dist/models/widget/widget-model.d.ts +5 -4
  104. package/dist/pie-chart.d.ts +2 -2
  105. package/dist/polar-chart.d.ts +2 -2
  106. package/dist/props.d.ts +84 -62
  107. package/dist/query/execute-query.d.ts +1 -1
  108. package/dist/query-execution/execute-query-by-widget-id.d.ts +10 -2
  109. package/dist/query-execution/execute-query.d.ts +11 -4
  110. package/dist/query-execution/index.d.ts +1 -1
  111. package/dist/query-execution/types.d.ts +10 -8
  112. package/dist/query-execution/use-execute-csv-query.d.ts +4 -6
  113. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +6 -2
  114. package/dist/query-execution/use-execute-query.d.ts +2 -2
  115. package/dist/scatter-chart.d.ts +4 -4
  116. package/dist/scattermap-chart.d.ts +36 -0
  117. package/dist/sunburst-chart.d.ts +1 -1
  118. package/dist/table/hooks/use-table-data.d.ts +3 -2
  119. package/dist/table/table.d.ts +2 -2
  120. package/dist/table-widget-4275c061.js +77714 -0
  121. package/dist/themes/theme-loader.d.ts +0 -1
  122. package/dist/translation/resources/en.d.ts +25 -0
  123. package/dist/translation/resources/index.d.ts +50 -0
  124. package/dist/treemap-chart.d.ts +2 -2
  125. package/dist/types.d.ts +89 -8
  126. package/dist/utils/filters-comparator.d.ts +13 -1
  127. package/dist/widgets/chart-widget-deprecated.d.ts +1 -1
  128. package/dist/widgets/chart-widget.d.ts +1 -1
  129. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  130. package/dist/widgets/common/drilldown.d.ts +12 -2
  131. package/dist/widgets/drilldown-widget.d.ts +2 -2
  132. package/package.json +22 -6
  133. package/dist/chart-data/series-data-color-service/index.d.ts +0 -3
  134. package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +0 -4
  135. package/dist/table-widget-5f3b1d03.js +0 -64456
  136. /package/dist/chart-data/{series-data-color-service → data-coloring}/types.d.ts +0 -0
@@ -1,4 +1,5 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
+ import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
2
3
  import { WidgetDto } from '../dashboard-widget/types';
3
4
  import type { DashboardDto } from './types/dashboard-dto';
4
5
  type GetDashboardsOptions = {
@@ -25,6 +26,14 @@ export declare class RestApi {
25
26
  * Get a specific widget from a dashboard
26
27
  */
27
28
  getWidget: (widgetOid: string, dashboardOid: string) => Promise<WidgetDto>;
29
+ /**
30
+ * Get a GeoJSON data for all countries
31
+ */
32
+ getCountriesGeoJson: () => Promise<GeoJsonFeatureCollection>;
33
+ /**
34
+ * Get a GeoJSON data for all USA states
35
+ */
36
+ getUsaStatesGeoJson: () => Promise<GeoJsonFeatureCollection>;
28
37
  }
29
38
  export declare const useGetApi: () => RestApi;
30
39
  export {};
@@ -11,6 +11,7 @@ type ConfigurableAppSettings = AppConfig;
11
11
  type ServerSettings = {
12
12
  serverThemeSettings: ThemeSettings;
13
13
  serverLanguage: string;
14
+ serverVersion: string;
14
15
  };
15
16
  /**
16
17
  * Gets the application settings
@@ -12,11 +12,11 @@ import { AreaChartProps } from './props';
12
12
  * dataSet={DM.DataSource}
13
13
  * dataOptions={{
14
14
  * category: [DM.Commerce.Date.Years],
15
- * value: [measures.sum(DM.Commerce.Revenue)],
15
+ * value: [measureFactory.sum(DM.Commerce.Revenue)],
16
16
  * breakBy: [DM.Commerce.Gender],
17
17
  * }}
18
18
  * styleOptions={{ subtype: 'area/stacked' }}
19
- * filters={[filters.members(DM.Commerce.Gender, ['Female', 'Male'])]}
19
+ * filters={[filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])]}
20
20
  * onDataPointClick={(point, nativeEvent) => {
21
21
  * console.log('clicked', point, nativeEvent);
22
22
  * }}
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { AreamapChartProps } from './props';
3
+ /**
4
+ * A React component for visualizing geographical data as polygons on a map.
5
+ * See [Areamap Chart](https://docs.sisense.com/main/SisenseLinux/area-map.htm) for more information.
6
+ *
7
+ * This component is still in beta.
8
+ *
9
+ * @example
10
+ * An example of using the component to visualize the `Sample ECommerce` data source:
11
+ * ```tsx
12
+ * <AreamapChart
13
+ * dataSet={DM.DataSource}
14
+ * dataOptions={{
15
+ * geo: [DM.Country.Country],
16
+ * color: measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
17
+ * }}
18
+ * styleOptions={{
19
+ * mapType: 'world',
20
+ * }}
21
+ * />
22
+ * ```
23
+ *
24
+ * @param props - Areamap chart properties
25
+ * @returns Areamap Chart component
26
+ * @beta
27
+ */
28
+ export declare const AreamapChart: import("react").FunctionComponent<AreamapChartProps>;
@@ -12,10 +12,10 @@ import { BarChartProps } from './props';
12
12
  * dataSet={DM.DataSource}
13
13
  * dataOptions={{
14
14
  * category: [DM.Commerce.AgeRange],
15
- * value: [measures.sum(DM.Commerce.Revenue)],
15
+ * value: [measureFactory.sum(DM.Commerce.Revenue)],
16
16
  * breakBy: [DM.Commerce.Gender],
17
17
  * }}
18
- * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
18
+ * filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
19
19
  * onDataPointClick={(point, nativeEvent) => {
20
20
  * console.log('clicked', point, nativeEvent);
21
21
  * }}
@@ -0,0 +1,38 @@
1
+ /// <reference types="react" />
2
+ import { BoxplotChartProps } from './props';
3
+ /**
4
+ * A React component representing data in a way that visually describes the distribution, variability,
5
+ * and center of a data set along an axis.
6
+ * See [Boxplot Chart](https://docs.sisense.com/main/SisenseLinux/box-and-whisker-plot.htm) for more information.
7
+ *
8
+ * This component is still in beta.
9
+ *
10
+ * @example
11
+ * An example of using the component to visualize the `Sample ECommerce` data source:
12
+ * ```tsx
13
+ * <BoxplotChart
14
+ * dataSet={DM.DataSource}
15
+ * dataOptions={{
16
+ * category: [DM.Category.Category],
17
+ * value: [DM.Commerce.Cost],
18
+ * boxType: 'iqr',
19
+ * outliersEnabled: true,
20
+ * }}
21
+ * filters={[
22
+ * filterFactory.members(DM.Category.Category, ['Calculators', 'DVD Players', 'Routers']),
23
+ * filterFactory.members(DM.Commerce.AgeRange, ['19-24']),
24
+ * ]}
25
+ * styleOptions={{
26
+ * seriesLabels: {
27
+ * enabled: true,
28
+ * }
29
+ * }}
30
+ * />
31
+ * ```
32
+ *
33
+ * <img src="media://boxplot-chart-example-1.png" width="600px" />
34
+ * @param props - Boxplot chart properties
35
+ * @returns Boxplot Chart component
36
+ * @beta
37
+ */
38
+ export declare const BoxplotChart: import("react").FunctionComponent<BoxplotChartProps>;
@@ -0,0 +1,30 @@
1
+ import { Attribute, Measure, Filter, QueryResultData, DataSource } from '@sisense/sdk-data';
2
+ import { ClientApplication } from './app/client-application.js';
3
+ import { BoxplotChartCustomDataOptions, BoxplotChartDataOptionsInternal } from './chart-data-options/types.js';
4
+ /**
5
+ * Processes box whisker data and outliers data to combine them into a single data set.
6
+ *
7
+ * @param {QueryResultData} boxWhiskerData - The data for the box whisker.
8
+ * @param {QueryResultData} outliersData - The data for the outliers.
9
+ * @param {BoxplotChartDataOptionsInternal} [dataOptions] - Optional data options for customizing data processing.
10
+ * @returns {QueryResultData} The combined data with outliers included in the box whisker plot.
11
+ */
12
+ export declare const boxWhiskerProcessResultInternal: (boxWhiskerData: QueryResultData, outliersData: QueryResultData, dataOptions?: BoxplotChartDataOptionsInternal) => QueryResultData;
13
+ /**
14
+ * Processes box whisker data and outliers data to combine them into a single data set.
15
+ *
16
+ * @param {QueryResultData} boxWhiskerData - The data for the box whisker.
17
+ * @param {QueryResultData} outliersData - The data for the outliers.
18
+ * @param {BoxplotChartCustomDataOptions} [dataOptions] - Optional data options for customizing data processing.
19
+ * @returns {QueryResultData} The combined data with outliers included in the box whisker plot.
20
+ */
21
+ export declare function boxWhiskerProcessResult(boxWhiskerData: QueryResultData, outliersData: QueryResultData, dataOptions?: BoxplotChartCustomDataOptions): QueryResultData;
22
+ export declare const executeBoxplotQuery: ({ app, chartDataOptions, dataSource, attributes, measures, filters, highlights, }: {
23
+ app: ClientApplication;
24
+ chartDataOptions: BoxplotChartDataOptionsInternal;
25
+ dataSource?: string | undefined;
26
+ attributes: Attribute[];
27
+ measures: Measure[];
28
+ filters?: Filter[] | undefined;
29
+ highlights?: Filter[] | undefined;
30
+ }) => Promise<QueryResultData>;
@@ -0,0 +1,4 @@
1
+ import { AreamapChartDataOptionsInternal } from '../chart-data-options/types.js';
2
+ import { DataTable } from '../chart-data-processor/table-processor.js';
3
+ import { AreamapData } from './types.js';
4
+ export declare const getAreamapData: (chartDataOptions: AreamapChartDataOptionsInternal, dataTable: DataTable) => AreamapData;
@@ -0,0 +1,11 @@
1
+ import { DataTable } from '../chart-data-processor/table-processor.js';
2
+ import { BoxplotChartData } from './types.js';
3
+ import { BoxplotChartDataOptionsInternal } from '../chart-data-options/types.js';
4
+ /**
5
+ * Creates data for box plot charts given chart data table and data options
6
+ *
7
+ * @param chartDataOptions - Data options for box plot chart
8
+ * @param dataTable - Chart data table
9
+ * @returns Box plot chart data
10
+ */
11
+ export declare const boxplotData: (chartDataOptions: BoxplotChartDataOptionsInternal, dataTable: DataTable) => BoxplotChartData;
@@ -1,5 +1,8 @@
1
- import { DataTable } from '../chart-data-processor/table-processor';
2
- import { CartesianChartData } from './types';
3
- import { CartesianChartDataOptionsInternal } from '../chart-data-options/types';
1
+ import { Column, DataTable } from '../chart-data-processor/table-processor';
2
+ import { CartesianChartData, CategoricalXValues } from './types';
3
+ import { CartesianChartDataOptionsInternal, Value } from '../chart-data-options/types';
4
+ import { SortDirection } from '../types';
4
5
  export declare const validateCartesianChartDataOptions: (chartDataOptions: CartesianChartDataOptionsInternal) => CartesianChartDataOptionsInternal;
5
6
  export declare const cartesianData: (chartDataOptions: CartesianChartDataOptionsInternal, dataTable: DataTable) => CartesianChartData;
7
+ export declare const sortDirection: (sortType: SortDirection | undefined) => 1 | -1 | 0;
8
+ export declare const getOrderedXValues: (dataTable: DataTable, sortedMeasures: Value[], xColumns: Column[], rownumColumnName?: string) => CategoricalXValues[];
@@ -0,0 +1,7 @@
1
+ import { DataColorOptions } from './types';
2
+ export type DataStructureOperator<DataStructure extends {}, ColoredDataStructure extends {}> = {
3
+ getValueFromDataStructure: (data: DataStructure) => number;
4
+ applyColorToDataStructure: (data: DataStructure, color?: string) => ColoredDataStructure;
5
+ };
6
+ export type ColoringFunction<DataStructure extends {}, ColoredDataStructure extends {}> = (dataStructures: DataStructure[], colorOpts: DataColorOptions) => ColoredDataStructure[];
7
+ export declare const createDataColoringFunction: <DataStructure extends {}, ColoredDataStructure extends {}>(dsOperator: DataStructureOperator<DataStructure, ColoredDataStructure>) => ColoringFunction<DataStructure, ColoredDataStructure>;
@@ -0,0 +1,2 @@
1
+ import { GeoDataElement, RawGeoDataElement } from '../types';
2
+ export declare const geoDataColoringFunction: import("./create-data-coloring-function.js").ColoringFunction<RawGeoDataElement, GeoDataElement>;
@@ -0,0 +1,3 @@
1
+ export * from './legend-color.js';
2
+ export * from './series-data-coloring-function.js';
3
+ export * from './types.js';
@@ -1,2 +1,2 @@
1
- import { DataColorOptions } from './types';
1
+ import { DataColorOptions } from './types.js';
2
2
  export declare const legendColor: (colorOpts?: DataColorOptions) => string | undefined;
@@ -0,0 +1,11 @@
1
+ import { SeriesValueData } from '../types.js';
2
+ export declare const seriesDataColoringFunction: import("./create-data-coloring-function.js").ColoringFunction<SeriesValueData, {
3
+ color: string | undefined;
4
+ value: number;
5
+ blur?: boolean | undefined;
6
+ rawValue?: string | number | undefined;
7
+ xValue?: (string | number)[] | undefined;
8
+ xDisplayValue?: string[] | undefined;
9
+ xCompareValue?: (string | number)[] | undefined;
10
+ parent?: string | undefined;
11
+ }>;
@@ -1,4 +1,4 @@
1
1
  import { DataTable } from '../chart-data-processor/table-processor';
2
- import { IndicatorDataOptionsInternal } from '../chart-data-options/types';
2
+ import { IndicatorChartDataOptionsInternal } from '../chart-data-options/types';
3
3
  import { IndicatorChartData } from './types';
4
- export declare const indicatorData: (chartDataOptions: IndicatorDataOptionsInternal, dataTable: DataTable) => IndicatorChartData;
4
+ export declare const indicatorData: (chartDataOptions: IndicatorChartDataOptionsInternal, dataTable: DataTable) => IndicatorChartData;
@@ -1,5 +1,5 @@
1
1
  import { ComparableData, DataTable } from '../chart-data-processor/table-processor';
2
- import { ScatterCategories, ScatterChartData, ScatterAxisCategoriesMap, ScatterDataTable } from './types';
2
+ import { ScatterAxisCategoriesMap, ScatterCategories, ScatterChartData, ScatterDataTable } from './types';
3
3
  import { ScatterChartDataOptionsInternal } from '../chart-data-options/types';
4
4
  export declare const defaultScatterDataValue: ComparableData;
5
5
  export type AxisColumnName = 'xAxis' | 'yAxis';
@@ -14,7 +14,7 @@ export declare const buildCategories: (data: ScatterDataTable, axisColumnName: A
14
14
  export declare const createCategoriesMap: (xCategories?: ScatterCategories, yCategories?: ScatterCategories) => ScatterAxisCategoriesMap;
15
15
  export declare const groupData: (chartDataOptions: ScatterChartDataOptionsInternal, dataTable: DataTable) => ScatterDataTable;
16
16
  /**
17
- * Creates data for scatter charts given chart data table and data options,
17
+ * Creates data for scatter charts given chart data table and data options
18
18
  *
19
19
  * @param chartDataOptions - Data options for scatter chart
20
20
  * @param dataTable - Chart data table
@@ -0,0 +1,4 @@
1
+ import { ScattermapChartDataOptionsInternal } from '../chart-data-options/types.js';
2
+ import { DataTable } from '../chart-data-processor/table-processor.js';
3
+ import { ScattermapChartData } from './types.js';
4
+ export declare const scattermapData: (chartDataOptions: ScattermapChartDataOptionsInternal, dataTable: DataTable) => ScattermapChartData;
@@ -1,6 +1,7 @@
1
- import { NumberFormatConfig } from '../types';
2
- import { IndicatorChartType } from '../chart-options-processor/translations/types';
1
+ import { Color, NumberFormatConfig } from '../types';
2
+ import { AreamapChartType, IndicatorChartType } from '../chart-options-processor/translations/types';
3
3
  import { ComparableData, Value } from '../chart-data-processor/table-processor';
4
+ import { Coordinates } from '../charts/map-charts/scattermap/types';
4
5
  export type CategoricalXValues = {
5
6
  key: string;
6
7
  xValues: string[];
@@ -22,6 +23,30 @@ export type CategoricalSeriesValues = {
22
23
  title?: string;
23
24
  data: SeriesValueData[];
24
25
  };
26
+ export type BoxplotSeriesValueData = {
27
+ low: number;
28
+ median: number;
29
+ high: number;
30
+ q1: number;
31
+ q3: number;
32
+ outliers: number[];
33
+ blur?: boolean;
34
+ };
35
+ export type BoxplotSeriesValues = {
36
+ name: string;
37
+ title?: string;
38
+ data: BoxplotSeriesValueData[];
39
+ };
40
+ export type BoxplotOutliersSeriesValueData = {
41
+ x: number;
42
+ y: number;
43
+ blur?: boolean;
44
+ };
45
+ export type BoxplotOutliersSeriesValues = {
46
+ name: string;
47
+ title?: string;
48
+ data: BoxplotOutliersSeriesValueData[];
49
+ };
25
50
  export type Column = {
26
51
  name: string;
27
52
  type: string;
@@ -60,6 +85,18 @@ export type ScatterChartData = {
60
85
  xCategories: ScatterCategories;
61
86
  yCategories: ScatterCategories;
62
87
  };
88
+ export type ScattermapChartLocation = {
89
+ name: string;
90
+ value: number;
91
+ colorValue?: number;
92
+ details?: number | string[];
93
+ blur: boolean;
94
+ coordinates?: Coordinates;
95
+ };
96
+ export type ScattermapChartData = {
97
+ type: 'scattermap';
98
+ locations: ScattermapChartLocation[];
99
+ };
63
100
  /**
64
101
  * Fact final data that will be passed to chart-component to render
65
102
  *
@@ -72,9 +109,43 @@ export type IndicatorChartData = {
72
109
  min?: number;
73
110
  max?: number;
74
111
  };
112
+ /**
113
+ * Raw GeoDataElement from data
114
+ * @internal
115
+ */
116
+ export type RawGeoDataElement = {
117
+ geoName: string;
118
+ originalValue: number;
119
+ formattedOriginalValue: string;
120
+ };
121
+ /**
122
+ * GeoDataElement with color property, calculated from `originalValue`
123
+ * @internal
124
+ */
125
+ export type GeoDataElement = RawGeoDataElement & {
126
+ color?: Color;
127
+ };
128
+ /**
129
+ * Fact final data that will be passed to Areamap-component to render
130
+ * @internal
131
+ */
132
+ export type AreamapData = {
133
+ type: AreamapChartType;
134
+ geoData: GeoDataElement[];
135
+ };
136
+ /**
137
+ * Fact final data that will be passed to chart-component to render
138
+ *
139
+ * @internal
140
+ */
141
+ export type BoxplotChartData = {
142
+ type: 'boxplot';
143
+ xValues: CategoricalXValues[];
144
+ series: [BoxplotSeriesValues, BoxplotOutliersSeriesValues?];
145
+ };
75
146
  /**
76
147
  * Fact final data that will be passed to chart-component to render
77
148
  *
78
149
  * @internal
79
150
  */
80
- export type ChartData = CartesianChartData | CategoricalChartData | ScatterChartData | IndicatorChartData;
151
+ export type ChartData = CartesianChartData | CategoricalChartData | ScatterChartData | IndicatorChartData | BoxplotChartData | AreamapData | ScattermapChartData;
@@ -0,0 +1,7 @@
1
+ import { CalculatedMeasureColumn, Column, MeasureColumn } from '@sisense/sdk-data';
2
+ import { BoxplotChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptionsInternal, StyledColumn, BoxWhiskerType, StyledMeasureColumn } from './types';
3
+ export declare const generateBoxplotValues: (targetValue: Column | StyledColumn, boxType: BoxWhiskerType, outliersEnabled: boolean) => {
4
+ values: (MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
5
+ outliers: Column | StyledColumn | undefined;
6
+ };
7
+ export declare const translateBoxplotDataOptions: (boxplotDataOptions: BoxplotChartDataOptions | BoxplotChartCustomDataOptions) => BoxplotChartDataOptionsInternal;
@@ -0,0 +1,3 @@
1
+ import { ScattermapChartDataOptions, ScattermapChartDataOptionsInternal, ScattermapLocationLevel } from './types';
2
+ export declare function getLocationLevel(locationDataOptions: ScattermapChartDataOptions['geo']): ScattermapLocationLevel;
3
+ export declare function translateScattermapChartDataOptions(scattermap: ScattermapChartDataOptions): ScattermapChartDataOptionsInternal;
@@ -1,4 +1,4 @@
1
- import type { DataColorOptions } from '../chart-data/series-data-color-service';
1
+ import type { DataColorOptions } from '../chart-data/data-coloring';
2
2
  import type { NumberFormatConfig, SeriesChartType, SortDirection, ValueToColorMap, MultiColumnValueToColorMap } from '../types';
3
3
  import { Column, MeasureColumn, CalculatedMeasureColumn } from '@sisense/sdk-data';
4
4
  /**
@@ -56,9 +56,9 @@ export interface CategoryStyle {
56
56
  * },
57
57
  * ],
58
58
  * value: [
59
- * measures.sum(DM.Commerce.Revenue),
59
+ * measureFactory.sum(DM.Commerce.Revenue),
60
60
  * {
61
- * column: measures.sum(DM.Commerce.Quantity),
61
+ * column: measureFactory.sum(DM.Commerce.Quantity),
62
62
  * showOnRightAxis: true,
63
63
  * chartType: 'column',
64
64
  * },
@@ -128,9 +128,9 @@ export type ValueStyle = {
128
128
  * },
129
129
  * ],
130
130
  * value: [
131
- * measures.sum(DM.Commerce.Revenue),
131
+ * measureFactory.sum(DM.Commerce.Revenue),
132
132
  * {
133
- * column: measures.sum(DM.Commerce.Quantity),
133
+ * column: measureFactory.sum(DM.Commerce.Quantity),
134
134
  * showOnRightAxis: true,
135
135
  * chartType: 'column',
136
136
  * },
@@ -211,7 +211,7 @@ export interface CategoricalChartDataOptions {
211
211
  * Configuration for how to query aggregate data and assign data
212
212
  * to a {@link IndicatorChartType | Indicator chart}.
213
213
  */
214
- export interface IndicatorDataOptions {
214
+ export interface IndicatorChartDataOptions {
215
215
  /** Measure columns (or measures) whose values are used for main value of indicator. */
216
216
  value?: (MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
217
217
  /** Measure columns (or measures) whose values are used for secondary value of indicator. */
@@ -276,6 +276,16 @@ export interface ScatterChartDataOptions {
276
276
  */
277
277
  seriesToColorMap?: ValueToColorMap;
278
278
  }
279
+ /**
280
+ * Configuration for how to query aggregate data and assign data
281
+ * to geographic features of an Areamap chart.
282
+ */
283
+ export interface AreamapChartDataOptions {
284
+ /** Column or attribute representing the countries (or states) on the map. */
285
+ geo: [Column | StyledColumn];
286
+ /** Measure column (or measure) encoded by the color of the countries (or states) on the map. */
287
+ color: [MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn];
288
+ }
279
289
  /**
280
290
  * Checks if the given argument is a measure column.
281
291
  *
@@ -294,14 +304,109 @@ export interface TableDataOptions {
294
304
  */
295
305
  columns: (Column | StyledColumn | MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
296
306
  }
307
+ /**
308
+ * Geographic location level for a Scattermap column.
309
+ * This type can have one of the following values:
310
+ * - 'auto': Automatically determines the appropriate location level.
311
+ * - 'country': Represents the country level in the geographical hierarchy.
312
+ * - 'state': Represents the state or province level in the geographical hierarchy.
313
+ * - 'city': Represents the city level in the geographical hierarchy.
314
+ */
315
+ export type ScattermapLocationLevel = 'auto' | 'country' | 'state' | 'city';
316
+ /**
317
+ * Scattermap column that allows to specify the geographic location level.
318
+ */
319
+ export interface ScattermapColumn extends StyledColumn {
320
+ level: ScattermapLocationLevel;
321
+ }
322
+ /**
323
+ * Configuration for how to query aggregate data and assign data
324
+ * to axes of a Scattermap chart.
325
+ */
326
+ export interface ScattermapChartDataOptions {
327
+ /**
328
+ * Columns (or attributes) whose values represent locations on the map.
329
+ */
330
+ geo: (Column | StyledColumn | ScattermapColumn)[];
331
+ /**
332
+ * Measure column (or measure) representing the size of the points on the map.
333
+ */
334
+ size?: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
335
+ /**
336
+ * Measure column (or measure) representing the color of the points on the map.
337
+ */
338
+ colorBy?: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
339
+ /**
340
+ * Column or measure column representing the additional details for the points on the map.
341
+ */
342
+ details?: Column | StyledColumn | MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
343
+ }
344
+ /**
345
+ * Represents the type of box whisker data algorithm, which can be either `iqr`, `extremums`, or `standardDeviation`.
346
+ */
347
+ export type BoxWhiskerType = 'iqr' | 'extremums' | 'standardDeviation';
348
+ /**
349
+ * Configuration for how to query aggregate data and assign data
350
+ * to axes of a Boxplot chart.
351
+ *
352
+ * The Boxplot chart can receive a singular numeric column, which is utilized internally to calculate multiple metrics
353
+ * such as `whisker max`, `whisker min`, `box max`, `box median`, and `box min`.
354
+ */
355
+ export type BoxplotChartDataOptions = {
356
+ /**
357
+ * Columns (or attributes) whose values represent categories in the chart.
358
+ */
359
+ category: [(Column | StyledColumn)?];
360
+ /**
361
+ * Columns (or attributes) whose values represent the target numeric value column for computing boxplot metrics according to the selected `boxType`
362
+ */
363
+ value: [Column | StyledColumn];
364
+ /**
365
+ * The type of box whisker data algorithm to be used.
366
+ */
367
+ boxType: BoxWhiskerType;
368
+ /**
369
+ * Toggle flag whether outliers should be enabled in the boxplot chart.
370
+ */
371
+ outliersEnabled?: boolean;
372
+ };
373
+ /**
374
+ * Configuration for how to query aggregate data and assign data
375
+ * to axes of a Boxplot chart.
376
+ *
377
+ * The Boxplot chart can receive multiple numeric columns, which represent all the metrics
378
+ * such as `whisker max`, `whisker min`, `box max`, `box median`, and `box min`.
379
+ */
380
+ export type BoxplotChartCustomDataOptions = {
381
+ /**
382
+ * Columns (or attributes) whose values represent categories in the chart.
383
+ */
384
+ category: [(Column | StyledColumn)?];
385
+ /**
386
+ * Measure columns (or measures) representing the target numeric values used for computing boxplot metrics.
387
+ */
388
+ value: (Column | StyledColumn | MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
389
+ /**
390
+ * Optional measure columns (or measures) representing the boxplot outliers value.
391
+ */
392
+ outliers?: [Column | StyledColumn];
393
+ /**
394
+ * The title for the numeric value column in the chart.
395
+ */
396
+ valueTitle: string;
397
+ };
297
398
  /**
298
399
  * Configuration for querying aggregate data and assigning data to chart encodings.
299
400
  *
300
401
  * There are separate configurations for {@link CartesianChartDataOptions | Cartesian},
301
402
  * {@link CategoricalChartDataOptions | Categorical},
302
- * {@link ScatterChartDataOptions | Scatter}, and {@link IndicatorDataOptions | Indicator} charts.
403
+ * {@link ScatterChartDataOptions | Scatter},
404
+ * {@link IndicatorChartDataOptions | Indicator},
405
+ * {@link BoxplotChartDataOptions | Boxplot},
406
+ * {@link AreamapChartDataOptions | Areamap}, and
407
+ * {@link ScattermapChartDataOptions | Scattermap} charts.
303
408
  */
304
- export type ChartDataOptions = CartesianChartDataOptions | CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorDataOptions;
409
+ export type ChartDataOptions = CartesianChartDataOptions | CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorChartDataOptions | BoxplotChartDataOptions | BoxplotChartCustomDataOptions | AreamapChartDataOptions | ScattermapChartDataOptions;
305
410
  /** @internal */
306
411
  export interface Category extends CategoryStyle {
307
412
  name: string;
@@ -341,15 +446,40 @@ export interface ScatterChartDataOptionsInternal {
341
446
  seriesToColorMap?: ValueToColorMap;
342
447
  }
343
448
  /** @internal */
449
+ export interface ScattermapChartDataOptionsInternal {
450
+ locations: Category[];
451
+ size?: Value;
452
+ colorBy?: Value;
453
+ details?: Category | Value;
454
+ locationLevel: ScattermapLocationLevel;
455
+ }
456
+ /** @internal */
344
457
  export type TableDataOptionsInternal = {
345
458
  columns: (Category | Value)[];
346
459
  };
347
460
  /** @internal */
348
- export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorDataOptionsInternal;
461
+ export type ChartDataOptionsInternal = CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal | ScatterChartDataOptionsInternal | IndicatorChartDataOptionsInternal | BoxplotChartDataOptionsInternal | AreamapChartDataOptionsInternal | ScattermapChartDataOptionsInternal;
349
462
  /** @internal */
350
- export type IndicatorDataOptionsInternal = {
463
+ export type IndicatorChartDataOptionsInternal = {
351
464
  min?: Value[];
352
465
  max?: Value[];
353
466
  value?: Value[];
354
467
  secondary?: Value[];
355
468
  };
469
+ /** @internal */
470
+ export interface BoxplotChartDataOptionsInternal {
471
+ category?: Category;
472
+ boxMin: Value;
473
+ boxMedian: Value;
474
+ boxMax: Value;
475
+ whiskerMin: Value;
476
+ whiskerMax: Value;
477
+ outliersCount: Value;
478
+ outliers?: Category;
479
+ valueTitle: string;
480
+ }
481
+ /** @internal */
482
+ export type AreamapChartDataOptionsInternal = {
483
+ geo: Category;
484
+ color: Value;
485
+ };
@@ -1,5 +1,9 @@
1
1
  import { Attribute, CalculatedMeasureColumn, Column, Measure, MeasureColumn } from '@sisense/sdk-data';
2
- import { Category, Value, StyledColumn, StyledMeasureColumn, AnyColumn } from './types';
2
+ import { Category, Value, StyledColumn, StyledMeasureColumn, AnyColumn, CategoryStyle } from './types';
3
+ export declare const splitColumn: (c: StyledColumn | Column) => {
4
+ column: Column;
5
+ style: CategoryStyle | undefined;
6
+ };
3
7
  export declare const translateColumnToCategory: (c: StyledColumn | Column) => Category;
4
8
  export declare const translateColumnToValue: (c: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn) => Value;
5
9
  export declare const translateColumnToCategoryOrValue: (value: AnyColumn) => Value | Category;
@@ -9,3 +13,4 @@ export declare const translateValueToMeasure: (value: Value) => Measure;
9
13
  export declare const translateCategoryToAttribute: (category: Category) => Attribute;
10
14
  export declare const getDataOptionTitle: (option: Category | Value) => string;
11
15
  export declare const translateColumnToAttribure: (c: StyledColumn | Column) => Attribute;
16
+ export declare const translateColumnToMeasure: (c: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn) => Measure;
@@ -0,0 +1,11 @@
1
+ import { TFunction } from '@sisense/sdk-common';
2
+ import { BoxplotChartData } from '../chart-data/types';
3
+ import { BoxplotChartDataOptionsInternal } from '../chart-data-options/types';
4
+ import { HighchartsOptionsInternal } from './chart-options-service';
5
+ import { OptionsWithAlerts } from '../types';
6
+ import { BoxplotChartDesignOptions } from './translations/design-options';
7
+ /**
8
+ * Convert intermediate chart data, data options, and design options
9
+ * into pure highcharts config data.
10
+ */
11
+ export declare const getBoxplotChartOptions: (chartData: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions, dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction) => OptionsWithAlerts<HighchartsOptionsInternal>;