@sisense/sdk-ui-vue 2.35.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.
Files changed (29) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +6 -0
  3. package/dist/src/components/charts/area-chart.d.ts +12 -20
  4. package/dist/src/components/charts/area-range-chart.d.ts +39 -28
  5. package/dist/src/components/charts/areamap-chart.d.ts +23 -25
  6. package/dist/src/components/charts/bar-chart.d.ts +16 -25
  7. package/dist/src/components/charts/boxplot-chart.d.ts +22 -26
  8. package/dist/src/components/charts/calendar-heatmap-chart.d.ts +16 -22
  9. package/dist/src/components/charts/chart.d.ts +14 -43
  10. package/dist/src/components/charts/column-chart.d.ts +16 -25
  11. package/dist/src/components/charts/funnel-chart.d.ts +23 -26
  12. package/dist/src/components/charts/indicator-chart.d.ts +90 -20
  13. package/dist/src/components/charts/kpi-chart.d.ts +16 -18
  14. package/dist/src/components/charts/line-chart.d.ts +17 -25
  15. package/dist/src/components/charts/pie-chart.d.ts +20 -23
  16. package/dist/src/components/charts/pivot-table.d.ts +251 -18
  17. package/dist/src/components/charts/polar-chart.d.ts +16 -24
  18. package/dist/src/components/charts/sankey-chart.d.ts +13 -14
  19. package/dist/src/components/charts/scatter-chart.d.ts +23 -23
  20. package/dist/src/components/charts/scattermap-chart.d.ts +19 -23
  21. package/dist/src/components/charts/streamgraph-chart.d.ts +51 -17
  22. package/dist/src/components/charts/sunburst-chart.d.ts +15 -23
  23. package/dist/src/components/charts/table.d.ts +27 -24
  24. package/dist/src/components/charts/treemap-chart.d.ts +15 -23
  25. package/dist/src/components/widgets/chart-widget.d.ts +29 -42
  26. package/dist/src/components/widgets/widget-by-id.d.ts +12 -0
  27. package/dist/src/components/widgets/widget.d.ts +8 -8
  28. package/dist/src/sdk-ui-core-exports.d.ts +1 -1
  29. package/package.json +3 -3
@@ -5,41 +5,274 @@ export { PivotTableProps };
5
5
  * A Vue component for Pivot table with pagination.
6
6
  *
7
7
  * @example
8
- * Here's how you can use the PivotTable component in a Vue application:
9
8
  * ```vue
9
+ * <script setup lang="ts">
10
+ * import { ref } from 'vue';
11
+ * import { PivotTable } from '@sisense/sdk-ui-vue';
12
+ * import * as DM from './sample-ecommerce';
13
+ * import { measureFactory } from '@sisense/sdk-data';
14
+ *
15
+ * const pivotTableProps = ref({
16
+ * dataOptions: {
17
+ * rows: [
18
+ * {
19
+ * column: DM.Commerce.Date.Years,
20
+ * dateFormat: 'yyyy',
21
+ * name: 'Year',
22
+ * },
23
+ * DM.Commerce.Condition,
24
+ * ],
25
+ * columns: [DM.Commerce.AgeRange],
26
+ * values: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
27
+ * },
28
+ * styleOptions: {
29
+ * rowsPerPage: 10,
30
+ * height: 425,
31
+ * width: 800,
32
+ * },
33
+ * });
34
+ * </script>
35
+ *
10
36
  * <template>
11
- <PivotTable :dataOptions="pivotTableProps.dataOptions" :dataSet="pivotTableProps.dataSet"
12
- :styleOptions="pivotTableProps.styleOptions" :filters="pivotTableProps.filters" />
37
+ * <PivotTable
38
+ * :dataSet="DM.DataSource"
39
+ * :dataOptions="pivotTableProps.dataOptions"
40
+ * :styleOptions="pivotTableProps.styleOptions"
41
+ * />
13
42
  * </template>
43
+ * ```
44
+ *
45
+ * <img src="media://pivot-table-example-1.png" width="800px" />
46
+ *
47
+ * Additional examples:
14
48
  *
