@react-magma/charts 10.0.0 → 11.0.0-next.1

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 (43) hide show
  1. package/dist/charts +13 -13
  2. package/dist/charts.js +1 -1
  3. package/dist/charts.js.map +1 -1
  4. package/dist/charts.map +1 -1
  5. package/dist/charts.modern.module.js +1 -1
  6. package/dist/charts.modern.module.js.map +1 -1
  7. package/dist/charts.umd.js +1 -1
  8. package/dist/charts.umd.js.map +1 -1
  9. package/dist/components/CarbonChart/CarbonChart.d.ts +10 -1
  10. package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +3 -0
  11. package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +1 -0
  12. package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +1 -0
  13. package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +1 -0
  14. package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +4 -0
  15. package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +4 -0
  16. package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +4 -0
  17. package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +4 -0
  18. package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +4 -0
  19. package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +4 -0
  20. package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +11 -0
  21. package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +4 -0
  22. package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +4 -0
  23. package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +4 -0
  24. package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +4 -0
  25. package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +4 -0
  26. package/package.json +3 -3
  27. package/src/components/CarbonChart/CarbonChart.tsx +28 -1
  28. package/src/components/CarbonChart/CarbonChartArea.stories.tsx +272 -0
  29. package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +152 -0
  30. package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +124 -0
  31. package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +125 -0
  32. package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +274 -0
  33. package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +606 -0
  34. package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +89 -0
  35. package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1418 -0
  36. package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +80 -0
  37. package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +767 -0
  38. package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1050 -0
  39. package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +216 -0
  40. package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +479 -0
  41. package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +467 -0
  42. package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +222 -0
  43. package/src/components/CarbonChart/CarbonChartStep.stories.tsx +173 -0
@@ -7,10 +7,19 @@ export declare enum CarbonChartType {
7
7
  bar = "bar",
8
8
  barGrouped = "barGrouped",
9
9
  barStacked = "barStacked",
10
+ boxplot = "boxplot",
11
+ bubble = "bubble",
12
+ bullet = "bullet",
10
13
  donut = "donut",
14
+ gauge = "gauge",
15
+ histogram = "histogram",
11
16
  line = "line",
17
+ lollipop = "lollipop",
18
+ meter = "meter",
12
19
  pie = "pie",
13
- lollipop = "lollipop"
20
+ radar = "radar",
21
+ scatter = "scatter",
22
+ combo = "combo"
14
23
  }
15
24
  export interface CarbonChartProps extends React.HTMLAttributes<HTMLDivElement> {
16
25
  dataSet: Array<Object>;
@@ -3,6 +3,9 @@ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@s
3
3
  export default _default;
4
4
  export declare const AreaTimeSeriesNaturalCurve: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
5
5
  export declare const AreaTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
6
+ export declare const AreaDiscreteDomain: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
6
7
  export declare const BoundedAreaTimeSeriesNaturalCurve: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
8
+ export declare const AreaMultipleBoundedAreasNaturalCurve: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
9
+ export declare const AreaMultipleBoundedAreasNaturalCurveZoomBarEnabled: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
7
10
  export declare const AreaSkeleton: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
8
11
  export declare const AreaEmptyState: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -4,3 +4,4 @@ export default _default;
4
4
  export declare const StackedAreaTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
5
5
  export declare const StackedAreaTimeSeriesWithUnevenData: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
6
6
  export declare const StackedAreaPercentage: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
7
+ export declare const VerticalStackedAreatimeSeriesWithToolbarOverride: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -1,6 +1,7 @@
1
1
  import { CarbonChartProps } from '.';
2
2
  declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
3
  export default _default;
4
+ export declare const PreSelectedgroupsGroupedBar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
4
5
  export declare const VerticalGroupedBarDiscrete: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
5
6
  export declare const VerticalGroupedBarTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
6
7
  export declare const VerticalGroupedBarTimeSeriesDenseData: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -11,3 +11,4 @@ export declare const HorizontalStackedBarDiscrete: import("@storybook/csf").Anno
11
11
  export declare const HorizontalStackedBarTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
12
12
  export declare const HorizontalStackedBarEmptyState: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
13
13
  export declare const HorizontalStackedBarSkeleton: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
14
+ export declare const CustomTicksStackedBar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const HorizontalBoxplot: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const BubbleLinear: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const BasicBullet: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const ComboLineAndSimpleBarCustomConfigs: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const GaugeSemicircularDangerStatus: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const HistogramLinear: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -1,9 +1,20 @@
1
1
  import { CarbonChartProps } from '.';
2
2
  declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
3
  export default _default;
4
+ export declare const CustomDomainLine: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
5
+ export declare const RotatedTicksLine: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
6
+ export declare const LineTimeSeries15SecondInterval: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
7
+ export declare const LogAxis: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
8
+ export declare const PreSelectedGroupsLine: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
9
+ export declare const LeftAlignedVerticalLegendLine: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
10
+ export declare const ThresholdsLine: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
11
+ export declare const LineTimeSeriesSingleDatum: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
12
+ export declare const TruncatedlabelsLine: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
4
13
  export declare const LineDiscrete: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
5
14
  export declare const LineTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
6
15
  export declare const LineDenseTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
7
16
  export declare const LineLineDualDualAxes: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
17
+ export declare const LineTimeSeriesAllLabelsInPrimaryFormat: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
18
+ export declare const LineTimeSeriesTwoIcons: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
8
19
  export declare const LineEmptyState: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
9
20
  export declare const LineSkeleton: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const MeterChartWithStatuses: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const Radar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const ScatterLinearXAndY: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const AreaSparkline: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
@@ -0,0 +1,4 @@
1
+ import { CarbonChartProps } from '.';
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const StepTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-magma/charts",
3
- "version": "10.0.0",
3
+ "version": "11.0.0-next.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,7 +31,7 @@
31
31
  "@emotion/styled": "^11.13.0",
32
32
  "react": "^17.0.2",
33
33
  "react-dom": "^17.0.2",
34
- "react-magma-dom": "^4.7.0-next.1",
34
+ "react-magma-dom": "^4.8.0-next.0",
35
35
  "react-magma-icons": "^3.0.0"
36
36
  },
