@sisense/sdk-ui 0.12.0 → 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 +26601 -26156
- 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
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ChartType, TableType } from '../../types';
|
|
2
|
-
export declare function getNoResultOverlayImage(type: ChartType | TableType):
|
|
2
|
+
export declare function getNoResultOverlayImage(type: ChartType | TableType): any;
|
package/dist/props.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attribute, Filter, Measure, DataSource, Data, QueryResultData } from '@sisense/sdk-data';
|
|
2
|
-
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, StyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, WidgetStyleOptions, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection } from './types';
|
|
2
|
+
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, StyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, WidgetStyleOptions, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions } from './types';
|
|
3
3
|
import { HighchartsOptions } from './chart-options-processor/chart-options-service';
|
|
4
4
|
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
5
|
import { IndicatorDataOptions, ScatterChartDataOptions, TableDataOptions } from './chart-data-options/types';
|
|
@@ -9,7 +9,7 @@ import { ExecuteQueryParams } from './query-execution';
|
|
|
9
9
|
import { FiltersMergeStrategy } from './dashboard-widget/types';
|
|
10
10
|
export type { ScatterDataPointEventHandler, ScatterDataPointsEventHandler, DataPointEventHandler, DataPointsEventHandler, MenuItemSection, HighchartsOptions, };
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Configurations for Sisense Context
|
|
13
13
|
*/
|
|
14
14
|
export interface SisenseContextProviderProps {
|
|
15
15
|
/**
|
|
@@ -100,9 +100,13 @@ export interface ExecuteQueryProps {
|
|
|
100
100
|
children?: (queryResult: QueryResultData) => ReactNode;
|
|
101
101
|
/** Callback function that is evaluated when query results are ready */
|
|
102
102
|
onDataChanged?: (data: QueryResultData) => void;
|
|
103
|
+
/**
|
|
104
|
+
* Sync or async callback that allows to modify the JAQL payload before it is sent to the server.
|
|
105
|
+
*/
|
|
106
|
+
onBeforeQuery?: (jaql: any) => any | Promise<any>;
|
|
103
107
|
}
|
|
104
108
|
/**
|
|
105
|
-
*
|
|
109
|
+
* Configurations for Theme.
|
|
106
110
|
*
|
|
107
111
|
* Two options are supported:
|
|
108
112
|
*
|
|
@@ -138,7 +142,7 @@ export type ThemeProviderProps = PropsWithChildren<{
|
|
|
138
142
|
export type BeforeRenderHandler = (
|
|
139
143
|
/** Highcharts options */
|
|
140
144
|
highchartsOptions: HighchartsOptions) => HighchartsOptions;
|
|
141
|
-
interface
|
|
145
|
+
interface BaseChartEventProps {
|
|
142
146
|
/**
|
|
143
147
|
* Click handler callback for a data point
|
|
144
148
|
*
|
|
@@ -167,7 +171,7 @@ interface ChartEventProps {
|
|
|
167
171
|
*/
|
|
168
172
|
onBeforeRender?: BeforeRenderHandler;
|
|
169
173
|
}
|
|
170
|
-
interface
|
|
174
|
+
interface ChartEventProps extends BaseChartEventProps {
|
|
171
175
|
/**
|
|
172
176
|
* Click handler callback for a data point
|
|
173
177
|
*
|
|
@@ -187,7 +191,7 @@ interface CartesianChartEventProps extends ChartEventProps {
|
|
|
187
191
|
*/
|
|
188
192
|
onDataPointsSelected?: DataPointsEventHandler;
|
|
189
193
|
}
|
|
190
|
-
interface ScatterChartEventProps extends
|
|
194
|
+
interface ScatterChartEventProps extends BaseChartEventProps {
|
|
191
195
|
/**
|
|
192
196
|
* Click handler callback for a data point
|
|
193
197
|
*
|
|
@@ -214,7 +218,7 @@ interface ScatterChartEventProps extends ChartEventProps {
|
|
|
214
218
|
*/
|
|
215
219
|
export interface BaseChartProps {
|
|
216
220
|
/**
|
|
217
|
-
* Data set for this
|
|
221
|
+
* Data set for this component, which supports two options:
|
|
218
222
|
*
|
|
219
223
|
* (1) Data source name (as a `string`) - e.g. `Sample ECommerce`. Under the hood,
|
|
220
224
|
* the chart will have an internal {@link ExecuteQuery} connect to the data source
|
|
@@ -222,7 +226,7 @@ export interface BaseChartProps {
|
|
|
222
226
|
*
|
|
223
227
|
* OR
|
|
224
228
|
*
|
|
225
|
-
* (2) Explicit {@link @sisense/sdk-data!Data}, which is made up of
|
|
229
|
+
* (2) Explicit {@link @sisense/sdk-data!Data | Data}, which is made up of
|
|
226
230
|
* an array of {@link @sisense/sdk-data!Column | columns}
|
|
227
231
|
* and a two-dimensional array of data {@link @sisense/sdk-data!Cell | cells}.
|
|
228
232
|
* This allows the chart component to be used
|
|
@@ -251,7 +255,7 @@ export interface BaseChartProps {
|
|
|
251
255
|
/**
|
|
252
256
|
* Props shared across {@link Chart} components.
|
|
253
257
|
*/
|
|
254
|
-
export interface ChartProps extends BaseChartProps,
|
|
258
|
+
export interface ChartProps extends BaseChartProps, BaseChartEventProps {
|
|
255
259
|
/**
|
|
256
260
|
* Default chart type of each series.
|
|
257
261
|
*
|
|
@@ -281,7 +285,7 @@ export interface ChartProps extends BaseChartProps, ChartEventProps {
|
|
|
281
285
|
/**
|
|
282
286
|
* Props of the {@link AreaChart} component.
|
|
283
287
|
*/
|
|
284
|
-
export interface AreaChartProps extends BaseChartProps,
|
|
288
|
+
export interface AreaChartProps extends BaseChartProps, ChartEventProps {
|
|
285
289
|
/**
|
|
286
290
|
* Configurations for how to interpret and present data passed to the chart.
|
|
287
291
|
*
|
|
@@ -298,7 +302,7 @@ export interface AreaChartProps extends BaseChartProps, CartesianChartEventProps
|
|
|
298
302
|
/**
|
|
299
303
|
* Props of the {@link BarChart} component.
|
|
300
304
|
*/
|
|
301
|
-
export interface BarChartProps extends BaseChartProps,
|
|
305
|
+
export interface BarChartProps extends BaseChartProps, ChartEventProps {
|
|
302
306
|
/**
|
|
303
307
|
* Configurations for how to interpret and present the data passed to the chart
|
|
304
308
|
*
|
|
@@ -315,7 +319,7 @@ export interface BarChartProps extends BaseChartProps, CartesianChartEventProps
|
|
|
315
319
|
/**
|
|
316
320
|
* Props of the {@link ColumnChart} component.
|
|
317
321
|
*/
|
|
318
|
-
export interface ColumnChartProps extends BaseChartProps,
|
|
322
|
+
export interface ColumnChartProps extends BaseChartProps, ChartEventProps {
|
|
319
323
|
/**
|
|
320
324
|
* Configurations for how to interpret and present the data passed to the chart
|
|
321
325
|
*
|
|
@@ -332,7 +336,7 @@ export interface ColumnChartProps extends BaseChartProps, CartesianChartEventPro
|
|
|
332
336
|
/**
|
|
333
337
|
* Props of the {@link FunnelChart} component.
|
|
334
338
|
*/
|
|
335
|
-
export interface FunnelChartProps extends BaseChartProps,
|
|
339
|
+
export interface FunnelChartProps extends BaseChartProps, ChartEventProps {
|
|
336
340
|
/**
|
|
337
341
|
* Configurations for how to interpret and present the data passed to the chart
|
|
338
342
|
*
|
|
@@ -349,7 +353,7 @@ export interface FunnelChartProps extends BaseChartProps, CartesianChartEventPro
|
|
|
349
353
|
/**
|
|
350
354
|
* Props of the {@link LineChart} component.
|
|
351
355
|
*/
|
|
352
|
-
export interface LineChartProps extends BaseChartProps,
|
|
356
|
+
export interface LineChartProps extends BaseChartProps, ChartEventProps {
|
|
353
357
|
/**
|
|
354
358
|
* Configurations for how to interpret and present data passed to the chart.
|
|
355
359
|
*
|
|
@@ -366,7 +370,7 @@ export interface LineChartProps extends BaseChartProps, CartesianChartEventProps
|
|
|
366
370
|
/**
|
|
367
371
|
* Props of the {@link PieChart} component.
|
|
368
372
|
*/
|
|
369
|
-
export interface PieChartProps extends BaseChartProps,
|
|
373
|
+
export interface PieChartProps extends BaseChartProps, ChartEventProps {
|
|
370
374
|
/**
|
|
371
375
|
* Configurations for how to interpret and present the data passed to the chart
|
|
372
376
|
*
|
|
@@ -383,7 +387,7 @@ export interface PieChartProps extends BaseChartProps, CartesianChartEventProps
|
|
|
383
387
|
/**
|
|
384
388
|
* Props of the {@link PolarChart} component.
|
|
385
389
|
*/
|
|
386
|
-
export interface PolarChartProps extends BaseChartProps,
|
|
390
|
+
export interface PolarChartProps extends BaseChartProps, ChartEventProps {
|
|
387
391
|
/** Configurations for how to interpret and present the data passed to the chart */
|
|
388
392
|
dataOptions: CartesianChartDataOptions;
|
|
389
393
|
/** Configuration that define functional style of the various chart elements */
|
|
@@ -403,31 +407,16 @@ export interface IndicatorChartProps extends BaseChartProps {
|
|
|
403
407
|
*/
|
|
404
408
|
export interface TableProps {
|
|
405
409
|
/**
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
* (1) Data source name (as a `string`) - e.g. `Sample ECommerce`. Under the hood,
|
|
409
|
-
* the chart will have an internal {@link ExecuteQuery} connect to the data source
|
|
410
|
-
* and load the data as specified in {@link dataOptions} and {@link filters}.
|
|
411
|
-
*
|
|
412
|
-
* OR
|
|
413
|
-
*
|
|
414
|
-
* (2) Explicit {@link @sisense/sdk-data!Data}, which is made up of
|
|
415
|
-
* an array of {@link @sisense/sdk-data!Column | columns}
|
|
416
|
-
* and a two-dimensional array of data {@link @sisense/sdk-data!Cell | cells}.
|
|
417
|
-
* This allows the chart component to be used
|
|
418
|
-
* with user-provided data.
|
|
419
|
-
*
|
|
420
|
-
* If neither option is specified,
|
|
421
|
-
* the chart will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
|
|
410
|
+
* {@inheritDoc ChartProps.dataSet}
|
|
422
411
|
*
|
|
423
412
|
*
|
|
424
413
|
* @category Data
|
|
425
414
|
*/
|
|
426
415
|
dataSet?: DataSource | Data;
|
|
427
416
|
/**
|
|
428
|
-
* Configurations for how to interpret and present the data passed to the
|
|
417
|
+
* Configurations for how to interpret and present the data passed to the component
|
|
429
418
|
*
|
|
430
|
-
* @category
|
|
419
|
+
* @category Representation
|
|
431
420
|
*/
|
|
432
421
|
dataOptions: TableDataOptions;
|
|
433
422
|
/**
|
|
@@ -437,9 +426,9 @@ export interface TableProps {
|
|
|
437
426
|
*/
|
|
438
427
|
filters?: Filter[];
|
|
439
428
|
/**
|
|
440
|
-
* Configurations that define functional style of the various
|
|
429
|
+
* Configurations that define functional style of the various table elements
|
|
441
430
|
*
|
|
442
|
-
* @category
|
|
431
|
+
* @category Representation
|
|
443
432
|
*/
|
|
444
433
|
styleOptions?: TableStyleOptions;
|
|
445
434
|
/**
|
|
@@ -471,7 +460,7 @@ export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProp
|
|
|
471
460
|
* Props for the {@link DashboardWidget} component
|
|
472
461
|
*
|
|
473
462
|
*/
|
|
474
|
-
export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'>,
|
|
463
|
+
export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'>, BaseChartEventProps {
|
|
475
464
|
/**
|
|
476
465
|
* Identifier of the widget
|
|
477
466
|
*
|
|
@@ -562,7 +551,7 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
|
|
|
562
551
|
* Props for the {@link ChartWidget} component
|
|
563
552
|
*
|
|
564
553
|
*/
|
|
565
|
-
export interface ChartWidgetProps extends
|
|
554
|
+
export interface ChartWidgetProps extends BaseChartEventProps {
|
|
566
555
|
/**
|
|
567
556
|
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
568
557
|
*
|
|
@@ -610,6 +599,7 @@ export interface ChartWidgetProps extends ChartEventProps {
|
|
|
610
599
|
/**
|
|
611
600
|
* List of categories to allow drilldowns on
|
|
612
601
|
*
|
|
602
|
+
* @deprecated Use {@link DrilldownWidget} instead
|
|
613
603
|
* @category Widget
|
|
614
604
|
*/
|
|
615
605
|
drilldownOptions?: DrilldownOptions;
|
|
@@ -653,6 +643,16 @@ export interface ChartWidgetProps extends ChartEventProps {
|
|
|
653
643
|
* @category Widget
|
|
654
644
|
*/
|
|
655
645
|
description?: string;
|
|
646
|
+
/**
|
|
647
|
+
* Boolean flag whether selecting data points triggers highlight filter of the selected data
|
|
648
|
+
*
|
|
649
|
+
* Recommended to turn on when the ChartWidget is enhanced with data drilldown by {@link DrilldownWidget}
|
|
650
|
+
*
|
|
651
|
+
* If not specified, the default value is `false`
|
|
652
|
+
*
|
|
653
|
+
* @category Widget
|
|
654
|
+
*/
|
|
655
|
+
highlightSelectionDisabled?: boolean;
|
|
656
656
|
}
|
|
657
657
|
/**
|
|
658
658
|
* Props for the {@link TableWidget} component
|
|
@@ -751,11 +751,15 @@ export interface ExecuteQueryByWidgetIdProps {
|
|
|
751
751
|
children?: (queryResult: QueryResultData, queryParams: ExecuteQueryParams) => ReactNode;
|
|
752
752
|
/** Callback function that is evaluated when query results are ready */
|
|
753
753
|
onDataChanged?: (data: QueryResultData, queryParams: ExecuteQueryParams) => void;
|
|
754
|
+
/**
|
|
755
|
+
* Sync or async callback that allows to modify the JAQL payload before it is sent to the server.
|
|
756
|
+
*/
|
|
757
|
+
onBeforeQuery?: (jaql: any) => any | Promise<any>;
|
|
754
758
|
}
|
|
755
759
|
/**
|
|
756
760
|
* Props of the {@link TreemapChart} component.
|
|
757
761
|
*/
|
|
758
|
-
export interface TreemapChartProps extends BaseChartProps,
|
|
762
|
+
export interface TreemapChartProps extends BaseChartProps, ChartEventProps {
|
|
759
763
|
/**
|
|
760
764
|
* Configurations for how to interpret and present the data passed to the chart
|
|
761
765
|
*
|
|
@@ -769,6 +773,23 @@ export interface TreemapChartProps extends BaseChartProps, CartesianChartEventPr
|
|
|
769
773
|
*/
|
|
770
774
|
styleOptions?: TreemapStyleOptions;
|
|
771
775
|
}
|
|
776
|
+
/**
|
|
777
|
+
* Props of the {@link SunburstChart} component.
|
|
778
|
+
*/
|
|
779
|
+
export interface SunburstChartProps extends BaseChartProps, ChartEventProps {
|
|
780
|
+
/**
|
|
781
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
782
|
+
*
|
|
783
|
+
* @category Chart
|
|
784
|
+
*/
|
|
785
|
+
dataOptions: CategoricalChartDataOptions;
|
|
786
|
+
/**
|
|
787
|
+
* Configuration that define functional style of the various chart elements
|
|
788
|
+
*
|
|
789
|
+
* @category Chart
|
|
790
|
+
*/
|
|
791
|
+
styleOptions?: SunburstStyleOptions;
|
|
792
|
+
}
|
|
772
793
|
/**
|
|
773
794
|
* Props for {@link ContextMenu} component.
|
|
774
795
|
*/
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { Attribute,
|
|
1
|
+
import { Attribute, QueryResultData } from '@sisense/sdk-data';
|
|
2
|
+
import type { QueryDescription as InternalQueryDescription, QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
2
3
|
import { ClientApplication } from '../app/client-application';
|
|
4
|
+
/**
|
|
5
|
+
* All the properties that fully describe a query you want to send.
|
|
6
|
+
*
|
|
7
|
+
* We use "dimensions" it public interface because the term is closer to the query and charting
|
|
8
|
+
* as used in the industry (Sisense included).
|
|
9
|
+
* internally, "dimensions" are represented by attributes as the latter is closer to the data model.
|
|
10
|
+
*/
|
|
11
|
+
export type QueryDescription = Partial<Omit<InternalQueryDescription, 'attributes'>> & {
|
|
12
|
+
dimensions?: Attribute[];
|
|
13
|
+
};
|
|
3
14
|
/** @internal */
|
|
4
15
|
export declare const QUERY_DEFAULT_LIMIT = 20000;
|
|
5
16
|
/** @internal */
|
|
6
17
|
export declare const QUERY_DEFAULT_OFFSET = 0;
|
|
7
18
|
/** @internal */
|
|
8
|
-
export declare const executeQuery: (
|
|
19
|
+
export declare const executeQuery: (queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig) => Promise<QueryResultData>;
|
|
@@ -21,6 +21,8 @@ export interface ExecuteQueryByWidgetIdParams {
|
|
|
21
21
|
offset?: number;
|
|
22
22
|
/** {@inheritDoc ExecuteQueryByWidgetIdProps.filtersMergeStrategy} */
|
|
23
23
|
filtersMergeStrategy?: FiltersMergeStrategy;
|
|
24
|
+
/** {@inheritDoc ExecuteQueryByWidgetIdProps.onBeforeQuery} */
|
|
25
|
+
onBeforeQuery?: (jaql: any) => any | Promise<any>;
|
|
24
26
|
}
|
|
25
27
|
export type QueryByWidgetIdState = QueryState & {
|
|
26
28
|
/** Query parameters constructed over the widget */
|
|
@@ -63,7 +65,7 @@ export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdP
|
|
|
63
65
|
*/
|
|
64
66
|
export declare function isParamsChanged(prevParams: ExecuteQueryByWidgetIdParams | undefined, newParams: ExecuteQueryByWidgetIdParams): boolean;
|
|
65
67
|
/** @internal */
|
|
66
|
-
export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, app, }: ExecuteQueryByWidgetIdParams & {
|
|
68
|
+
export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, app, onBeforeQuery, }: ExecuteQueryByWidgetIdParams & {
|
|
67
69
|
app: ClientApplication;
|
|
68
70
|
}): Promise<{
|
|
69
71
|
data: import("@sisense/sdk-data").QueryResultData;
|
|
@@ -28,6 +28,10 @@ export type ExecuteQueryParams = {
|
|
|
28
28
|
* If not specified, the default value is `true`
|
|
29
29
|
*/
|
|
30
30
|
enabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Sync or async callback that allows to modify the JAQL payload before it is sent to the server.
|
|
33
|
+
*/
|
|
34
|
+
onBeforeQuery?: (jaql: any) => any | Promise<any>;
|
|
31
35
|
};
|
|
32
36
|
/**
|
|
33
37
|
* React hook that executes a data query.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SunburstChartProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* A React component displaying hierarchical data in the form of nested circle slices.
|
|
5
|
+
* This type of chart can be used in different scenarios, for example, to compare both categories and sub-categories.
|
|
6
|
+
* See [Sunburst Chart](https://docs.sisense.com/main/SisenseLinux/sunburst-widget.htm) for more information.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* An example of using the component to visualize the `Sample ECommerce` data source:
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <SunburstChart
|
|
12
|
+
* dataSet={DM.DataSource}
|
|
13
|
+
* dataOptions={{
|
|
14
|
+
* category: [
|
|
15
|
+
* DM.Commerce.Сondition,
|
|
16
|
+
* DM.Commerce.Date.Years
|
|
17
|
+
* ],
|
|
18
|
+
* value: [measures.sum(DM.Commerce.Quantity)],
|
|
19
|
+
* }}
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* <img src="media://sunburst-chart-example-1.png" width="600px" />
|
|
24
|
+
* @param props - Sunburst chart properties
|
|
25
|
+
* @returns Sunburst Chart component
|
|
26
|
+
*/
|
|
27
|
+
export declare const SunburstChart: import("react").FunctionComponent<SunburstChartProps>;
|
|
@@ -38,7 +38,7 @@ export declare const useThemeContext: () => {
|
|
|
38
38
|
* For comparison, indicator chart with default theme settings:
|
|
39
39
|
*
|
|
40
40
|
* <img src="media://indicator-chart-example-1.png" width="400px" />
|
|
41
|
-
* @see {@link ThemeSettings}
|
|
41
|
+
* @see {@link ThemeSettings} and {@link IndicatorChart}
|
|
42
42
|
* @param props - Theme provider props
|
|
43
43
|
* @returns A Theme Provider component
|
|
44
44
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -356,12 +356,30 @@ export interface TreemapStyleOptions extends BaseStyleOptions {
|
|
|
356
356
|
mode?: 'value' | 'contribution';
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
|
+
/** Configuration options that define functional style of the various elements of {@link SunburstChart} */
|
|
360
|
+
export interface SunburstStyleOptions extends BaseStyleOptions {
|
|
361
|
+
/** Labels options object */
|
|
362
|
+
labels?: {
|
|
363
|
+
/** Array with single label options objects (order of items relative to dataOptions.category) */
|
|
364
|
+
category?: {
|
|
365
|
+
/** Define visibility of label */
|
|
366
|
+
enabled?: boolean;
|
|
367
|
+
}[];
|
|
368
|
+
};
|
|
369
|
+
/** Tooltip options object */
|
|
370
|
+
tooltip?: {
|
|
371
|
+
/** Define mode of data showing */
|
|
372
|
+
mode?: 'value' | 'contribution';
|
|
373
|
+
};
|
|
374
|
+
}
|
|
359
375
|
/**
|
|
360
376
|
* Configuration options that define functional style of the various elements of chart.
|
|
361
377
|
*/
|
|
362
|
-
export type StyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions | PieStyleOptions | FunnelStyleOptions | PolarStyleOptions | IndicatorStyleOptions | ScatterStyleOptions | TreemapStyleOptions;
|
|
378
|
+
export type StyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions | PieStyleOptions | FunnelStyleOptions | PolarStyleOptions | IndicatorStyleOptions | ScatterStyleOptions | TreemapStyleOptions | SunburstStyleOptions;
|
|
363
379
|
/** Mapping of each of the chart value series to colors. */
|
|
364
380
|
export type ValueToColorMap = Record<string, string>;
|
|
381
|
+
/** Mapping of each of the chart value series to colors. */
|
|
382
|
+
export type ValueToColorMultiColumnsMap = Record<string, Record<string, string>>;
|
|
365
383
|
/**
|
|
366
384
|
* Chart type of one of the supported chart families
|
|
367
385
|
*/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type FunctionComponent } from 'react';
|
|
2
|
+
import { ChartWidgetProps } from '../props';
|
|
3
|
+
/**
|
|
4
|
+
* The Chart Widget component extending the {@link Chart} component to support advanced BI
|
|
5
|
+
* capabilities such as drilldown.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* Example of using the `ChartWidget` component to
|
|
9
|
+
* plot a bar chart of the `Sample ECommerce` data source hosted in a Sisense instance.
|
|
10
|
+
* Drill-down capability is enabled.
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <ChartWidget
|
|
13
|
+
* dataSource={DM.DataSource}
|
|
14
|
+
* chartType="bar"
|
|
15
|
+
* dataOptions={{
|
|
16
|
+
* category: [DM.Category.Category],
|
|
17
|
+
* value: [measures.sum(DM.Commerce.Revenue)],
|
|
18
|
+
* breakBy: [],
|
|
19
|
+
* }}
|
|
20
|
+
* drilldownOptions={{
|
|
21
|
+
* drilldownDimensions: [DM.Commerce.AgeRange, DM.Commerce.Gender, DM.Commerce.Condition],
|
|
22
|
+
* }}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* <img src="media://chart-widget-with-drilldown-example-1.png" width="800px" />
|
|
27
|
+
* @param props - ChartWidget properties
|
|
28
|
+
* @returns ChartWidget component representing a chart type as specified in `ChartWidgetProps.`{@link ChartWidgetProps.chartType}
|
|
29
|
+
*/
|
|
30
|
+
export declare const ChartWidgetDeprecated: FunctionComponent<ChartWidgetProps>;
|
|
@@ -7,7 +7,6 @@ import { ChartWidgetProps } from '../props';
|
|
|
7
7
|
* @example
|
|
8
8
|
* Example of using the `ChartWidget` component to
|
|
9
9
|
* plot a bar chart of the `Sample ECommerce` data source hosted in a Sisense instance.
|
|
10
|
-
* Drill-down capability is enabled.
|
|
11
10
|
* ```tsx
|
|
12
11
|
* <ChartWidget
|
|
13
12
|
* dataSource={DM.DataSource}
|
|
@@ -17,14 +16,11 @@ import { ChartWidgetProps } from '../props';
|
|
|
17
16
|
* value: [measures.sum(DM.Commerce.Revenue)],
|
|
18
17
|
* breakBy: [],
|
|
19
18
|
* }}
|
|
20
|
-
* drilldownOptions={{
|
|
21
|
-
* drilldownDimensions: [DM.Commerce.AgeRange, DM.Commerce.Gender, DM.Commerce.Condition],
|
|
22
|
-
* }}
|
|
23
19
|
* />
|
|
24
20
|
* ```
|
|
25
21
|
*
|
|
26
22
|
* <img src="media://chart-widget-with-drilldown-example-1.png" width="800px" />
|
|
27
23
|
* @param props - ChartWidget properties
|
|
28
|
-
* @returns ChartWidget component representing a chart type as specified in `ChartWidgetProps.`{@link ChartWidgetProps.chartType}
|
|
24
|
+
* @returns ChartWidget component representing a chart type as specified in `ChartWidgetProps.`{@link ChartWidgetProps.chartType | chartType}
|
|
29
25
|
*/
|
|
30
26
|
export declare const ChartWidget: FunctionComponent<ChartWidgetProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sisense/sdk-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@emotion/react": "^11.10.5",
|
|
13
13
|
"@emotion/styled": "^11.10.5",
|
|
14
14
|
"@mui/material": "^5.11.6",
|
|
15
|
-
"@sisense/sdk-common": "^0.
|
|
16
|
-
"@sisense/sdk-data": "^0.
|
|
17
|
-
"@sisense/sdk-query-client": "^0.
|
|
18
|
-
"@sisense/sdk-rest-client": "^0.
|
|
15
|
+
"@sisense/sdk-common": "^0.13.0",
|
|
16
|
+
"@sisense/sdk-data": "^0.13.0",
|
|
17
|
+
"@sisense/sdk-query-client": "^0.13.0",
|
|
18
|
+
"@sisense/sdk-rest-client": "^0.13.0",
|
|
19
19
|
"@sisense/sisense-charts": "5.1.0-alpha-04052758.0",
|
|
20
20
|
"classnames": "^2.3.2",
|
|
21
21
|
"colorjs.io": "^0.4.3",
|