49
+ * Highlighting relative magnitude within a column with data bars:
50
+ * ```vue
15
51
  * <script setup lang="ts">
16
52
  * import { ref } from 'vue';
17
- * import { measureFactory, filterFactory } from '@sisense/sdk-data';
18
- * import { PivotTable, type PivotTableProps } from '@sisense/sdk-ui-vue';
19
- * import * as DM from '../assets/sample-retail-model';
53
+ * import { PivotTable } from '@sisense/sdk-ui-vue';
54
+ * import * as DM from './sample-ecommerce';
55
+ * import { measureFactory } from '@sisense/sdk-data';
56
+ *
57
+ * const pivotTableProps = ref({
58
+ * dataOptions: {
59
+ * rows: [DM.Commerce.Condition, DM.Commerce.AgeRange],
60
+ * columns: [
61
+ * {
62
+ * column: DM.Commerce.Date.Years,
63
+ * dateFormat: 'yyyy',
64
+ * name: 'Year',
65
+ * },
66
+ * ],
67
+ * values: [
68
+ * {
69
+ * column: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
70
+ * dataBars: true,
71
+ * },
72
+ * ],
73
+ * },
74
+ * styleOptions: {
75
+ * rowsPerPage: 10,
76
+ * height: 425,
77
+ * width: 850,
78
+ * },
79
+ * });
80
+ * </script>
81
+ *
82
+ * <template>
83
+ * <PivotTable
84
+ * :dataSet="DM.DataSource"
85
+ * :dataOptions="pivotTableProps.dataOptions"
86
+ * :styleOptions="pivotTableProps.styleOptions"
87
+ * />
88
+ * </template>
89
+ * ```
20
90
  *
21
- * const dimCategoryName = DM.DimProducts.CategoryName;
22
- * const dimColor = DM.DimProducts.Color;
23
- * const dimProductName = DM.DimProducts.ProductName;
24
- * const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
91
+ * <img src="media://pivot-table-example-2.png" width="800px" />
25
92
  *