37
37
  "dependencies": {
@@ -48,7 +48,7 @@
48
48
  "identity-obj-proxy": "^3.0.0",
49
49
  "react": "^17.0.2",
50
50
  "react-dom": "^17.0.2",
51
- "react-magma-dom": "^4.7.0",
51
+ "react-magma-dom": "^4.8.0-next.0",
52
52
  "react-magma-icons": "^3.0.0"
53
53
  },
54
54
  "exports": {
@@ -12,6 +12,15 @@ import {
12
12
  PieChart,
13
13
  SimpleBarChart,
14
14
  StackedBarChart,
15
+ RadarChart,
16
+ BoxplotChart,
17
+ BubbleChart,
18
+ BulletChart,
19
+ GaugeChart,
20
+ HistogramChart,
21
+ MeterChart,
22
+ ScatterChart,
23
+ ComboChart,
15
24
  } from '@carbon/charts-react';
16
25
  import './styles.min.css';
17
26
 
@@ -21,10 +30,19 @@ export enum CarbonChartType {
21
30
  bar = 'bar',
22
31
  barGrouped = 'barGrouped',
23
32
  barStacked = 'barStacked',
33
+ boxplot = 'boxplot',
34
+ bubble = 'bubble',
35
+ bullet = 'bullet',
24
36
  donut = 'donut',
37
+ gauge = 'gauge',
38
+ histogram = 'histogram',
25
39
  line = 'line',
26
- pie = 'pie',
27
40
  lollipop = 'lollipop',
41
+ meter = 'meter',
42
+ pie = 'pie',
43
+ radar = 'radar',
44
+ scatter = 'scatter',
45
+ combo = 'combo',
28
46
  }
29
47
 
30
48
  export interface CarbonChartProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -460,6 +478,15 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
460
478
  line: LineChart,
461
479
  lollipop: LollipopChart,
462
480
  pie: PieChart,
481
+ radar: RadarChart,
482
+ boxplot: BoxplotChart,
483
+ bubble: BubbleChart,
484
+ bullet: BulletChart,
485
+ gauge: GaugeChart,
486
+ histogram: HistogramChart,
487
+ meter: MeterChart,
488
+ scatter: ScatterChart,
489
+ combo: ComboChart,
463
490
  };
464
491
 
465
492
  function buildColors() {
@@ -201,6 +201,105 @@ AreaTimeSeries.args = {
201
201
  },
202
202
  };
203
203
 
