@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.
- package/dist/charts +13 -13
- package/dist/charts.js +1 -1
- package/dist/charts.js.map +1 -1
- package/dist/charts.map +1 -1
- package/dist/charts.modern.module.js +1 -1
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +1 -1
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChart.d.ts +10 -1
- package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +3 -0
- package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +11 -0
- package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +4 -0
- package/package.json +3 -3
- package/src/components/CarbonChart/CarbonChart.tsx +28 -1
- package/src/components/CarbonChart/CarbonChartArea.stories.tsx +272 -0
- package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +152 -0
- package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +124 -0
- package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +125 -0
- package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +274 -0
- package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +606 -0
- package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +89 -0
- package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1418 -0
- package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +80 -0
- package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +767 -0
- package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1050 -0
- package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +216 -0
- package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +479 -0
- package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +467 -0
- package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +222 -0
- package/src/components/CarbonChart/CarbonChartStep.stories.tsx +173 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react/types-6-0';
|
|
3
|
+
import { CarbonChart, CarbonChartProps, CarbonChartType } from '.';
|
|
4
|
+
import { Card } from 'react-magma-dom';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: CarbonChart,
|
|
8
|
+
title: 'CarbonChart/Gauge',
|
|
9
|
+
argTypes: {
|
|
10
|
+
isInverse: {
|
|
11
|
+
control: {
|
|
12
|
+
type: 'boolean',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
type: {
|
|
16
|
+
control: {
|
|
17
|
+
type: 'select',
|
|
18
|
+
options: CarbonChartType,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
} as Meta;
|
|
23
|
+
|
|
24
|
+
const Template: Story<CarbonChartProps> = args => (
|
|
25
|
+
<Card isInverse={args.isInverse} style={{ padding: '12px' }}>
|
|
26
|
+
<CarbonChart {...args} />
|
|
27
|
+
</Card>
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export const GaugeSemicircularDangerStatus = Template.bind({});
|
|
31
|
+
GaugeSemicircularDangerStatus.args = {
|
|
32
|
+
isInverse: false,
|
|
33
|
+
type: CarbonChartType.gauge,
|
|
34
|
+
dataSet: [
|
|
35
|
+
{
|
|
36
|
+
group: 'value',
|
|
37
|
+
value: 42,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
group: 'delta',
|
|
41
|
+
value: -13.37,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
options: {
|
|
45
|
+
title: 'Gauge semicircular -- danger status',
|
|
46
|
+
resizable: true,
|
|
47
|
+
height: '250px',
|
|
48
|
+
gauge: {
|
|
49
|
+
type: 'semi',
|
|
50
|
+
status: 'danger',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// Uncomment when adding new charts. Issues: #1054, #1055, #1056
|
|
56
|
+
|
|
57
|
+
// export const GaugeCircularWarningStatus = Template.bind({});
|
|
58
|
+
// GaugeCircularWarningStatus.args = {
|
|
59
|
+
// isInverse: false,
|
|
60
|
+
// type: CarbonChartType.gauge,
|
|
61
|
+
// dataSet: [
|
|
62
|
+
// {
|
|
63
|
+
// group: 'value',
|
|
64
|
+
// value: 42,
|
|
65
|
+
// },
|
|
66
|
+
// {
|
|
67
|
+
// group: 'delta',
|
|
68
|
+
// value: -13.37,
|
|
69
|
+
// },
|
|
70
|
+
// ],
|
|
71
|
+
// options: {
|
|
72
|
+
// title: 'Gauge circular -- warning status',
|
|
73
|
+
// resizable: true,
|
|
74
|
+
// height: '250px',
|
|
75
|
+
// gauge: {
|
|
76
|
+
// status: 'warning',
|
|
77
|
+
// type: 'full',
|
|
78
|
+
// },
|
|
79
|
+
// },
|
|
80
|
+
// };
|