@wonderflow/react-components 12.6.0 → 12.8.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/components/card/card.module.css +1 -1
- package/dist/components/product-card/product-card.stories.js +1 -1
- package/dist/components/split-button/split-button.stories.d.ts +1 -1
- package/dist/components/tab/tab.stories.d.ts +1 -0
- package/dist/components/tab/tab.stories.d.ts.map +1 -1
- package/dist/components/tab/tab.stories.js +39 -2
- package/dist/components/table/mocked-data.d.ts +233 -0
- package/dist/components/table/mocked-data.d.ts.map +1 -0
- package/dist/components/table/mocked-data.js +923 -0
- package/dist/components/table/table.stories.d.ts.map +1 -1
- package/dist/components/table/table.stories.js +4 -915
- package/dist/examples/charts/mock-data/channels.d.ts +45 -0
- package/dist/examples/charts/mock-data/channels.d.ts.map +1 -0
- package/dist/examples/charts/mock-data/channels.js +393 -0
- package/dist/examples/charts/mock-data/feedbackCount.d.ts +28 -0
- package/dist/examples/charts/mock-data/feedbackCount.d.ts.map +1 -0
- package/dist/examples/charts/mock-data/feedbackCount.js +283 -0
- package/dist/examples/charts/mock-data/index.d.ts +4 -0
- package/dist/examples/charts/mock-data/index.d.ts.map +1 -0
- package/dist/examples/charts/mock-data/index.js +18 -0
- package/dist/examples/charts/mock-data/prosCons.d.ts +7 -0
- package/dist/examples/charts/mock-data/prosCons.d.ts.map +1 -0
- package/dist/examples/charts/mock-data/prosCons.js +83 -0
- package/dist/examples/charts/storybook/cartesian-base.stories.d.ts +10 -0
- package/dist/examples/charts/storybook/cartesian-base.stories.d.ts.map +1 -0
- package/dist/examples/charts/storybook/cartesian-base.stories.js +114 -0
- package/dist/examples/charts/storybook/line-chart.stories.d.ts +19 -0
- package/dist/examples/charts/storybook/line-chart.stories.d.ts.map +1 -0
- package/dist/examples/charts/storybook/line-chart.stories.js +233 -0
- package/dist/examples/charts/storybook/sb-charts.module.css +1 -0
- package/package.json +24 -4
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Wonderflow Design Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export const feedbackCount = [
|
|
17
|
+
{
|
|
18
|
+
date: '2002',
|
|
19
|
+
overlay: 0.1,
|
|
20
|
+
'feedback count': 16,
|
|
21
|
+
extraData: null,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
date: '2003',
|
|
25
|
+
overlay: 0.11,
|
|
26
|
+
'feedback count': 30,
|
|
27
|
+
extraData: null,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
date: '2004',
|
|
31
|
+
overlay: 0.14,
|
|
32
|
+
'feedback count': 20,
|
|
33
|
+
extraData: null,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
date: '2005',
|
|
37
|
+
overlay: 0.13,
|
|
38
|
+
'feedback count': 52,
|
|
39
|
+
extraData: null,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
date: '2006',
|
|
43
|
+
overlay: 0.14,
|
|
44
|
+
'feedback count': 131,
|
|
45
|
+
extraData: null,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
date: '2007',
|
|
49
|
+
overlay: 0.18,
|
|
50
|
+
'feedback count': 462,
|
|
51
|
+
extraData: null,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
date: '2008',
|
|
55
|
+
overlay: 0.16,
|
|
56
|
+
'feedback count': 419,
|
|
57
|
+
extraData: null,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
date: '2009',
|
|
61
|
+
overlay: 0.13,
|
|
62
|
+
'feedback count': 266,
|
|
63
|
+
extraData: null,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
date: '2010',
|
|
67
|
+
overlay: 0.15,
|
|
68
|
+
'feedback count': 273,
|
|
69
|
+
extraData: null,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
date: '2011',
|
|
73
|
+
overlay: 0.21,
|
|
74
|
+
'feedback count': 491,
|
|
75
|
+
extraData: null,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
date: '2012',
|
|
79
|
+
overlay: 0.22,
|
|
80
|
+
'feedback count': 558,
|
|
81
|
+
extraData: null,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
date: '2013',
|
|
85
|
+
overlay: 0.11,
|
|
86
|
+
'feedback count': 2414,
|
|
87
|
+
extraData: null,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
date: '2014',
|
|
91
|
+
overlay: 0.12,
|
|
92
|
+
'feedback count': 8031,
|
|
93
|
+
extraData: null,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
date: '2015',
|
|
97
|
+
overlay: 0.17,
|
|
98
|
+
'feedback count': 9196,
|
|
99
|
+
extraData: null,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
date: '2016',
|
|
103
|
+
overlay: 0.14,
|
|
104
|
+
'feedback count': 5869,
|
|
105
|
+
extraData: null,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
date: '2017',
|
|
109
|
+
overlay: 0.24,
|
|
110
|
+
'feedback count': 8786,
|
|
111
|
+
extraData: null,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
date: '2018',
|
|
115
|
+
overlay: 0.32,
|
|
116
|
+
'feedback count': 4182,
|
|
117
|
+
extraData: null,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
date: '2019',
|
|
121
|
+
overlay: 0.31,
|
|
122
|
+
'feedback count': 8303,
|
|
123
|
+
extraData: null,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
date: '2020',
|
|
127
|
+
overlay: 0.44,
|
|
128
|
+
'feedback count': 11490,
|
|
129
|
+
extraData: null,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
date: '2021',
|
|
133
|
+
overlay: 0.53,
|
|
134
|
+
'feedback count': 5539,
|
|
135
|
+
extraData: null,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
date: '2022',
|
|
139
|
+
overlay: 0.75,
|
|
140
|
+
'feedback count': 2952,
|
|
141
|
+
extraData: null,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
date: '2023',
|
|
145
|
+
overlay: 0.74,
|
|
146
|
+
'feedback count': 1746,
|
|
147
|
+
extraData: null,
|
|
148
|
+
},
|
|
149
|
+
];
|
|
150
|
+
export const feedbackCountGaps = [
|
|
151
|
+
{
|
|
152
|
+
date: '2002',
|
|
153
|
+
overlay: 0.1,
|
|
154
|
+
'feedback count': 16,
|
|
155
|
+
extraData: null,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
date: '2003',
|
|
159
|
+
overlay: 0.11,
|
|
160
|
+
'feedback count': 30,
|
|
161
|
+
extraData: null,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
date: '2004',
|
|
165
|
+
overlay: 0.14,
|
|
166
|
+
'feedback count': 20,
|
|
167
|
+
extraData: null,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
date: '2005',
|
|
171
|
+
overlay: 0.13,
|
|
172
|
+
'feedback count': 52,
|
|
173
|
+
extraData: null,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
date: '2006',
|
|
177
|
+
overlay: 0.14,
|
|
178
|
+
'feedback count': 131,
|
|
179
|
+
extraData: null,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
date: '2007',
|
|
183
|
+
overlay: 0.18,
|
|
184
|
+
'feedback count': 462,
|
|
185
|
+
extraData: null,
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
date: '2008',
|
|
189
|
+
overlay: 0.16,
|
|
190
|
+
'feedback count': 419,
|
|
191
|
+
extraData: null,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
date: '2009',
|
|
195
|
+
overlay: 0.13,
|
|
196
|
+
'feedback count': null,
|
|
197
|
+
extraData: null,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
date: '2010',
|
|
201
|
+
overlay: 0.15,
|
|
202
|
+
'feedback count': null,
|
|
203
|
+
extraData: null,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
date: '2011',
|
|
207
|
+
overlay: 0.21,
|
|
208
|
+
'feedback count': null,
|
|
209
|
+
extraData: null,
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
date: '2012',
|
|
213
|
+
overlay: null,
|
|
214
|
+
'feedback count': null,
|
|
215
|
+
extraData: null,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
date: '2013',
|
|
219
|
+
overlay: null,
|
|
220
|
+
'feedback count': 2414,
|
|
221
|
+
extraData: null,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
date: '2014',
|
|
225
|
+
overlay: null,
|
|
226
|
+
'feedback count': 8031,
|
|
227
|
+
extraData: null,
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
date: '2015',
|
|
231
|
+
overlay: null,
|
|
232
|
+
'feedback count': 9196,
|
|
233
|
+
extraData: null,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
date: '2016',
|
|
237
|
+
overlay: 0.14,
|
|
238
|
+
'feedback count': 5869,
|
|
239
|
+
extraData: null,
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
date: '2017',
|
|
243
|
+
overlay: 0.24,
|
|
244
|
+
'feedback count': 8786,
|
|
245
|
+
extraData: null,
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
date: '2018',
|
|
249
|
+
overlay: 0.32,
|
|
250
|
+
'feedback count': 4182,
|
|
251
|
+
extraData: null,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
date: '2019',
|
|
255
|
+
overlay: 0.31,
|
|
256
|
+
'feedback count': null,
|
|
257
|
+
extraData: null,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
date: '2020',
|
|
261
|
+
overlay: 0.44,
|
|
262
|
+
'feedback count': null,
|
|
263
|
+
extraData: null,
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
date: '2021',
|
|
267
|
+
overlay: null,
|
|
268
|
+
'feedback count': null,
|
|
269
|
+
extraData: null,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
date: '2022',
|
|
273
|
+
overlay: 0.75,
|
|
274
|
+
'feedback count': 2952,
|
|
275
|
+
extraData: null,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
date: '2023',
|
|
279
|
+
overlay: 0.74,
|
|
280
|
+
'feedback count': 1746,
|
|
281
|
+
extraData: null,
|
|
282
|
+
},
|
|
283
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/mock-data/index.ts"],"names":[],"mappings":"AAgBA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Wonderflow Design Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export * from './channels';
|
|
17
|
+
export * from './feedbackCount';
|
|
18
|
+
export * from './prosCons';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prosCons.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/mock-data/prosCons.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,OAAO;;;;;GAmEnB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Wonderflow Design Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export const proCons = [
|
|
17
|
+
{
|
|
18
|
+
date: '2013',
|
|
19
|
+
positive: 1,
|
|
20
|
+
neutral: 2,
|
|
21
|
+
negative: 1,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
date: '2014',
|
|
25
|
+
positive: 8,
|
|
26
|
+
neutral: 2,
|
|
27
|
+
negative: 17,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
date: '2015',
|
|
31
|
+
positive: 17,
|
|
32
|
+
neutral: 12,
|
|
33
|
+
negative: 33,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
date: '2016',
|
|
37
|
+
positive: 30,
|
|
38
|
+
neutral: 7,
|
|
39
|
+
negative: 48,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
date: '2017',
|
|
43
|
+
positive: 55,
|
|
44
|
+
neutral: 23,
|
|
45
|
+
negative: 92,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
date: '2018',
|
|
49
|
+
positive: 53,
|
|
50
|
+
neutral: 31,
|
|
51
|
+
negative: 108,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
date: '2019',
|
|
55
|
+
positive: 52,
|
|
56
|
+
neutral: 18,
|
|
57
|
+
negative: 112,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
date: '2020',
|
|
61
|
+
positive: 79,
|
|
62
|
+
neutral: 5,
|
|
63
|
+
negative: 111,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
date: '2021',
|
|
67
|
+
positive: 54,
|
|
68
|
+
neutral: 24,
|
|
69
|
+
negative: 77,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
date: '2022',
|
|
73
|
+
positive: 24,
|
|
74
|
+
neutral: 6,
|
|
75
|
+
negative: 62,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
date: '2023',
|
|
79
|
+
positive: 24,
|
|
80
|
+
neutral: 11,
|
|
81
|
+
negative: 34,
|
|
82
|
+
},
|
|
83
|
+
];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
|
+
import { CartesianBase } from '@wonderflow/charts';
|
|
4
|
+
declare const story: ComponentMeta<typeof CartesianBase>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Default: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
|
|
7
|
+
export declare const TwoAxis: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
|
|
8
|
+
export declare const WithLegend: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
|
|
9
|
+
export declare const WithCustomEmptyState: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
|
|
10
|
+
//# sourceMappingURL=cartesian-base.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartesian-base.stories.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/storybook/cartesian-base.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOnD,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,aAAa,CAmE9C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,qFAAoB,CAAC;AAGzC,eAAO,MAAM,OAAO,qFAAoB,CAAC;AAiCzC,eAAO,MAAM,UAAU,qFAAoB,CAAC;AAG5C,eAAO,MAAM,oBAAoB,qFAAoB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CartesianBase } from '@wonderflow/charts';
|
|
3
|
+
import { InfoState, Stack } from '../../..';
|
|
4
|
+
// import { CartesianBase } from '../../../../../charts/src';
|
|
5
|
+
import styles from './sb-charts.module.css';
|
|
6
|
+
const story = {
|
|
7
|
+
title: 'Charts/Cartesian Base',
|
|
8
|
+
component: CartesianBase,
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Chart Title',
|
|
11
|
+
subtitle: 'Subtitle text',
|
|
12
|
+
isLoading: false,
|
|
13
|
+
preventResponsive: false,
|
|
14
|
+
grid: {
|
|
15
|
+
tickColumns: 10,
|
|
16
|
+
tickRows: 10,
|
|
17
|
+
},
|
|
18
|
+
axis: {
|
|
19
|
+
top: {
|
|
20
|
+
domain: [
|
|
21
|
+
'ALabelThatExceedTwentyCharacters',
|
|
22
|
+
'BLabelThatExceedTwentyCharacters',
|
|
23
|
+
'CLabelThatExceedTwentyCharacters',
|
|
24
|
+
'DLabelThatExceedTwentyCharacters',
|
|
25
|
+
'ELabelThatExceedTwentyCharacters',
|
|
26
|
+
'FLabelThatExceedTwentyCharacters',
|
|
27
|
+
],
|
|
28
|
+
orientation: 'top',
|
|
29
|
+
scaleType: 'label',
|
|
30
|
+
label: 'Top Label',
|
|
31
|
+
paddingOuter: 0,
|
|
32
|
+
paddingInner: 1,
|
|
33
|
+
tickFormat: (v, i) => (`Prefix${i} + ${v} + Suffix`),
|
|
34
|
+
hideAxisLine: false,
|
|
35
|
+
hideTickLabel: false,
|
|
36
|
+
hideTicks: false,
|
|
37
|
+
},
|
|
38
|
+
right: {
|
|
39
|
+
domain: [0, 0.010],
|
|
40
|
+
orientation: 'right',
|
|
41
|
+
scaleType: 'linear',
|
|
42
|
+
label: 'Right Label',
|
|
43
|
+
tickFormat: (v) => `${JSON.stringify(v)} $`,
|
|
44
|
+
hideAxisLine: false,
|
|
45
|
+
hideTickLabel: false,
|
|
46
|
+
hideTicks: false,
|
|
47
|
+
},
|
|
48
|
+
bottom: {
|
|
49
|
+
domain: [new Date('2020-01-01').getTime(), new Date('2022-01-01').getTime()],
|
|
50
|
+
orientation: 'bottom',
|
|
51
|
+
label: 'Bottom Label',
|
|
52
|
+
scaleType: 'time',
|
|
53
|
+
hideAxisLine: false,
|
|
54
|
+
hideTickLabel: false,
|
|
55
|
+
hideTicks: false,
|
|
56
|
+
},
|
|
57
|
+
left: {
|
|
58
|
+
domain: [0, 10000],
|
|
59
|
+
orientation: 'left',
|
|
60
|
+
scaleType: 'linear',
|
|
61
|
+
label: 'Left Label',
|
|
62
|
+
hideAxisLine: false,
|
|
63
|
+
hideTickLabel: false,
|
|
64
|
+
hideTicks: false,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
styleConfig: {},
|
|
68
|
+
children: undefined,
|
|
69
|
+
},
|
|
70
|
+
argTypes: {},
|
|
71
|
+
};
|
|
72
|
+
export default story;
|
|
73
|
+
const Template = args => _jsx(CartesianBase, { ...args });
|
|
74
|
+
export const Default = Template.bind({});
|
|
75
|
+
Default.args = {};
|
|
76
|
+
export const TwoAxis = Template.bind({});
|
|
77
|
+
TwoAxis.args = {
|
|
78
|
+
grid: {
|
|
79
|
+
hideColumns: true,
|
|
80
|
+
tickColumns: 10,
|
|
81
|
+
tickRows: 5,
|
|
82
|
+
otherProps: {
|
|
83
|
+
strokeDasharray: '3 2',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
axis: {
|
|
87
|
+
top: undefined,
|
|
88
|
+
right: undefined,
|
|
89
|
+
bottom: {
|
|
90
|
+
domain: [new Date('2020-01-01').getTime(), new Date('2020-01-10').getTime()],
|
|
91
|
+
orientation: 'bottom',
|
|
92
|
+
label: 'Time',
|
|
93
|
+
scaleType: 'time',
|
|
94
|
+
numTicks: 10,
|
|
95
|
+
},
|
|
96
|
+
left: {
|
|
97
|
+
domain: [0, 1000],
|
|
98
|
+
orientation: 'left',
|
|
99
|
+
scaleType: 'linear',
|
|
100
|
+
label: 'Quantity',
|
|
101
|
+
hideAxisLine: true,
|
|
102
|
+
hideTicks: true,
|
|
103
|
+
hideZero: true,
|
|
104
|
+
numTicks: 10,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
export const WithLegend = Template.bind({});
|
|
109
|
+
WithLegend.args = { customLegend: _jsx("ul", { children: _jsx("li", { style: { fontSize: '12px' }, children: "some legend content here" }) }) };
|
|
110
|
+
export const WithCustomEmptyState = Template.bind({});
|
|
111
|
+
WithCustomEmptyState.args = {
|
|
112
|
+
axis: { ...story.args.axis, top: undefined, right: undefined },
|
|
113
|
+
emptyState: (_jsx(Stack, { vAlign: "center", hAlign: "center", className: styles.InfoState, children: _jsx(InfoState, { title: "With Info State", icon: "compass", children: _jsx(Stack, { hAlign: "center", fill: false, children: "This custom empty state uses an Info State component." }) }) })),
|
|
114
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
|
+
import { LineChart, LineChartProps } from '@wonderflow/charts';
|
|
4
|
+
declare const story: ComponentMeta<typeof LineChart>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Default: ComponentStory<import("react").FC<LineChartProps>>;
|
|
7
|
+
export declare const withOverlay: ComponentStory<import("react").FC<LineChartProps>>;
|
|
8
|
+
export declare const withMissingData: ComponentStory<import("react").FC<LineChartProps>>;
|
|
9
|
+
export declare const withMultipleSeries: ComponentStory<import("react").FC<LineChartProps>>;
|
|
10
|
+
export declare const withLabelIndex: ComponentStory<import("react").FC<LineChartProps>>;
|
|
11
|
+
export declare const withNestedData: ComponentStory<import("react").FC<LineChartProps>>;
|
|
12
|
+
export declare const withCustomLineStyle: ComponentStory<import("react").FC<LineChartProps>>;
|
|
13
|
+
export declare const withCustomDomain: ComponentStory<import("react").FC<LineChartProps>>;
|
|
14
|
+
export declare const withVerticalLayout: ComponentStory<import("react").FC<LineChartProps>>;
|
|
15
|
+
export declare const withNoData: ComponentStory<import("react").FC<LineChartProps>>;
|
|
16
|
+
export declare const renderAsLines: ComponentStory<import("react").FC<LineChartProps>>;
|
|
17
|
+
export declare const renderAsSteps: ComponentStory<import("react").FC<LineChartProps>>;
|
|
18
|
+
export declare const WithinCard: ComponentStory<import("react").FC<LineChartProps>>;
|
|
19
|
+
//# sourceMappingURL=line-chart.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-chart.stories.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/storybook/line-chart.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAwB,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAUrF,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAyC1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,oDAAoB,CAAC;AAGzC,eAAO,MAAM,WAAW,oDAAoB,CAAC;AAS7C,eAAO,MAAM,eAAe,oDAAoB,CAAC;AAUjD,eAAO,MAAM,kBAAkB,oDAAoB,CAAC;AAiBpD,eAAO,MAAM,cAAc,oDAAoB,CAAC;AAehD,eAAO,MAAM,cAAc,oDAAoB,CAAC;AAgChD,eAAO,MAAM,mBAAmB,oDAAoB,CAAC;AA8BrD,eAAO,MAAM,gBAAgB,oDAAoB,CAAC;AAclD,eAAO,MAAM,kBAAkB,oDAAoB,CAAC;AAiBpD,eAAO,MAAM,UAAU,oDAAoB,CAAC;AAQ5C,eAAO,MAAM,aAAa,oDAAoB,CAAC;AAiB/C,eAAO,MAAM,aAAa,oDAAoB,CAAC;AA0B/C,eAAO,MAAM,UAAU,oDAA8B,CAAC"}
|