204
+ export const AreaDiscreteDomain = Template.bind({});
205
+ AreaDiscreteDomain.args = {
206
+ isInverse: false,
207
+ type: CarbonChartType.area,
208
+ dataSet: [
209
+ {
210
+ group: 'Dataset 1',
211
+ value: 10000,
212
+ key: 'a',
213
+ },
214
+ {
215
+ group: 'Dataset 1',
216
+ value: 65000,
217
+ key: 'b',
218
+ },
219
+ {
220
+ group: 'Dataset 1',
221
+ value: 10000,
222
+ key: 'c',
223
+ },
224
+ {
225
+ group: 'Dataset 1',
226
+ value: 49213,
227
+ key: 'd',
228
+ },
229
+ {
230
+ group: 'Dataset 1',
231
+ value: 51213,
232
+ key: 'e',
233
+ },
234
+ {
235
+ group: 'Dataset 2',
236
+ value: 20000,
237
+ key: 'a',
238
+ },
239
+ {
240
+ group: 'Dataset 2',
241
+ value: 25000,
242
+ key: 'b',
243
+ },
244
+ {
245
+ group: 'Dataset 2',
246
+ value: 60000,
247
+ key: 'c',
248
+ },
249
+ {
250
+ group: 'Dataset 2',
251
+ value: 30213,
252
+ key: 'd',
253
+ },
254
+ {
255
+ group: 'Dataset 2',
256
+ value: 55213,
257
+ key: 'e',
258
+ },
259
+ {
260
+ group: 'Dataset 3',
261
+ value: 30000,
262
+ key: 'a',
263
+ },
264
+ {
265
+ group: 'Dataset 3',
266
+ value: 20000,
267
+ key: 'b',
268
+ },
269
+ {
270
+ group: 'Dataset 3',
271
+ value: 40000,
272
+ key: 'c',
273
+ },
274
+ {
275
+ group: 'Dataset 3',
276
+ value: 60213,
277
+ key: 'd',
278
+ },
279
+ {
280
+ group: 'Dataset 3',
281
+ value: 25213,
282
+ key: 'e',
283
+ },
284
+ ],
285
+ options: {
286
+ title: 'Discrete Domain',
287
+ axes: {
288
+ bottom: {
289
+ title: '2023 Annual Sales Figures',
290
+ mapsTo: 'key',
291
+ scaleType: 'labels',
292
+ },
293
+ left: {
294
+ mapsTo: 'value',
295
+ title: 'Conversion rate',
296
+ scaleType: 'linear',
297
+ },
298
+ },
299
+ height: '400px',
300
+ },
301
+ };
302
+
204
303
  export const BoundedAreaTimeSeriesNaturalCurve = Template.bind({});
205
304
  BoundedAreaTimeSeriesNaturalCurve.args = {
206
305
  isInverse: false,
@@ -268,6 +367,179 @@ BoundedAreaTimeSeriesNaturalCurve.args = {
268
367
  },
269
368
  };
270
369
 
