@react-magma/charts 12.0.0-next.6 → 12.0.1-next.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 (45) hide show
  1. package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +308 -10
  2. package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +134 -5
  3. package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +212 -10
  4. package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +80 -4
  5. package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +232 -11
  6. package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +264 -12
  7. package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +51 -3
  8. package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +194 -7
  9. package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +33 -2
  10. package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +578 -13
  11. package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +118 -6
  12. package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +41 -3
  13. package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +87 -4
  14. package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +575 -18
  15. package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +53 -3
  16. package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +125 -6
  17. package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +99 -6
  18. package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +96 -5
  19. package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +171 -7
  20. package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +49 -2
  21. package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +36 -2
  22. package/dist/components/LineChart/LineChart.stories.d.ts +132 -21
  23. package/package.json +3 -3
  24. package/src/components/CarbonChart/CarbonChartArea.stories.tsx +674 -649
  25. package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +424 -414
  26. package/src/components/CarbonChart/CarbonChartBar.stories.tsx +352 -325
  27. package/src/components/CarbonChart/CarbonChartBarFloating.stories.tsx +127 -116
  28. package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +872 -843
  29. package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +913 -879
  30. package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +238 -232
  31. package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +565 -547
  32. package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +59 -56
  33. package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1335 -1299
  34. package/src/components/CarbonChart/CarbonChartDonut.stories.tsx +170 -153
  35. package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +50 -44
  36. package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +733 -724
  37. package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1656 -1605
  38. package/src/components/CarbonChart/CarbonChartLollipop.stories.tsx +81 -76
  39. package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +177 -162
  40. package/src/components/CarbonChart/CarbonChartPie.stories.tsx +154 -139
  41. package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +445 -433
  42. package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +427 -409
  43. package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +191 -188
  44. package/src/components/CarbonChart/CarbonChartStep.stories.tsx +145 -142
  45. package/src/components/LineChart/LineChart.stories.tsx +91 -104
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { Story, Meta } from '@storybook/react/types-6-0';
3
+ import { StoryFn, Meta } from '@storybook/react/types-6-0';
4
4
  import { Card } from 'react-magma-dom';
5
5
 
6
6
  import { CarbonChart, CarbonChartProps, CarbonChartType } from '.';
@@ -23,69 +23,72 @@ export default {
23
23
  },
24
24
  } as Meta;
25
25
 
26
- const Template: Story<CarbonChartProps> = args => (
26
+ const Template: StoryFn<CarbonChartProps> = args => (
27
27
  <Card isInverse={args.isInverse} style={{ padding: '12px' }}>
28
28
  <CarbonChart {...args} />
29
29
  </Card>
30
30
  );
31
31
 
32
- export const BasicBullet = Template.bind({});
33
- BasicBullet.args = {
34
- isInverse: false,
35
- type: CarbonChartType.bullet,
36
- dataSet: [
37
- {
38
- title: 'Item E',
39
- group: 'D3',
40
- ranges: [350, 650, 980],
41
- marker: 1575,
42
- value: 400,
43
- },
44
- {
45
- title: 'Item D',
46
- group: 'D2',
47
- ranges: [750, 1200, null],
48
- marker: 1725,
49
- value: 2100,
50
- },
51
- {
52
- title: 'Item C',
53
- group: 'D3',
54
- ranges: [350, 500, 1005],
55
- marker: 1340,
56
- value: 550,
57
- },
58
- {
59
- title: 'Item B',
60
- group: 'D1',
61
- ranges: [300, 895, 1600],
62
- marker: 1455,
63
- value: 1000,
64
- },
65
- {
66
- title: 'Item A',
67
- group: 'D1',
68
- ranges: [800, 1000, 1400],
69
- marker: 1275,
70
- value: 250,
71
- },
72
- ],
73
- options: {
74
- title: 'Basic bullet',
75
- axes: {
76
- bottom: {
77
- mapsTo: 'value',
78
- extendLinearDomainBy: 'marker',
32
+ export const BasicBullet = {
33
+ render: Template,
34
+
35
+ args: {
36
+ isInverse: false,
37
+ type: CarbonChartType.bullet,
38
+ dataSet: [
39
+ {
40
+ title: 'Item E',
41
+ group: 'D3',
42
+ ranges: [350, 650, 980],
43
+ marker: 1575,
44
+ value: 400,
45
+ },
46
+ {
47
+ title: 'Item D',
48
+ group: 'D2',
49
+ ranges: [750, 1200, null],
50
+ marker: 1725,
51
+ value: 2100,
52
+ },
53
+ {
54
+ title: 'Item C',
55
+ group: 'D3',
56
+ ranges: [350, 500, 1005],
57
+ marker: 1340,
58
+ value: 550,
59
+ },
60
+ {
61
+ title: 'Item B',
62
+ group: 'D1',
63
+ ranges: [300, 895, 1600],
64
+ marker: 1455,
65
+ value: 1000,
79
66
  },
80
- left: {
81
- scaleType: 'labels',
82
- mapsTo: 'title',
67
+ {
68
+ title: 'Item A',
69
+ group: 'D1',
70
+ ranges: [800, 1000, 1400],
71
+ marker: 1275,
72
+ value: 250,
83
73
  },
84
- right: {
85
- scaleType: 'labels-ratio',
86
- mapsTo: 'title',
74
+ ],
75
+ options: {
76
+ title: 'Basic bullet',
77
+ axes: {
78
+ bottom: {
79
+ mapsTo: 'value',
80
+ extendLinearDomainBy: 'marker',
81
+ },
82
+ left: {
83
+ scaleType: 'labels',
84
+ mapsTo: 'title',
85
+ },
86
+ right: {
87
+ scaleType: 'labels-ratio',
88
+ mapsTo: 'title',
89
+ },
87
90
  },
91
+ height: '251px',
88
92
  },
89
- height: '251px',
90
93
  },
91
94
  };