26
- * const pivotTableProps = ref<PivotTableProps>({
27
- * dataSet: DM.DataSource,
93
+ * Sorting rows: `Condition` and `Age Range` rows sorted directly by their own values (equivalent to a user clicking a row heading and choosing Sort Descending):
94
+ * ```vue
95
+ * <script setup lang="ts">
96
+ * import { ref } from 'vue';
97
+ * import { PivotTable } from '@sisense/sdk-ui-vue';
98
+ * import * as DM from './sample-ecommerce';
99
+ * import { measureFactory } from '@sisense/sdk-data';
100
+ *
101
+ * const pivotTableProps = ref({
28
102
  * dataOptions: {
29
- * rows: [dimProductName, dimColor],
30
- * columns: [dimCategoryName],
31
- * values: [measureTotalRevenue],
103
+ * rows: [
104
+ * {
105
+ * column: DM.Commerce.Condition,
106
+ * sortType: 'sortDesc',
107
+ * },
108
+ * {
109
+ * column: DM.Commerce.AgeRange,
110
+ * sortType: 'sortDesc',
111
+ * },
112
+ * ],
113
+ * columns: [{ column: DM.Commerce.Date.Years }],
114
+ * values: [
115
+ * { column: measureFactory.sum(DM.Commerce.Revenue, 'Revenue') },
116
+ * { column: measureFactory.sum(DM.Commerce.Quantity, 'Units') },
117
+ * ],
32
118
  * },
33
119
  * styleOptions: {
120
+ * rowsPerPage: 12,
121
+ * height: 425,
34
122
  * width: 1200,
35
- * height: 500,
36
123
  * },
37
- * filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 1000)],
38
124
  * });
125
+ * </script>
126
+ *
127
+ * <template>
128
+ * <PivotTable
129
+ * :dataSet="DM.DataSource"
130
+ * :dataOptions="pivotTableProps.dataOptions"
131
+ * :styleOptions="pivotTableProps.styleOptions"
132
+ * />
133
+ * </template>
134
+ * ```
135
+ *
136
+ * <img src="media://pivot-table-example-3.png" width="800px" />
137
+ *
138
+ * Sorting rows by a value column: `Age Range` sorted by its `Revenue` values (equivalent to a user clicking the `Revenue` value heading and sorting `Age Range` Descending):
139
+ * ```vue
140
+ * <script setup lang="ts">
141
+ * import { ref } from 'vue';
142
+ * import { PivotTable } from '@sisense/sdk-ui-vue';
143
+ * import * as DM from './sample-ecommerce';
144
+ * import { measureFactory } from '@sisense/sdk-data';
145
+ *
146
+ * const pivotTableProps = ref({
147
+ * dataOptions: {
148
+ * rows: [
149
+ * DM.Commerce.Condition,
150
+ * {
151
+ * column: DM.Commerce.AgeRange,
152
+ * sortType: {
153
+ * direction: 'sortDesc',
154
+ * by: {
155
+ * valuesIndex: 0,
156
+ * },
157
+ * },
158
+ * },
159
+ * ],
160
+ * values: [
161
+ * measureFactory.sum(DM.Commerce.Revenue, 'Revenue'),
162
+ * measureFactory.sum(DM.Commerce.Quantity, 'Units'),
163
+ * ],
164
+ * },
165
+ * styleOptions: {
166
+ * rowsPerPage: 12,
167
+ * height: 425,
168
+ * width: 800,
169
+ * },
170
+ * });
171
+ * </script>
172
+ *
173
+ * <template>
174
+ * <PivotTable
175
+ * :dataSet="DM.DataSource"
176
+ * :dataOptions="pivotTableProps.dataOptions"
177
+ * :styleOptions="pivotTableProps.styleOptions"
178
+ * />
179
+ * </template>
180
+ * ```
181
+ *
182
+ * <img src="media://pivot-table-example-4.png" width="800px" />
183
+ *
184
+ * Grand totals across rows and columns:
185
+ * ```vue
186
+ * <script setup lang="ts">
187
+ * import { ref } from 'vue';
188
+ * import { PivotTable } from '@sisense/sdk-ui-vue';
189
+ * import * as DM from './sample-ecommerce';
190
+ * import { measureFactory } from '@sisense/sdk-data';
191
+ *
192
+ * const pivotTableProps = ref({
193
+ * dataOptions: {
194
+ * rows: [
195
+ * {
196
+ * column: DM.Commerce.Date.Years,
197
+ * dateFormat: 'yyyy',
198
+ * name: 'Year',
199
+ * },
200
+ * DM.Commerce.Condition,
201
+ * ],
202
+ * columns: [DM.Commerce.AgeRange],
203
+ * values: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
204
+ * grandTotals: {
205
+ * rows: true,
206
+ * columns: true,
207
+ * },
208
+ * },
209
+ * styleOptions: {
210
+ * rowsPerPage: 15,
211
+ * height: 550,
212
+ * width: 900,
213
+ * totalsColor: true,
214
+ * headersColor: true,
215
+ * },
216
+ * });
217
+ * </script>
218
+ *
219
+ * <template>
220
+ * <PivotTable
221
+ * :dataSet="DM.DataSource"
222
+ * :dataOptions="pivotTableProps.dataOptions"
223
+ * :styleOptions="pivotTableProps.styleOptions"
224
+ * />
225
+ * </template>
226
+ * ```
227
+ *
228
+ * <img src="media://pivot-table-example-5.png" width="800px" />
229
+ *
230
+ * Grand totals plus a subtotal row per `Year`, via {@link PivotTableDataOptions.rows}' `includeSubTotals`:
231
+ * ```vue
232
+ * <script setup lang="ts">
233
+ * import { ref } from 'vue';
234
+ * import { PivotTable } from '@sisense/sdk-ui-vue';
235
+ * import * as DM from './sample-ecommerce';
236
+ * import { measureFactory } from '@sisense/sdk-data';
39
237
  *
238
+ * const pivotTableProps = ref({
239
+ * dataOptions: {
240
+ * rows: [
241
+ * {
242
+ * column: DM.Commerce.Date.Years,
243
+ * dateFormat: 'yyyy',
244
+ * name: 'Year',
245
+ * includeSubTotals: true,
246
+ * },
247
+ * DM.Commerce.Condition,
248
+ * ],
249
+ * columns: [DM.Commerce.AgeRange],
250
+ * values: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
251
+ * grandTotals: {
252
+ * rows: true,
253
+ * columns: true,
254
+ * },
255
+ * },
256
+ * styleOptions: {
257
+ * rowsPerPage: 15,
258
+ * height: 550,
259
+ * width: 900,
260
+ * totalsColor: true,
261
+ * headersColor: true,
262
+ * },
263
+ * });
40
264
  * </script>
265
+ *
266
+ * <template>
267
+ * <PivotTable
268
+ * :dataSet="DM.DataSource"
269
+ * :dataOptions="pivotTableProps.dataOptions"
270
+ * :styleOptions="pivotTableProps.styleOptions"
271
+ * />
272
+ * </template>
41
273
  * ```
42
- * <img src="media://vue-pivot-table-example.png" width="800px" />
274
+ *
275
+ * <img src="media://pivot-table-example-6.png" width="800px" />
43
276
  *
44
277
  * @remarks
45
278
  * Configuration options can also be applied within the scope of a `<SisenseContextProvider>` to control the default behavior of PivotTable, by changing available settings within `appConfig.chartConfig.tabular.*`
@@ -9,35 +9,27 @@ export interface PolarChartProps extends PolarChartPropsPreact {
9
9
  * A Vue component comparing multiple categories/variables with a spacial perspective in a radial chart.
10
10
  *
11
11
  * @example
12
- * Here's how you can use the PolarChart component in a Vue application:
13
12
  * ```vue
14
- * <template>
15
- <PolarChart
16
- :dataOptions="polarChartProps.dataOptions"
17
- :dataSet="polarChartProps.dataSet"
18
- :filters="polarChartProps.filters"
19
- />
20
- * </template>
21
- *
22
13
  * <script setup lang="ts">
23
14
  * import { ref } from 'vue';
24
- * import { measureFactory, filterFactory } from '@sisense/sdk-data';
25
- * import * as DM from '../assets/sample-retail-model';
26
- * import { PolarChart,type PolarChartProps } from '@sisense/sdk-ui-vue';
15
+ * import { PolarChart } from '@sisense/sdk-ui-vue';
16
+ * import { measureFactory } from '@sisense/sdk-data';
17
+ * import * as DM from './sample-ecommerce';
27
18
  *
28
- * const dimProductName = DM.DimProducts.ProductName;
29
- * const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
30
- * const polarChartProps = ref<PolarChartProps>({
31
- dataSet: DM.DataSource,
32
- dataOptions: {
33
- category: [dimProductName],
34
- value: [{ column: measureTotalRevenue, sortType: 'sortDesc' }],
35
- breakBy: [],
36
- },
37
- filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 10)],
38
- });
19
+ * const chartProps = ref({
20
+ * dataOptions: {
21
+ * category: [DM.Commerce.AgeRange],
22
+ * value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
23
+ * breakBy: [],
24
+ * },
25
+ * });
26
+ * </script>
27
+ *
28
+ * <template>
29
+ * <PolarChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
30
+ * </template>
39
31
  * ```
40
- * <img src="media://vue-polar-chart-example.png" width="600px" />
32
+ * <img src="media://polar-chart-example-1.png" width="700px" />
41
33
  * @param props - Polar chart properties
42
34
  * @returns Polar Chart component
43
35
  * @group Charts
@@ -12,27 +12,17 @@ export interface SankeyChartProps extends SankeyChartPropsPreact {
12
12
  * between two connected nodes.
13
13
  *
14
14
  * @example
15
- * Here's how you can use the SankeyChart component in a Vue application:
16
15
  * ```vue
17
- * <template>
18
- * <SankeyChart
19
- * :dataOptions="sankeyChartProps.dataOptions"
20
- * :dataSet="sankeyChartProps.dataSet"
21
- * :styleOptions="sankeyChartProps.styleOptions"
22
- * />
23
- * </template>
24
- *
25
16
  * <script setup lang="ts">
26
17
  * import { ref } from 'vue';
18
+ * import { SankeyChart } from '@sisense/sdk-ui-vue';
19
+ * import * as DM from './sample-ecommerce';
27
20
  * import { measureFactory } from '@sisense/sdk-data';
28
- * import * as DM from '../assets/sample-ecommerce';
29
- * import { SankeyChart, type SankeyChartProps } from '@sisense/sdk-ui-vue';
30
21
  *
31
- * const sankeyChartProps = ref<SankeyChartProps>({
32
- * dataSet: DM.DataSource,
22
+ * const chartProps = ref({
33
23
  * dataOptions: {
34
24
  * category: [DM.Commerce.Gender, DM.Commerce.AgeRange],
35
- * value: measureFactory.sum(DM.Commerce.Revenue, 'Revenue'),
25
+ * value: measureFactory.sum(DM.Commerce.Revenue),
36
26
  * },
37
27
  * styleOptions: {
38
28
  * orientation: 'horizontal',
@@ -40,7 +30,16 @@ export interface SankeyChartProps extends SankeyChartPropsPreact {
40
30
  * },
41
31
  * });
42
32
  * </script>
33
+ *
34
+ * <template>
35
+ * <SankeyChart
36
+ * :dataSet="DM.DataSource"
37
+ * :dataOptions="chartProps.dataOptions"
38
+ * :styleOptions="chartProps.styleOptions"
39
+ * />
40
+ * </template>
43
41
  * ```
42
+ * <img src="media://sankey-chart-example-1.png" width="700px" />
44
43
  * @param {SankeyChartProps} - Sankey chart properties
45
44
  * @returns Sankey Chart component
46
45
  * @group Charts
@@ -15,34 +15,34 @@ export interface ScatterChartProps extends ScatterChartPropsPreact {
15
15
  * If omitted, all scatter points are equal in size. If used, the circle sizes are relative to their values.
16
16
  *
17
17
  * @example
18
- * Here's how you can use the ScatterChart component in a Vue application:
19
18
  * ```vue
20
- * <template>
21
- <ScatterChart
22
- :dataOptions="scatterChartProps.dataOptions"
23
- :dataSet="scatterChartProps.dataSet"
24
- :filters="scatterChartProps.filters"
25
- />
26
- * </template>
27
- *
28
19
  * <script setup lang="ts">
29
20
  * import { ref } from 'vue';
30
- * import { measureFactory, filterFactory } from '@sisense/sdk-data';
31
- * import * as DM from '../assets/sample-retail-model';
32
- * import { ScatterChart, type ScatterChartProps } from '@sisense/sdk-ui-vue';
21
+ * import { ScatterChart } from '@sisense/sdk-ui-vue';
22
+ * import { measureFactory } from '@sisense/sdk-data';
23
+ * import * as DM from './sample-ecommerce';
33
24
  *
34
- * const dimProductName = DM.DimProducts.ProductName;
35
- * const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
36
- * const scatterChartProps = ref<ScatterChartProps>({
37
- dataSet: DM.DataSource,
38
- dataOptions: {
39
- x: dimProductName,
40
- y: measureTotalRevenue,
41
- },
42
- filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 10)],
43
- });
25
+ * const chartProps = ref({
26
+ * dataOptions: {
27
+ * x: DM.Category.CategoryID,
28
+ * y: measureFactory.sum(DM.Commerce.Revenue),
29
+ * breakByColor: DM.Commerce.Gender,
30
+ * },
31
+ * styleOptions: {
32
+ * yAxis: { enabled: true, logarithmic: true, title: { enabled: true, text: 'Total Revenue' } },
33
+ * },
34
+ * });
35
+ * </script>
36
+ *
37
+ * <template>
38
+ * <ScatterChart
39
+ * :dataSet="DM.DataSource"
40
+ * :dataOptions="chartProps.dataOptions"
41
+ * :styleOptions="chartProps.styleOptions"
42
+ * />
43
+ * </template>
44
44
  * ```
45
- * <img src="media://vue-scatter-chart-example.png" width="800px" />
45
+ * <img src="media://scatter-chart-example-1.png" width="700px" />
46
46
  * @param props - Scatter chart properties
47
47
  * @returns Scatter Chart component
48
48
  * @group Charts
@@ -10,35 +10,31 @@ export interface ScattermapChartProps extends ScattermapChartPropsPreact {
10
10
  * It maintains compatibility with Vue's reactivity system while preserving the functionality of the ScattermapChart.
11
11
  *
12
12
  * @example
13
- * Here's how you can use the ScattermapChart component in a Vue application:
14
13
  * ```vue
15
- * <template>
16
- <ScattermapChart
17
- :dataOptions="scattermapChartProps.dataOptions"
18
- :dataSet="scattermapChartProps.dataSet"
19
- :filters="scattermapChartProps.filters"
20
- />
21
- * </template>
22
- *
23
14
  * <script setup lang="ts">
24
15
  * import { ref } from 'vue';
25
- * import { measureFactory, filterFactory } from '@sisense/sdk-data';
26
- * import * as DM from '../assets/sample-retail-model';
27
- * import { ScattermapChart,type ScattermapChartProps } from '@sisense/sdk-ui-vue';
16
+ * import { ScattermapChart, type ScattermapChartDataOptions } from '@sisense/sdk-ui-vue';
17
+ * import { measureFactory } from '@sisense/sdk-data';
18
+ * import * as DM from './sample-ecommerce';
28
19
  *
29
- * const dimProductName = DM.DimProducts.ProductName;
30
- * const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
31
- * const scattermapChartProps = ref<ScattermapChartProps>({
32
- dataSet: DM.DataSource,
33
- dataOptions: {
34
- geo: [DM.DimCountries.CountryName],
35
- size: { column: measureTotalRevenue, title: 'Total Revenue' },
36
- },
37
- filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 10)],
38
- });
20
+ * const chartProps = ref<{ dataOptions: ScattermapChartDataOptions }>({
21
+ * dataOptions: {
22
+ * geo: [DM.Country.Country],
23
+ * size: measureFactory.sum(DM.Commerce.Cost, 'Size by Cost'),
24
+ * colorBy: {
25
+ * column: measureFactory.rank(measureFactory.sum(DM.Commerce.Revenue, 'Color by Revenue Rank')),
26
+ * color: { type: 'range', steps: 7, minColor: '#cf9270', maxColor: '#3900b3' },
27
+ * },
28
+ * details: DM.Brand.Brand,
29
+ * },
30
+ * });
39
31
  * </script>
32
+ *
33
+ * <template>
34
+ * <ScattermapChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
35
+ * </template>
40
36
  * ```
41
- * <img src="media://vue-scattermap-chart-example.png" width="600px" />
37
+ * <img src="media://scattermap-chart-example-1.png" width="700px" />
42
38
  * @param props - Scattermap chart properties
43
39
  * @returns Scattermap Chart component
44
40
  * @group Charts
@@ -14,37 +14,71 @@ export interface StreamgraphChartProps extends StreamgraphChartPropsPreact {
14
14
  * overall patterns and trends.
15
15
  *
16
16
  * @example
17
- * Here's how you can use the StreamgraphChart component in a Vue application:
18
17
  * ```vue
18
+ * <script setup lang="ts">
19
+ * import { ref } from 'vue';
20
+ * import { StreamgraphChart } from '@sisense/sdk-ui-vue';
21
+ * import * as DM from './sample-ecommerce';
22
+ * import { measureFactory } from '@sisense/sdk-data';
23
+ *
24
+ * const chartProps = ref({
25
+ * dataOptions: {
26
+ * category: [DM.Commerce.Date.Quarters],
27
+ * value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
28
+ * breakBy: [DM.Commerce.Condition],
29
+ * },
30
+ * });
31
+ * </script>
32
+ *
19
33
  * <template>
20
- * <StreamgraphChart
21
- * :dataOptions="streamgraphChartProps.dataOptions"
22
- * :dataSet="streamgraphChartProps.dataSet"
23
- * :filters="streamgraphChartProps.filters"
24
- * :styleOptions="streamgraphChartProps.styleOptions"
25
- * />
34
+ * <StreamgraphChart
35
+ * :dataSet="DM.DataSource"
36
+ * :dataOptions="chartProps.dataOptions"
37
+ * />
26
38
  * </template>
39
+ * ```
40
+ * <img src="media://streamgraph-chart-example-1.png" width="700px" />
27
41
  *
42
+ * Additional examples:
43
+ *
44
+ * Styled with a visible y-axis, thinned-out x-axis labels, and a legend:
45
+ * ```vue
28
46
  * <script setup lang="ts">
29
47
  * import { ref } from 'vue';
30
- * import { measureFactory, filterFactory } from '@sisense/sdk-data';
31
- * import * as DM from '../assets/sample-ecommerce';
32
- * import { StreamgraphChart, type StreamgraphChartProps } from '@sisense/sdk-ui-vue';
48
+ * import { StreamgraphChart } from '@sisense/sdk-ui-vue';
49
+ * import * as DM from './sample-ecommerce';
50
+ * import { measureFactory } from '@sisense/sdk-data';
33
51
  *
34
- * const streamgraphChartProps = ref<StreamgraphChartProps>({
35
- * dataSet: DM.DataSource,
52
+ * const chartProps = ref({
36
53
  * dataOptions: {
37
54
  * category: [DM.Commerce.Date.Quarters],
38
- * value: [measureFactory.sum(DM.Commerce.Revenue, 'Revenue')],
39
- * breakBy: [DM.Category.Category],
55
+ * value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
56
+ * breakBy: [DM.Commerce.Condition],
40
57
  * },
41
- * filters: [filterFactory.members(DM.Category.Category, ['Electronics', 'Clothing'])],
42
58
  * styleOptions: {
43
- * width: 1200,
44
- * height: 500,
59
+ * yAxis: {
60
+ * enabled: true,
61
+ * labels: { enabled: true },
62
+ * gridLines: false,
63
+ * },
64
+ * xAxis: {
65
+ * intervalJumps: 4,
66
+ * isIntervalEnabled: true,
67
+ * },
68
+ * legend: { enabled: true },
45
69
  * },
46
70
  * });
71
+ * </script>
72
+ *
73
+ * <template>
74
+ * <StreamgraphChart
75
+ * :dataSet="DM.DataSource"
76
+ * :dataOptions="chartProps.dataOptions"
77
+ * :styleOptions="chartProps.styleOptions"
78
+ * />
79
+ * </template>
47
80
  * ```
81
+ * <img src="media://streamgraph-chart-example-2.png" width="700px" />
48
82
  * @param {StreamgraphChartProps} - Streamgraph chart properties
49
83
  * @returns Streamgraph Chart component
50
84
  * @group Charts
@@ -10,34 +10,26 @@ export interface SunburstChartProps extends SunburstChartPropsPreact {
10
10
  * It maintains compatibility with Vue's reactivity system while preserving the functionality of the SunburstChart.
11
11
  *
12
12
  * @example
13
- * Here's how you can use the SunburstChart component in a Vue application:
14
13
  * ```vue
15
- * <template>
16
- <SunburstChart
17
- :dataOptions="sunburstChartProps.dataOptions"
18
- :dataSet="sunburstChartProps.dataSet"
19
- :filters="sunburstChartProps.filters"
20
- />
21
- * </template>
22
- *
23
14
  * <script setup lang="ts">
24
15
  * import { ref } from 'vue';
25
- * import { measureFactory, filterFactory } from '@sisense/sdk-data';
26
- * import * as DM from '../assets/sample-retail-model';
27
- * import { SunburstChart,type SunburstChartProps } from '@sisense/sdk-ui-vue';
16
+ * import { SunburstChart } from '@sisense/sdk-ui-vue';
17
+ * import { measureFactory } from '@sisense/sdk-data';
18
+ * import * as DM from './sample-ecommerce';
28
19
  *
29
- * const dimProductName = DM.DimProducts.ProductName;
30
- * const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
31
- * const sunburstChartProps = ref<SunburstChartProps>({
32
- dataSet: DM.DataSource,
33
- dataOptions: {
34
- category: [dimProductName],
35
- value: [{ column: measureTotalRevenue, sortType: 'sortDesc' }],
36
- },
37
- filters: [filterFactory.topRanking(dimProductName, measureTotalRevenue, 10)],
38
- });
20
+ * const chartProps = ref({
21
+ * dataOptions: {
22
+ * category: [DM.Commerce.Condition, DM.Commerce.AgeRange],
23
+ * value: [measureFactory.sum(DM.Commerce.Quantity, 'Total Quantity')],
24
+ * },
25
+ * });
26
+ * </script>
27
+ *
28
+ * <template>
29
+ * <SunburstChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
30
+ * </template>
39
31
  * ```
40
- * <img src="media://vue-sunburst-chart-example.png" width="600px" />
32
+ * <img src="media://sunburst-chart-example-1.png" width="700px" />
41
33
  * @param props - Sunburst Chart properties
42
34
  * @returns Sunburst Chart component
43
35
  * @group Charts