370
+ export const AreaMultipleBoundedAreasNaturalCurve = Template.bind({});
371
+ AreaMultipleBoundedAreasNaturalCurve.args = {
372
+ isInverse: false,
373
+ type: CarbonChartType.area,
374
+ dataSet: [
375
+ {
376
+ group: 'Dataset 1',
377
+ date: '2023-01-01',
378
+ value: 47263,
379
+ min: 40000,
380
+ max: 50000,
381
+ },
382
+ {
383
+ group: 'Dataset 1',
384
+ date: '2023-01-05',
385
+ value: 14178,
386
+ min: 10000,
387
+ max: 20000,
388
+ },
389
+ {
390
+ group: 'Dataset 1',
391
+ date: '2023-01-08',
392
+ value: 23094,
393
+ min: 10000,
394
+ max: 25000,
395
+ },
396
+ {
397
+ group: 'Dataset 1',
398
+ date: '2023-01-13',
399
+ value: 45281,
400
+ min: 42000,
401
+ max: 50000,
402
+ },
403
+ {
404
+ group: 'Dataset 1',
405
+ date: '2023-01-19',
406
+ value: -63954,
407
+ min: -70000,
408
+ max: -10000,
409
+ },
410
+ ],
411
+ options: {
412
+ title: 'Multiple Bounded Areas (Natural Curve)',
413
+ legend: {
414
+ enabled: false,
415
+ },
416
+ bounds: {
417
+ upperBoundMapsTo: 'max',
418
+ lowerBoundMapsTo: 'min',
419
+ },
420
+ axes: {
421
+ bottom: {
422
+ title: '2023 Annual Sales Figures',
423
+ mapsTo: 'date',
424
+ scaleType: 'time',
425
+ highlights: {
426
+ highlightStartMapsTo: 'startHighlight',
427
+ highlightEndMapsTo: 'endHighlight',
428
+ labelMapsTo: 'label',
429
+ data: [
430
+ {
431
+ startHighlight: new Date(2023, 0, 3, 0, 0, 0),
432
+ label: 'Custom formatter',
433
+ endHighlight: new Date(2023, 0, 8, 0, 0, 0),
434
+ },
435
+ {
436
+ startHighlight: new Date(2023, 0, 13, 0, 0, 0),
437
+ label: 'Custom formatter',
438
+ endHighlight: new Date(2023, 0, 14, 0, 0, 0),
439
+ },
440
+ ],
441
+ },
442
+ },
443
+ left: {
444
+ mapsTo: 'value',
445
+ scaleType: 'linear',
446
+ },
447
+ },
448
+ curve: 'curveNatural',
449
+ height: '400px',
450
+ },
451
+ };
452
+
453
+ export const AreaMultipleBoundedAreasNaturalCurveZoomBarEnabled = Template.bind(
454
+ {}
455
+ );
456
+ AreaMultipleBoundedAreasNaturalCurveZoomBarEnabled.args = {
457
+ isInverse: false,
458
+ type: CarbonChartType.area,
459
+ dataSet: [
460
+ {
461
+ group: 'Dataset 1',
462
+ date: '2023-01-01',
463
+ value: 47263,
464
+ min: 40000,
465
+ max: 50000,
466
+ },
467
+ {
468
+ group: 'Dataset 1',
469
+ date: '2023-01-05',
470
+ value: 14178,
471
+ min: 10000,
472
+ max: 20000,
473
+ },
474
+ {
475
+ group: 'Dataset 1',
476
+ date: '2023-01-08',
477
+ value: 23094,
478
+ min: 10000,
479
+ max: 25000,
480
+ },
481
+ {
482
+ group: 'Dataset 1',
483
+ date: '2023-01-13',
484
+ value: 45281,
485
+ min: 42000,
486
+ max: 50000,
487
+ },
488
+ {
489
+ group: 'Dataset 1',
490
+ date: '2023-01-19',
491
+ value: -63954,
492
+ min: -70000,
493
+ max: -10000,
494
+ },
495
+ ],
496
+ options: {
497
+ title: 'Multiple Bounded Areas (Natural Curve) - Zoom bar enabled',
498
+ legend: {
499
+ enabled: false,
500
+ },
501
+ bounds: {
502
+ upperBoundMapsTo: 'max',
503
+ lowerBoundMapsTo: 'min',
504
+ },
505
+ axes: {
506
+ bottom: {
507
+ title: '2023 Annual Sales Figures',
508
+ mapsTo: 'date',
509
+ scaleType: 'time',
510
+ highlights: {
511
+ highlightStartMapsTo: 'startHighlight',
512
+ highlightEndMapsTo: 'endHighlight',
513
+ labelMapsTo: 'label',
514
+ data: [
515
+ {
516
+ startHighlight: new Date(2023, 0, 3, 0, 0, 0),
517
+ label: 'Custom formatter',
518
+ endHighlight: new Date(2023, 0, 8, 0, 0, 0),
519
+ },
520
+ {
521
+ startHighlight: new Date(2023, 0, 13, 0, 0, 0),
522
+ label: 'Custom formatter',
523
+ endHighlight: new Date(2023, 0, 14, 0, 0, 0),
524
+ },
525
+ ],
526
+ },
527
+ },
528
+ left: {
529
+ mapsTo: 'value',
530
+ scaleType: 'linear',
531
+ },
532
+ },
533
+ curve: 'curveNatural',
534
+ height: '400px',
535
+ zoomBar: {
536
+ top: {
537
+ enabled: true,
538
+ },
539
+ },
540
+ },
541
+ };
542
+
271
543
  export const AreaSkeleton = Template.bind({});
272
544
  AreaSkeleton.args = {
273
545
  isInverse: false,
@@ -311,3 +311,155 @@ StackedAreaPercentage.args = {
311
311
  height: '400px',
312
312
  },
313
313
  };
