@sisense/sdk-ui-vue 2.34.0 → 2.36.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/index.cjs +1 -1
- package/dist/index.js +76 -49
- package/dist/src/components/charts/area-chart.d.ts +12 -20
- package/dist/src/components/charts/area-range-chart.d.ts +39 -28
- package/dist/src/components/charts/areamap-chart.d.ts +23 -25
- package/dist/src/components/charts/bar-chart.d.ts +16 -25
- package/dist/src/components/charts/boxplot-chart.d.ts +22 -26
- package/dist/src/components/charts/calendar-heatmap-chart.d.ts +16 -22
- package/dist/src/components/charts/chart.d.ts +14 -43
- package/dist/src/components/charts/column-chart.d.ts +16 -25
- package/dist/src/components/charts/funnel-chart.d.ts +23 -26
- package/dist/src/components/charts/indicator-chart.d.ts +90 -20
- package/dist/src/components/charts/kpi-chart.d.ts +16 -18
- package/dist/src/components/charts/line-chart.d.ts +17 -25
- package/dist/src/components/charts/pie-chart.d.ts +20 -23
- package/dist/src/components/charts/pivot-table.d.ts +251 -18
- package/dist/src/components/charts/polar-chart.d.ts +16 -24
- package/dist/src/components/charts/sankey-chart.d.ts +13 -14
- package/dist/src/components/charts/scatter-chart.d.ts +23 -23
- package/dist/src/components/charts/scattermap-chart.d.ts +19 -23
- package/dist/src/components/charts/streamgraph-chart.d.ts +51 -17
- package/dist/src/components/charts/sunburst-chart.d.ts +15 -23
- package/dist/src/components/charts/table.d.ts +27 -24
- package/dist/src/components/charts/treemap-chart.d.ts +15 -23
- package/dist/src/components/dashboard/dashboard-model.d.ts +14 -0
- package/dist/src/components/dashboard/index.d.ts +1 -0
- package/dist/src/components/filters/criteria-filter-tile.d.ts +8 -0
- package/dist/src/components/filters/date-range-filter-tile.d.ts +8 -0
- package/dist/src/components/filters/filter-tile.d.ts +12 -1
- package/dist/src/components/filters/index.d.ts +2 -2
- package/dist/src/components/filters/member-filter-tile.d.ts +8 -0
- package/dist/src/components/widgets/chart-widget.d.ts +44 -46
- package/dist/src/components/widgets/index.d.ts +5 -2
- package/dist/src/components/widgets/widget-by-id.d.ts +20 -1
- package/dist/src/components/widgets/widget-config.d.ts +57 -0
- package/dist/src/components/widgets/widget-header-config.d.ts +6 -0
- package/dist/src/components/widgets/widget-model.d.ts +14 -0
- package/dist/src/components/widgets/widget.d.ts +46 -10
- package/dist/src/composables/use-get-widget-model.d.ts +2 -1
- package/dist/src/sdk-ui-core-exports.d.ts +1 -1
- package/dist/src/utilities/dashboard-model-translator.d.ts +1 -1
- package/dist/src/utilities/widget-model-translator.d.ts +5 -2
- package/package.json +3 -3
|
@@ -9,36 +9,34 @@ export interface AreamapChartProps extends AreamapChartPropsPreact {
|
|
|
9
9
|
* A Vue component for visualizing geographical data as polygons on a map.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* Here's how you can use the AreamapChart component in a Vue application:
|
|
13
12
|
* ```vue
|
|
14
|
-
* <template>
|
|
15
|
-
<AreamapChart
|
|
16
|
-
:dataOptions="areamapChartProps.dataOptions"
|
|
17
|
-
:dataSet="areamapChartProps.dataSet"
|
|
18
|
-
:filters="areamapChartProps.filters"
|
|
19
|
-
/>
|
|
20
|
-
* </template>
|
|
21
|
-
*
|
|
22
13
|
* <script setup lang="ts">
|
|
23
14
|
* import { ref } from 'vue';
|
|
24
|
-
* import {
|
|
25
|
-
* import
|
|
26
|
-
* import
|
|
27
|
-
|
|
28
|
-
* const
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
});
|
|
15
|
+
* import { AreamapChart, type AreamapChartDataOptions, type AreamapStyleOptions } from '@sisense/sdk-ui-vue';
|
|
16
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
17
|
+
* import * as DM from './sample-ecommerce';
|
|
18
|
+
*
|
|
19
|
+
* const chartProps = ref<{
|
|
20
|
+
* dataOptions: AreamapChartDataOptions;
|
|
21
|
+
* styleOptions: AreamapStyleOptions;
|
|
22
|
+
* }>({
|
|
23
|
+
* dataOptions: {
|
|
24
|
+
* geo: [DM.Country.Country],
|
|
25
|
+
* color: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
26
|
+
* },
|
|
27
|
+
* styleOptions: { mapType: 'world' },
|
|
28
|
+
* });
|
|
39
29
|
* </script>
|
|
30
|
+
*
|
|
31
|
+
* <template>
|
|
32
|
+
* <AreamapChart
|
|
33
|
+
* :dataSet="DM.DataSource"
|
|
34
|
+
* :dataOptions="chartProps.dataOptions"
|
|
35
|
+
* :styleOptions="chartProps.styleOptions"
|
|
36
|
+
* />
|
|
37
|
+
* </template>
|
|
40
38
|
* ```
|
|
41
|
-
* <img src="media://
|
|
39
|
+
* <img src="media://areamap-chart-example-1.png" width="700px" />
|
|
42
40
|
* @param props - Areamap chart properties
|
|
43
41
|
* @returns Areamap Chart component
|
|
44
42
|
* @group Charts
|
|
@@ -10,36 +10,27 @@ export interface BarChartProps extends BarChartPropsPreact {
|
|
|
10
10
|
* whose lengths are proportional to the values that they represent.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the BarChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
<BarChart
|
|
17
|
-
:dataOptions="barChartProps.dataOptions"
|
|
18
|
-
:dataSet="barChartProps.dataSet"
|
|
19
|
-
:filters="barChartProps.filters"
|
|
20
|
-
/>
|
|
21
|
-
* </template>
|
|
22
|
-
*
|
|
23
14
|
* <script setup lang="ts">
|
|
24
15
|
* import { ref } from 'vue';
|
|
25
|
-
* import {
|
|
26
|
-
* import
|
|
27
|
-
* import
|
|
28
|
-
|
|
29
|
-
* const
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
breakBy: [],
|
|
37
|
-
},
|
|
38
|
-
filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 10)],
|
|
39
|
-
});
|
|
16
|
+
* import { BarChart } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
18
|
+
* import * as DM from './sample-ecommerce';
|
|
19
|
+
*
|
|
20
|
+
* const chartProps = ref({
|
|
21
|
+
* dataOptions: {
|
|
22
|
+
* category: [DM.Commerce.Date.Years],
|
|
23
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
24
|
+
* breakBy: [DM.Commerce.Condition],
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
40
27
|
* </script>
|
|
28
|
+
*
|
|
29
|
+
* <template>
|
|
30
|
+
* <BarChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
31
|
+
* </template>
|
|
41
32
|
* ```
|
|
42
|
-
* <img src="media://
|
|
33
|
+
* <img src="media://bar-chart-example-1.png" width="700px" />
|
|
43
34
|
* @param props - Bar chart properties
|
|
44
35
|
* @returns Bar Chart component
|
|
45
36
|
* @group Charts
|
|
@@ -10,36 +10,32 @@ export interface BoxplotChartProps extends BoxplotChartPropsPreact {
|
|
|
10
10
|
* and center of a data set along an axis.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the BoxplotChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
<BoxplotChart
|
|
17
|
-
:dataOptions="boxplotChartProps.dataOptions"
|
|
18
|
-
:dataSet="boxplotChartProps.dataSet"
|
|
19
|
-
:filters="boxplotChartProps.filters"
|
|
20
|
-
/>
|
|
21
|
-
* </template>
|
|
22
|
-
*
|
|
23
14
|
* <script setup lang="ts">
|
|
24
15
|
* import { ref } from 'vue';
|
|
25
|
-
* import {
|
|
26
|
-
* import * as DM from '
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
16
|
+
* import { BoxplotChart, type BoxplotChartDataOptions } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import * as DM from './sample-ecommerce';
|
|
18
|
+
*
|
|
19
|
+
* const chartProps = ref({
|
|
20
|
+
* dataOptions: {
|
|
21
|
+
* category: [DM.Commerce.Condition],
|
|
22
|
+
* value: [{ column: DM.Commerce.Cost, name: 'Total Cost' }],
|
|
23
|
+
* boxType: 'iqr',
|
|
24
|
+
* outliersEnabled: true,
|
|
25
|
+
* } as BoxplotChartDataOptions,
|
|
26
|
+
* styleOptions: { subtype: 'boxplot/full' },
|
|
27
|
+
* });
|
|
28
|
+
* </script>
|
|
29
|
+
*
|
|
30
|
+
* <template>
|
|
31
|
+
* <BoxplotChart
|
|
32
|
+
* :dataSet="DM.DataSource"
|
|
33
|
+
* :dataOptions="chartProps.dataOptions"
|
|
34
|
+
* :styleOptions="chartProps.styleOptions"
|
|
35
|
+
* />
|
|
36
|
+
* </template>
|
|
41
37
|
* ```
|
|
42
|
-
* <img src="media://
|
|
38
|
+
* <img src="media://boxplot-chart-example-1.png" width="700px" />
|
|
43
39
|
* @param props - Boxplot chart properties
|
|
44
40
|
* @returns Boxplot Chart component
|
|
45
41
|
* @group Charts
|
|
@@ -10,37 +10,31 @@ export interface CalendarHeatmapChartProps extends CalendarHeatmapChartPropsPrea
|
|
|
10
10
|
* making it easy to identify daily patterns or anomalies
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the CalendarHeatmapChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
* <CalendarHeatmapChart
|
|
17
|
-
:dataOptions="calendarChartProps.dataOptions"
|
|
18
|
-
:dataSet="calendarChartProps.dataSet"
|
|
19
|
-
:filters="calendarChartProps.filters"
|
|
20
|
-
:styleOptions="calendarChartProps.styleOptions"
|
|
21
|
-
/>
|
|
22
|
-
* </template>
|
|
23
|
-
*
|
|
24
14
|
* <script setup lang="ts">
|
|
25
15
|
* import { ref } from 'vue';
|
|
26
|
-
* import {
|
|
27
|
-
* import
|
|
28
|
-
* import
|
|
16
|
+
* import { CalendarHeatmapChart } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
18
|
+
* import * as DM from './sample-ecommerce';
|
|
29
19
|
*
|
|
30
|
-
* const
|
|
31
|
-
* dataSet: DM.DataSource,
|
|
20
|
+
* const chartProps = ref({
|
|
32
21
|
* dataOptions: {
|
|
33
|
-
* date: DM.
|
|
34
|
-
* value: measureFactory.sum(DM.
|
|
35
|
-
* },
|
|
36
|
-
* styleOptions: {
|
|
37
|
-
* viewType: 'quarter',
|
|
22
|
+
* date: DM.Commerce.Date.Days,
|
|
23
|
+
* value: { column: measureFactory.sum(DM.Commerce.Quantity, 'Total Quantity') },
|
|
38
24
|
* },
|
|
39
|
-
*
|
|
25
|
+
* styleOptions: { viewType: 'quarter' as const },
|
|
40
26
|
* });
|
|
41
27
|
* </script>
|
|
28
|
+
*
|
|
29
|
+
* <template>
|
|
30
|
+
* <CalendarHeatmapChart
|
|
31
|
+
* :dataSet="DM.DataSource"
|
|
32
|
+
* :dataOptions="chartProps.dataOptions"
|
|
33
|
+
* :styleOptions="chartProps.styleOptions"
|
|
34
|
+
* />
|
|
35
|
+
* </template>
|
|
42
36
|
* ```
|
|
43
|
-
* <img src="media://
|
|
37
|
+
* <img src="media://calendar-heatmap-chart-example-1.png" width="700px" />
|
|
44
38
|
* @param {CalendarHeatmapChartProps} - Calendar heatmap chart properties
|
|
45
39
|
* @returns Calendar Heatmap Chart component
|
|
46
40
|
* @group Charts
|
|
@@ -5,57 +5,28 @@ export { ChartProps };
|
|
|
5
5
|
* A Vue component used for easily switching chart types or rendering multiple series of different chart types.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
*
|
|
9
|
-
* plot a bar chart of the Sample Retail data source hosted in a Sisense instance:
|
|
10
|
-
* ```tsx
|
|
8
|
+
* ```vue
|
|
11
9
|
* <script setup lang="ts">
|
|
12
|
-
* import { Chart } from '@sisense/sdk-ui-vue';
|
|
13
|
-
* import type { ChartProps } from '@sisense/sdk-ui-vue';
|
|
14
|
-
* import * as DM from '../assets/sample-retail-model';
|
|
15
|
-
* import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
16
10
|
* import { ref } from 'vue';
|
|
11
|
+
* import { Chart, ChartDataOptions, ChartType } from '@sisense/sdk-ui-vue';
|
|
12
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
13
|
+
* import * as DM from './sample-ecommerce';
|
|
17
14
|
*
|
|
18
|
-
* const
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
value: [{ column: measureTotalRevenue, sortType: 'sortDesc' }],
|
|
27
|
-
breakBy: [],
|
|
28
|
-
},
|
|
29
|
-
filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 10)],
|
|
30
|
-
styleOptions: {
|
|
31
|
-
xAxis: {
|
|
32
|
-
title: {
|
|
33
|
-
text: 'Product Name',
|
|
34
|
-
enabled: true,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
yAxis: {
|
|
38
|
-
title: {
|
|
39
|
-
text: 'Total Revenue',
|
|
40
|
-
enabled: true,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
});
|
|
15
|
+
* const chartProps = ref({
|
|
16
|
+
* chartType: 'column' as ChartType,
|
|
17
|
+
* dataOptions: {
|
|
18
|
+
* category: [DM.Commerce.Date.Quarters],
|
|
19
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
20
|
+
* breakBy: [],
|
|
21
|
+
* } as ChartDataOptions,
|
|
22
|
+
* });
|
|
45
23
|
* </script>
|
|
46
24
|
*
|
|
47
25
|
* <template>
|
|
48
|
-
|
|
49
|
-
:chartType="chartProps.chartType"
|
|
50
|
-
:dataSet="chartProps.dataSet"
|
|
51
|
-
:dataOptions="chartProps.dataOptions"
|
|
52
|
-
:filters="chartProps.filters"
|
|
53
|
-
:styleOptions="chartProps.styleOptions"
|
|
54
|
-
/>
|
|
26
|
+
* <Chart :chartType="chartProps.chartType" :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
55
27
|
* </template>
|
|
56
28
|
* ```
|
|
57
|
-
*
|
|
58
|
-
* <img src="media://vue-chart-example.png" width="800px" />
|
|
29
|
+
* <img src="media://chart-example-1.png" width="700px" />
|
|
59
30
|
* @shortDescription Common component for rendering charts of different types including table
|
|
60
31
|
* @param props - Chart properties
|
|
61
32
|
* @returns Chart component representing a chart type as specified in `ChartProps.`{@link ChartProps.chartType | chartType}
|
|
@@ -10,36 +10,27 @@ export interface ColumnChartProps extends ColumnChartPropsPreact {
|
|
|
10
10
|
* whose heights are proportional to the values that they represent.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the ColumnChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
<ColumnChart
|
|
17
|
-
:dataOptions="columnChartProps.dataOptions"
|
|
18
|
-
:dataSet="columnChartProps.dataSet"
|
|
19
|
-
:filters="columnChartProps.filters"
|
|
20
|
-
/>
|
|
21
|
-
* </template>
|
|
22
|
-
*
|
|
23
14
|
* <script setup lang="ts">
|
|
24
15
|
* import { ref } from 'vue';
|
|
25
|
-
* import {
|
|
26
|
-
* import
|
|
27
|
-
* import
|
|
16
|
+
* import { ColumnChart } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
18
|
+
* import * as DM from './sample-ecommerce';
|
|
28
19
|
*
|
|
29
|
-
* const
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
* const chartProps = ref({
|
|
21
|
+
* dataOptions: {
|
|
22
|
+
* category: [DM.Commerce.Date.Years],
|
|
23
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
24
|
+
* breakBy: [DM.Commerce.Condition],
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
* </script>
|
|
28
|
+
*
|
|
29
|
+
* <template>
|
|
30
|
+
* <ColumnChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
31
|
+
* </template>
|
|
41
32
|
* ```
|
|
42
|
-
* <img src="media://
|
|
33
|
+
* <img src="media://column-chart-example-1.png" width="700px" />
|
|
43
34
|
* @param props - Column chart properties
|
|
44
35
|
* @returns Column Chart component
|
|
45
36
|
* @group Charts
|
|
@@ -10,38 +10,35 @@ export interface FunnelChartProps extends FunnelChartPropsPreact {
|
|
|
10
10
|
* It maintains compatibility with Vue's reactivity system while preserving the functionality of the FunnelChart.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the FunnelChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
<FunnelChart
|
|
17
|
-
:dataOptions="funnelChartProps.dataOptions"
|
|
18
|
-
:dataSet="funnelChartProps.dataSet"
|
|
19
|
-
:filters="funnelChartProps.filters"
|
|
20
|
-
/>
|
|
21
|
-
* </template>
|
|
22
|
-
*
|
|
23
14
|
* <script setup lang="ts">
|
|
24
15
|
* import { ref } from 'vue';
|
|
25
|
-
* import { FunnelChart,
|
|
26
|
-
* import { measureFactory
|
|
27
|
-
* import * as DM from '
|
|
28
|
-
*
|
|
29
|
-
* const dimProductName = DM.DimProducts.ProductName;
|
|
30
|
-
* const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
|
|
16
|
+
* import { FunnelChart, FunnelStyleOptions } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
18
|
+
* import * as DM from './sample-ecommerce';
|
|
31
19
|
*
|
|
32
|
-
* const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
* const chartProps = ref({
|
|
21
|
+
* dataOptions: {
|
|
22
|
+
* category: [DM.Commerce.AgeRange],
|
|
23
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
24
|
+
* },
|
|
25
|
+
* styleOptions: {
|
|
26
|
+
* funnelType: 'regular',
|
|
27
|
+
* funnelSize: 'regular',
|
|
28
|
+
* funnelDirection: 'regular',
|
|
29
|
+
* } as FunnelStyleOptions,
|
|
30
|
+
* });
|
|
40
31
|
* </script>
|
|
41
|
-
* ```
|
|
42
|
-
* <img src="media://vue-funnel-chart-example.png" width="800"/>
|
|
43
32
|
*
|
|
44
|
-
*
|
|
33
|
+
* <template>
|
|
34
|
+
* <FunnelChart
|
|
35
|
+
* :dataSet="DM.DataSource"
|
|
36
|
+
* :dataOptions="chartProps.dataOptions"
|
|
37
|
+
* :styleOptions="chartProps.styleOptions"
|
|
38
|
+
* />
|
|
39
|
+
* </template>
|
|
40
|
+
* ```
|
|
41
|
+
* <img src="media://funnel-chart-example-1.png" width="700px" />
|
|
45
42
|
* @param props - Funnel chart properties
|
|
46
43
|
* @returns Funnel Chart component
|
|
47
44
|
* @group Charts
|
|
@@ -9,34 +9,104 @@ export interface IndicatorChartProps extends IndicatorChartPropsPreact {
|
|
|
9
9
|
* A Vue component that provides various options for displaying one or two numeric values as a number, gauge or ticker.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* Here's how you can use the IndicatorChart component in a Vue application:
|
|
13
12
|
* ```vue
|
|
13
|
+
* <script setup lang="ts">
|
|
14
|
+
* import { ref } from 'vue';
|
|
15
|
+
* import { IndicatorChart, IndicatorStyleOptions } from '@sisense/sdk-ui-vue';
|
|
16
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
17
|
+
* import * as DM from './sample-ecommerce';
|
|
18
|
+
*
|
|
19
|
+
* const chartProps = ref({
|
|
20
|
+
* dataOptions: {
|
|
21
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
22
|
+
* max: [measureFactory.constant(125000000)],
|
|
23
|
+
* },
|
|
24
|
+
* styleOptions: {
|
|
25
|
+
* indicatorComponents: {
|
|
26
|
+
* title: { shouldBeShown: true, text: 'Total Revenue' },
|
|
27
|
+
* ticks: { shouldBeShown: false },
|
|
28
|
+
* labels: { shouldBeShown: true },
|
|
29
|
+
* },
|
|
30
|
+
* subtype: 'indicator/gauge',
|
|
31
|
+
* skin: 2,
|
|
32
|
+
* } as IndicatorStyleOptions,
|
|
33
|
+
* });
|
|
34
|
+
* </script>
|
|
35
|
+
*
|
|
14
36
|
* <template>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
37
|
+
* <IndicatorChart
|
|
38
|
+
* :dataSet="DM.DataSource"
|
|
39
|
+
* :dataOptions="chartProps.dataOptions"
|
|
40
|
+
* :styleOptions="chartProps.styleOptions"
|
|
41
|
+
* />
|
|
20
42
|
* </template>
|
|
43
|
+
* ```
|
|
44
|
+
* <img src="media://indicator-chart-example-1.png" width="400px" />
|
|
45
|
+
*
|
|
46
|
+
* Numeric indicator variant with a secondary value:
|
|
21
47
|
*
|
|
48
|
+
* ```vue
|
|
22
49
|
* <script setup lang="ts">
|
|
23
50
|
* import { ref } from 'vue';
|
|
24
|
-
* import {
|
|
25
|
-
* import
|
|
26
|
-
* import
|
|
27
|
-
|
|
28
|
-
* const
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
* import { IndicatorChart } from '@sisense/sdk-ui-vue';
|
|
52
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
53
|
+
* import * as DM from './sample-ecommerce';
|
|
54
|
+
*
|
|
55
|
+
* const chartProps = ref({
|
|
56
|
+
* dataOptions: {
|
|
57
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
58
|
+
* // secondary value is optional
|
|
59
|
+
* secondary: [measureFactory.sum(DM.Commerce.Quantity, 'Total Quantity')],
|
|
60
|
+
* },
|
|
61
|
+
* });
|
|
62
|
+
* </script>
|
|
63
|
+
*
|
|
64
|
+
* <template>
|
|
65
|
+
* <IndicatorChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
66
|
+
* </template>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* <img src="media://indicator-chart-example-3.png" width="400px" />
|
|
70
|
+
*
|
|
71
|
+
* Ticker style indicator variant:
|
|
72
|
+
*
|
|
73
|
+
* ```vue
|
|
74
|
+
* <script setup lang="ts">
|
|
75
|
+
* import { ref } from 'vue';
|
|
76
|
+
* import { IndicatorChart, IndicatorStyleOptions } from '@sisense/sdk-ui-vue';
|
|
77
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
78
|
+
* import * as DM from './sample-ecommerce';
|
|
79
|
+
*
|
|
80
|
+
* const chartProps = ref({
|
|
81
|
+
* dataOptions: {
|
|
82
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
83
|
+
* max: [measureFactory.constant(125000000)],
|
|
84
|
+
* },
|
|
85
|
+
* styleOptions: {
|
|
86
|
+
* indicatorComponents: {
|
|
87
|
+
* title: { shouldBeShown: true, text: 'Total Revenue' },
|
|
88
|
+
* ticks: { shouldBeShown: false },
|
|
89
|
+
* labels: { shouldBeShown: true },
|
|
90
|
+
* },
|
|
91
|
+
* subtype: 'indicator/gauge',
|
|
92
|
+
* skin: 2,
|
|
93
|
+
* forceTickerView: true,
|
|
94
|
+
* tickerBarHeight: 30,
|
|
95
|
+
* width: 400,
|
|
96
|
+
* } as IndicatorStyleOptions,
|
|
97
|
+
* });
|
|
37
98
|
* </script>
|
|
99
|
+
*
|
|
100
|
+
* <template>
|
|
101
|
+
* <IndicatorChart
|
|
102
|
+
* :dataSet="DM.DataSource"
|
|
103
|
+
* :dataOptions="chartProps.dataOptions"
|
|
104
|
+
* :styleOptions="chartProps.styleOptions"
|
|
105
|
+
* />
|
|
106
|
+
* </template>
|
|
38
107
|
* ```
|
|
39
|
-
*
|
|
108
|
+
*
|
|
109
|
+
* <img src="media://indicator-chart-example-4.png" width="400px" />
|
|
40
110
|
* @param props - Indicator chart properties
|
|
41
111
|
* @returns Indicator Chart component
|
|
42
112
|
* @group Charts
|
|
@@ -15,37 +15,35 @@ export interface KpiChartProps extends KpiChartPropsPreact {
|
|
|
15
15
|
* a second measure, or against a target.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
* Here's how you can use the KpiChart component in a Vue application:
|
|
19
18
|
* ```vue
|
|
20
|
-
* <template>
|
|
21
|
-
* <KpiChart
|
|
22
|
-
:dataSet="kpiChartProps.dataSet"
|
|
23
|
-
:dataOptions="kpiChartProps.dataOptions"
|
|
24
|
-
:filters="kpiChartProps.filters"
|
|
25
|
-
:styleOptions="kpiChartProps.styleOptions"
|
|
26
|
-
/>
|
|
27
|
-
* </template>
|
|
28
|
-
*
|
|
29
19
|
* <script setup lang="ts">
|
|
30
20
|
* import { ref } from 'vue';
|
|
21
|
+
* import { KpiChart } from '@sisense/sdk-ui-vue';
|
|
22
|
+
* import * as DM from './sample-ecommerce';
|
|
31
23
|
* import { measureFactory } from '@sisense/sdk-data';
|
|
32
|
-
* import * as DM from '../assets/sample-retail-model';
|
|
33
|
-
* import { KpiChart, type KpiChartProps } from '@sisense/sdk-ui-vue';
|
|
34
24
|
*
|
|
35
|
-
* const
|
|
36
|
-
* dataSet: DM.DataSource,
|
|
25
|
+
* const chartProps = ref({
|
|
37
26
|
* dataOptions: {
|
|
38
|
-
* value: measureFactory.sum(DM.
|
|
39
|
-
* category: DM.
|
|
27
|
+
* value: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
|
|
28
|
+
* category: DM.Commerce.Date.Months,
|
|
40
29
|
* comparison: { type: 'previous-period' },
|
|
41
30
|
* },
|
|
42
31
|
* styleOptions: {
|
|
43
|
-
*
|
|
32
|
+
* sparkline: { chartType: 'area' },
|
|
33
|
+
* height: 250,
|
|
44
34
|
* },
|
|
45
|
-
* filters: [],
|
|
46
35
|
* });
|
|
47
36
|
* </script>
|
|
37
|
+
*
|
|
38
|
+
* <template>
|
|
39
|
+
* <KpiChart
|
|
40
|
+
* :dataSet="DM.DataSource"
|
|
41
|
+
* :dataOptions="chartProps.dataOptions"
|
|
42
|
+
* :styleOptions="chartProps.styleOptions"
|
|
43
|
+
* />
|
|
44
|
+
* </template>
|
|
48
45
|
* ```
|
|
46
|
+
* <img src="media://kpi-chart-example-1.png" width="400px" />
|
|
49
47
|
* @param {KpiChartProps} - KPI chart properties
|
|
50
48
|
* @returns KPI Chart component
|
|
51
49
|
* @group Charts
|
|
@@ -10,35 +10,27 @@ export interface LineChartProps extends LineChartPropsPreact {
|
|
|
10
10
|
* It maintains compatibility with Vue's reactivity system while preserving the functionality of the LineChart.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the LineChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
<LineChart
|
|
17
|
-
:dataOptions="lineChartProps.dataOptions"
|
|
18
|
-
:dataSet="lineChartProps.dataSet"
|
|
19
|
-
:filters="lineChartProps.filters"
|
|
20
|
-
/>
|
|
21
|
-
* </template>
|
|
22
|
-
*
|
|
23
14
|
* <script setup lang="ts">
|
|
24
15
|
* import { ref } from 'vue';
|
|
25
|
-
* import {
|
|
26
|
-
* import
|
|
27
|
-
* import
|
|
28
|
-
|
|
29
|
-
* const
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
* import { LineChart } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
18
|
+
* import * as DM from './sample-ecommerce';
|
|
19
|
+
*
|
|
20
|
+
* const chartProps = ref({
|
|
21
|
+
* dataOptions: {
|
|
22
|
+
* category: [DM.Commerce.Date.Quarters],
|
|
23
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
24
|
+
* breakBy: [DM.Commerce.Condition],
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
* </script>
|
|
28
|
+
*
|
|
29
|
+
* <template>
|
|
30
|
+
* <LineChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
31
|
+
* </template>
|
|
40
32
|
* ```
|
|
41
|
-
* <img src="media://
|
|
33
|
+
* <img src="media://line-chart-example-1.png" width="700px" />
|
|
42
34
|
* @param props - Line chart properties
|
|
43
35
|
* @returns Line Chart component
|
|
44
36
|
* @group Charts
|