314
+
315
+ export const VerticalStackedAreatimeSeriesWithToolbarOverride = Template.bind(
316
+ {}
317
+ );
318
+ VerticalStackedAreatimeSeriesWithToolbarOverride.args = {
319
+ isInverse: false,
320
+ type: CarbonChartType.areaStacked,
321
+ dataSet: [
322
+ {
323
+ group: 'Dataset 1',
324
+ date: '2019-01-01T05:00:00.000Z',
325
+ value: 10000,
326
+ },
327
+ {
328
+ group: 'Dataset 1',
329
+ date: '2019-01-05T05:00:00.000Z',
330
+ value: 65000,
331
+ },
332
+ {
333
+ group: 'Dataset 1',
334
+ date: '2019-01-08T05:00:00.000Z',
335
+ value: 10000,
336
+ },
337
+ {
338
+ group: 'Dataset 1',
339
+ date: '2019-01-13T05:00:00.000Z',
340
+ value: 49213,
341
+ },
342
+ {
343
+ group: 'Dataset 1',
344
+ date: '2019-01-17T05:00:00.000Z',
345
+ value: 51213,
346
+ },
347
+ {
348
+ group: 'Dataset 2',
349
+ date: '2019-01-03T05:00:00.000Z',
350
+ value: 75000,
351
+ },
352
+ {
353
+ group: 'Dataset 2',
354
+ date: '2019-01-06T05:00:00.000Z',
355
+ value: 57312,
356
+ },
357
+ {
358
+ group: 'Dataset 2',
359
+ date: '2019-01-08T05:00:00.000Z',
360
+ value: 21432,
361
+ },
362
+ {
363
+ group: 'Dataset 2',
364
+ date: '2019-01-15T05:00:00.000Z',
365
+ value: 70323,
366
+ },
367
+ {
368
+ group: 'Dataset 2',
369
+ date: '2019-01-19T05:00:00.000Z',
370
+ value: 21300,
371
+ },
372
+ {
373
+ group: 'Dataset 3',
374
+ date: '2019-01-01T05:00:00.000Z',
375
+ value: 50000,
376
+ },
377
+ {
378
+ group: 'Dataset 3',
379
+ date: '2019-01-05T05:00:00.000Z',
380
+ value: 15000,
381
+ },
382
+ {
383
+ group: 'Dataset 3',
384
+ date: '2019-01-08T05:00:00.000Z',
385
+ value: 20000,
386
+ },
387
+ {
388
+ group: 'Dataset 3',
389
+ date: '2019-01-13T05:00:00.000Z',
390
+ value: 39213,
391
+ },
392
+ {
393
+ group: 'Dataset 3',
394
+ date: '2019-01-17T05:00:00.000Z',
395
+ value: 61213,
396
+ },
397
+ {
398
+ group: 'Dataset 4',
399
+ date: '2019-01-02T05:00:00.000Z',
400
+ value: 10,
401
+ },
402
+ {
403
+ group: 'Dataset 4',
404
+ date: '2019-01-06T05:00:00.000Z',
405
+ value: 37312,
406
+ },
407
+ {
408
+ group: 'Dataset 4',
409
+ date: '2019-01-08T05:00:00.000Z',
410
+ value: 51432,
411
+ },
412
+ {
413
+ group: 'Dataset 4',
414
+ date: '2019-01-15T05:00:00.000Z',
415
+ value: 40323,
416
+ },
417
+ {
418
+ group: 'Dataset 4',
419
+ date: '2019-01-19T05:00:00.000Z',
420
+ value: 31300,
421
+ },
422
+ ],
423
+ options: {
424
+ title: 'Vertical stacked area (time series) w/toolbar override',
425
+ axes: {
426
+ left: {
427
+ mapsTo: 'value',
428
+ stacked: true,
429
+ },
430
+ bottom: {
431
+ mapsTo: 'date',
432
+ scaleType: 'time',
433
+ },
434
+ },
435
+ toolbar: {
436
+ enabled: true,
437
+ numberOfIcons: 3,
438
+ controls: [
439
+ {
440
+ type: 'Zoom in',
441
+ },
442
+ {
443
+ type: 'Zoom out',
444
+ },
445
+ {
446
+ type: 'Reset zoom',
447
+ },
448
+ {
449
+ type: 'Custom',
450
+ text: 'Custom button',
451
+ iconSVG: {
452
+ content: `<path d="M23,13H18v2h5v2H19a2,2,0,0,0-2,2v2a2,2,0,0,0,2,2h6V15A2,2,0,0,0,23,13Zm0,8H19V19h4Z"/>
453
+ <path d="M13,9H9a2,2,0,0,0-2,2V23H9V18h4v5h2V11A2,2,0,0,0,13,9ZM9,16V11h4v5Z"/><rect data-name="&lt;Transparent Rectangle&gt;" width="32" height="32" style="fill: none"/>`,
454
+ },
455
+ },
456
+ ],
457
+ },
458
+ zoomBar: {
459
+ top: {
460
+ enabled: true,
461
+ },
462
+ },
463
+ height: '400px',
464
+ },
465
+ };