testio-tailwind 3.3.0 → 3.4.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/package.json +1 -1
- package/src/assets/scripts/app.js +23 -17
- package/src/assets/scripts/modules/colors.js +10 -2
- package/src/assets/scripts/modules/echarts_area.js +10 -6
- package/src/assets/scripts/modules/echarts_donut.js +20 -4
- package/src/assets/scripts/modules/echarts_exampledata.js +2 -2
- package/src/assets/scripts/modules/echarts_gauge.js +5 -5
- package/src/assets/scripts/modules/echarts_horizontal.js +18 -3
- package/src/assets/scripts/modules/echarts_line.js +84 -0
- package/src/assets/scripts/modules/echarts_vertical.js +5 -3
- package/src/assets/stylesheets/components/customer/customer_productcards.css +2 -2
- package/src/assets/stylesheets/components/list_item.css +4 -0
- package/src/assets/stylesheets/tailwind_config.css +2 -2
- package/src/pages/charts/area.haml +21 -17
- package/src/pages/charts/bar_horizontal.haml +369 -220
- package/src/pages/charts/bar_vertical.haml +373 -367
- package/src/pages/charts/colors.haml +28 -0
- package/src/pages/charts/donut.haml +81 -16
- package/src/pages/charts/gauge.haml +40 -1
- package/src/pages/charts/legend.haml +22 -0
- package/src/pages/charts/line.haml +205 -0
- package/src/pages/colors.pug +2 -2
- package/src/static/app.bundled.js +19 -8
|
@@ -20,7 +20,7 @@ title: Bar chart horizontal
|
|
|
20
20
|
%pre.code.break-spaces
|
|
21
21
|
:plain
|
|
22
22
|
import { createChartHorizontal } from './modules/echarts_horizontal';
|
|
23
|
-
createChartHorizontal(
|
|
23
|
+
createChartHorizontal (target, targetData, targetSeries, showLegend, labelColor, valueColor)
|
|
24
24
|
.listitem-subheadline echarts_horizontal.js
|
|
25
25
|
.listitem-card
|
|
26
26
|
%pre.code.break-spaces
|
|
@@ -28,12 +28,26 @@ title: Bar chart horizontal
|
|
|
28
28
|
import * as echarts from 'echarts';
|
|
29
29
|
import { echartsLegend, legendHeight } from './echarts_legend';
|
|
30
30
|
var legendOptions;
|
|
31
|
-
export function createChartHorizontal (target, targetData, targetSeries, showLegend) {
|
|
31
|
+
export function createChartHorizontal (target, targetData, targetSeries, showLegend, labelColor, valueColor) {
|
|
32
32
|
var chartHeight = targetData.length * 20;
|
|
33
33
|
var chartPlusLegendHeight;
|
|
34
34
|
if (showLegend) {
|
|
35
35
|
chartPlusLegendHeight = chartHeight + legendHeight,
|
|
36
|
-
legendOptions =
|
|
36
|
+
legendOptions = {
|
|
37
|
+
type: echartsLegend.type,
|
|
38
|
+
orient: echartsLegend.orient,
|
|
39
|
+
padding: echartsLegend.padding,
|
|
40
|
+
icon: echartsLegend.icon,
|
|
41
|
+
itemGap: echartsLegend.itemGap,
|
|
42
|
+
itemHeight: echartsLegend.itemHeight,
|
|
43
|
+
itemWidth: echartsLegend.itemWidth,
|
|
44
|
+
height: echartsLegend.height,
|
|
45
|
+
left: echartsLegend.left,
|
|
46
|
+
bottom: echartsLegend.bottom,
|
|
47
|
+
textStyle:{
|
|
48
|
+
color:labelColor
|
|
49
|
+
},
|
|
50
|
+
}
|
|
37
51
|
} else {
|
|
38
52
|
chartPlusLegendHeight = chartHeight + 0,
|
|
39
53
|
legendOptions = null
|
|
@@ -91,7 +105,8 @@ title: Bar chart horizontal
|
|
|
91
105
|
overflow: "truncate",
|
|
92
106
|
ellipsis: '…',
|
|
93
107
|
hideOverlap: false,
|
|
94
|
-
interval: 0
|
|
108
|
+
interval: 0,
|
|
109
|
+
color: labelColor,
|
|
95
110
|
}
|
|
96
111
|
},
|
|
97
112
|
series: targetSeries
|
|
@@ -118,219 +133,353 @@ title: Bar chart horizontal
|
|
|
118
133
|
left: 'center',
|
|
119
134
|
bottom: 'bottom'
|
|
120
135
|
};
|
|
121
|
-
.
|
|
122
|
-
.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.listitem-
|
|
126
|
-
%
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
136
|
+
.grid.gap-spacing{class:"lg:grid-cols-2"}
|
|
137
|
+
.col
|
|
138
|
+
.card.p-md.mb-xs
|
|
139
|
+
.echarts-container#echarts-bar-horizontal-2
|
|
140
|
+
%details.listitem.mb-lg
|
|
141
|
+
%summary.listitem-header
|
|
142
|
+
.listitem-title
|
|
143
|
+
%span.icon.icon-format-code.mr-xs
|
|
144
|
+
Horizontal chart, 8 Features, many bugs, legend
|
|
145
|
+
.listitem-metrics
|
|
146
|
+
.listitem-actions
|
|
147
|
+
.btn.collapse-btn
|
|
148
|
+
.listitem-content
|
|
149
|
+
.listitem-subheadline HTML
|
|
150
|
+
.listitem-card
|
|
151
|
+
%code .echarts-container#element-id
|
|
152
|
+
.listitem-subheadline app.js
|
|
153
|
+
.listitem-card
|
|
154
|
+
%pre.code.break-spaces
|
|
155
|
+
:plain
|
|
156
|
+
import { createChartHorizontal } from './modules/echarts_horizontal';
|
|
157
|
+
createChartHorizontal("echarts-bar-horizontal-2", dataFeaturesMany, echartsSeriesMany, true, colorLabelBright, colorValueBright);
|
|
158
|
+
.listitem-subheadline Data
|
|
159
|
+
.listitem-card
|
|
160
|
+
%pre.code.break-spaces
|
|
161
|
+
:plain
|
|
162
|
+
export let dataFeaturesMany = [
|
|
163
|
+
'Feature A',
|
|
164
|
+
'Feature B',
|
|
165
|
+
'Feature with a very long name',
|
|
166
|
+
'Feature with an even longer name',
|
|
167
|
+
'ABC',
|
|
168
|
+
'ZDF',
|
|
169
|
+
'WWW',
|
|
170
|
+
'Just another feature name'
|
|
171
|
+
];
|
|
172
|
+
.listitem-subheadline Series, Javascript
|
|
173
|
+
.listitem-card
|
|
174
|
+
%pre.code.break-spaces
|
|
175
|
+
:plain
|
|
176
|
+
import { colorCritical, colorHigh, colorLow, colorContent, colorVisual, colorUX } from './colors';
|
|
177
|
+
var barType = 'bar';
|
|
178
|
+
var stackType = 'stack';
|
|
179
|
+
var barWidth = 0;
|
|
180
|
+
var barMaxWidth = 10;
|
|
181
|
+
var barGap = 0;
|
|
182
|
+
var barCategoryGap = 0;
|
|
183
|
+
export let echartsSeriesMany = [
|
|
184
|
+
{
|
|
185
|
+
name: 'Critical',
|
|
186
|
+
itemStyle: {color: colorCritical},
|
|
187
|
+
type: barType,
|
|
188
|
+
stack: stackType,
|
|
189
|
+
barWidth: barWidth,
|
|
190
|
+
barMaxWidth: barMaxWidth,
|
|
191
|
+
barGap: barGap,
|
|
192
|
+
barCategoryGap: barCategoryGap,
|
|
193
|
+
emphasis: {
|
|
194
|
+
focus: 'series'
|
|
195
|
+
},
|
|
196
|
+
data: [7, 22, 1, 9, 15, 4, 11, 0]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'High',
|
|
200
|
+
itemStyle: {color: colorHigh},
|
|
201
|
+
type: barType,
|
|
202
|
+
stack: stackType,
|
|
203
|
+
barWidth: barWidth,
|
|
204
|
+
barMaxWidth: barMaxWidth,
|
|
205
|
+
barGap: barGap,
|
|
206
|
+
barCategoryGap: barCategoryGap,
|
|
207
|
+
emphasis: {
|
|
208
|
+
focus: 'series'
|
|
209
|
+
},
|
|
210
|
+
data: [23, 21, 13, 0, 1, 9, 15, 4]
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'Low',
|
|
214
|
+
itemStyle: {color: colorLow},
|
|
215
|
+
type: barType,
|
|
216
|
+
stack: stackType,
|
|
217
|
+
barWidth: barWidth,
|
|
218
|
+
barMaxWidth: barMaxWidth,
|
|
219
|
+
barGap: barGap,
|
|
220
|
+
barCategoryGap: barCategoryGap,
|
|
221
|
+
emphasis: {
|
|
222
|
+
focus: 'series'
|
|
223
|
+
},
|
|
224
|
+
data: [9, 15, 4, 11, 23, 13, 2, 1]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'Visual',
|
|
228
|
+
itemStyle: {color: colorVisual},
|
|
229
|
+
type: barType,
|
|
230
|
+
stack: stackType,
|
|
231
|
+
barWidth: barWidth,
|
|
232
|
+
barMaxWidth: barMaxWidth,
|
|
233
|
+
barGap: barGap,
|
|
234
|
+
barCategoryGap: barCategoryGap,
|
|
235
|
+
emphasis: {
|
|
236
|
+
focus: 'series'
|
|
237
|
+
},
|
|
238
|
+
data: [13, 14, 1, 9, 15, 4, 11, 10]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: 'Content',
|
|
242
|
+
itemStyle: {color: colorContent},
|
|
243
|
+
type: barType,
|
|
244
|
+
stack: stackType,
|
|
245
|
+
barWidth: barWidth,
|
|
246
|
+
barMaxWidth: barMaxWidth,
|
|
247
|
+
barGap: barGap,
|
|
248
|
+
barCategoryGap: barCategoryGap,
|
|
249
|
+
emphasis: {
|
|
250
|
+
focus: 'series'
|
|
251
|
+
},
|
|
252
|
+
data: [13, 22, 1, 9, 15, 4, 8, 13]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'UX',
|
|
256
|
+
itemStyle: {color: colorUX},
|
|
257
|
+
type: barType,
|
|
258
|
+
stack: stackType,
|
|
259
|
+
barWidth: barWidth,
|
|
260
|
+
barMaxWidth: barMaxWidth,
|
|
261
|
+
barGap: barGap,
|
|
262
|
+
barCategoryGap: barCategoryGap,
|
|
263
|
+
emphasis: {
|
|
264
|
+
focus: 'series'
|
|
265
|
+
},
|
|
266
|
+
data: [13, 0, 1, 9, 15, 4, 2, 3]
|
|
267
|
+
}
|
|
268
|
+
];
|
|
269
|
+
.col
|
|
270
|
+
.card.p-md.mb-xs.bg-gray-800
|
|
271
|
+
.echarts-container#echarts-bar-horizontal-2-dark
|
|
272
|
+
%details.listitem.mb-lg
|
|
273
|
+
%summary.listitem-header
|
|
274
|
+
.listitem-title
|
|
275
|
+
%span.icon.icon-format-code.mr-xs
|
|
276
|
+
Horizontal chart, darkmode
|
|
277
|
+
.listitem-metrics
|
|
278
|
+
.listitem-actions
|
|
279
|
+
.btn.collapse-btn
|
|
280
|
+
.listitem-content
|
|
281
|
+
.listitem-subheadline HTML
|
|
282
|
+
.listitem-card
|
|
283
|
+
%code .echarts-container#element-id
|
|
284
|
+
.listitem-subheadline app.js
|
|
285
|
+
.listitem-card
|
|
286
|
+
%pre.code.break-spaces
|
|
287
|
+
:plain
|
|
288
|
+
import { createChartHorizontal } from './modules/echarts_horizontal';
|
|
289
|
+
createChartHorizontal("echarts-bar-horizontal-2-dark", dataFeaturesMany, echartsSeriesMany, true, colorLabelDark, colorValueDark);
|
|
290
|
+
.listitem-subheadline Data
|
|
291
|
+
.listitem-card
|
|
292
|
+
%pre.code.break-spaces
|
|
293
|
+
:plain
|
|
294
|
+
export let dataFeaturesMany = [
|
|
295
|
+
'Feature A',
|
|
296
|
+
'Feature B',
|
|
297
|
+
'Feature with a very long name',
|
|
298
|
+
'Feature with an even longer name',
|
|
299
|
+
'ABC',
|
|
300
|
+
'ZDF',
|
|
301
|
+
'WWW',
|
|
302
|
+
'Just another feature name'
|
|
303
|
+
];
|
|
304
|
+
.listitem-subheadline Series, Javascript
|
|
305
|
+
.listitem-card
|
|
306
|
+
%pre.code.break-spaces
|
|
307
|
+
:plain
|
|
308
|
+
import { colorCritical, colorHigh, colorLow, colorContent, colorVisual, colorUX } from './colors';
|
|
309
|
+
var barType = 'bar';
|
|
310
|
+
var stackType = 'stack';
|
|
311
|
+
var barWidth = 0;
|
|
312
|
+
var barMaxWidth = 10;
|
|
313
|
+
var barGap = 0;
|
|
314
|
+
var barCategoryGap = 0;
|
|
315
|
+
export let echartsSeriesMany = [
|
|
316
|
+
{
|
|
317
|
+
name: 'Critical',
|
|
318
|
+
itemStyle: {color: colorCritical},
|
|
319
|
+
type: barType,
|
|
320
|
+
stack: stackType,
|
|
321
|
+
barWidth: barWidth,
|
|
322
|
+
barMaxWidth: barMaxWidth,
|
|
323
|
+
barGap: barGap,
|
|
324
|
+
barCategoryGap: barCategoryGap,
|
|
325
|
+
emphasis: {
|
|
326
|
+
focus: 'series'
|
|
327
|
+
},
|
|
328
|
+
data: [7, 22, 1, 9, 15, 4, 11, 0]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: 'High',
|
|
332
|
+
itemStyle: {color: colorHigh},
|
|
333
|
+
type: barType,
|
|
334
|
+
stack: stackType,
|
|
335
|
+
barWidth: barWidth,
|
|
336
|
+
barMaxWidth: barMaxWidth,
|
|
337
|
+
barGap: barGap,
|
|
338
|
+
barCategoryGap: barCategoryGap,
|
|
339
|
+
emphasis: {
|
|
340
|
+
focus: 'series'
|
|
341
|
+
},
|
|
342
|
+
data: [23, 21, 13, 0, 1, 9, 15, 4]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: 'Low',
|
|
346
|
+
itemStyle: {color: colorLow},
|
|
347
|
+
type: barType,
|
|
348
|
+
stack: stackType,
|
|
349
|
+
barWidth: barWidth,
|
|
350
|
+
barMaxWidth: barMaxWidth,
|
|
351
|
+
barGap: barGap,
|
|
352
|
+
barCategoryGap: barCategoryGap,
|
|
353
|
+
emphasis: {
|
|
354
|
+
focus: 'series'
|
|
355
|
+
},
|
|
356
|
+
data: [9, 15, 4, 11, 23, 13, 2, 1]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: 'Visual',
|
|
360
|
+
itemStyle: {color: colorVisual},
|
|
361
|
+
type: barType,
|
|
362
|
+
stack: stackType,
|
|
363
|
+
barWidth: barWidth,
|
|
364
|
+
barMaxWidth: barMaxWidth,
|
|
365
|
+
barGap: barGap,
|
|
366
|
+
barCategoryGap: barCategoryGap,
|
|
367
|
+
emphasis: {
|
|
368
|
+
focus: 'series'
|
|
369
|
+
},
|
|
370
|
+
data: [13, 14, 1, 9, 15, 4, 11, 10]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: 'Content',
|
|
374
|
+
itemStyle: {color: colorContent},
|
|
375
|
+
type: barType,
|
|
376
|
+
stack: stackType,
|
|
377
|
+
barWidth: barWidth,
|
|
378
|
+
barMaxWidth: barMaxWidth,
|
|
379
|
+
barGap: barGap,
|
|
380
|
+
barCategoryGap: barCategoryGap,
|
|
381
|
+
emphasis: {
|
|
382
|
+
focus: 'series'
|
|
383
|
+
},
|
|
384
|
+
data: [13, 22, 1, 9, 15, 4, 8, 13]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: 'UX',
|
|
388
|
+
itemStyle: {color: colorUX},
|
|
389
|
+
type: barType,
|
|
390
|
+
stack: stackType,
|
|
391
|
+
barWidth: barWidth,
|
|
392
|
+
barMaxWidth: barMaxWidth,
|
|
393
|
+
barGap: barGap,
|
|
394
|
+
barCategoryGap: barCategoryGap,
|
|
395
|
+
emphasis: {
|
|
396
|
+
focus: 'series'
|
|
397
|
+
},
|
|
398
|
+
data: [13, 0, 1, 9, 15, 4, 2, 3]
|
|
399
|
+
}
|
|
400
|
+
];
|
|
401
|
+
.col
|
|
402
|
+
.card.p-md.mb-xs
|
|
403
|
+
.echarts-container#echarts-bar-horizontal-1
|
|
404
|
+
%details.listitem.mb-lg
|
|
405
|
+
%summary.listitem-header
|
|
406
|
+
.listitem-title
|
|
407
|
+
%span.icon.icon-format-code.mr-xs
|
|
408
|
+
Horizontal chart, 3 Features, some bugs, no legend
|
|
409
|
+
.listitem-metrics
|
|
410
|
+
.listitem-actions
|
|
411
|
+
.btn.collapse-btn
|
|
412
|
+
.listitem-content
|
|
413
|
+
.listitem-subheadline HTML
|
|
414
|
+
.listitem-card
|
|
415
|
+
%code .echarts-container#element-id
|
|
416
|
+
.listitem-subheadline app.js
|
|
417
|
+
.listitem-card
|
|
418
|
+
%pre.code.break-spaces
|
|
419
|
+
:plain
|
|
420
|
+
import { createChartHorizontal } from './modules/echarts_horizontal';
|
|
421
|
+
createChartHorizontal("echarts-bar-horizontal-1", dataFeaturesFew, echartsSeriesFew, false, colorLabelBright, colorValueBright);
|
|
422
|
+
.listitem-subheadline Data
|
|
423
|
+
.listitem-card
|
|
424
|
+
%pre.code.break-spaces
|
|
425
|
+
:plain
|
|
426
|
+
export let dataFeaturesFew = [
|
|
427
|
+
'Feature A',
|
|
428
|
+
'Feature B',
|
|
429
|
+
'ABC'
|
|
430
|
+
]
|
|
431
|
+
.listitem-subheadline Series, Javascript
|
|
432
|
+
.listitem-card
|
|
433
|
+
%pre.code.break-spaces
|
|
434
|
+
:plain
|
|
435
|
+
import { colorCritical, colorHigh, colorLow, colorContent, colorVisual, colorUX } from './colors';
|
|
436
|
+
var barType = 'bar';
|
|
437
|
+
var stackType = 'stack';
|
|
438
|
+
var barWidth = 0;
|
|
439
|
+
var barMaxWidth = 10;
|
|
440
|
+
var barGap = 0;
|
|
441
|
+
var barCategoryGap = 0;
|
|
442
|
+
export let echartsSeriesFew = [
|
|
443
|
+
{
|
|
444
|
+
name: 'Critical',
|
|
445
|
+
itemStyle: {color: colorCritical},
|
|
446
|
+
type: barType,
|
|
447
|
+
stack: stackType,
|
|
448
|
+
barWidth: barWidth,
|
|
449
|
+
barMaxWidth: barMaxWidth,
|
|
450
|
+
barGap: barGap,
|
|
451
|
+
barCategoryGap: barCategoryGap,
|
|
452
|
+
emphasis: {
|
|
453
|
+
focus: 'series'
|
|
454
|
+
},
|
|
455
|
+
data: [7, 22, 1]
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: 'High',
|
|
459
|
+
itemStyle: {color: colorHigh},
|
|
460
|
+
type: barType,
|
|
461
|
+
stack: stackType,
|
|
462
|
+
barWidth: barWidth,
|
|
463
|
+
barMaxWidth: barMaxWidth,
|
|
464
|
+
barGap: barGap,
|
|
465
|
+
barCategoryGap: barCategoryGap,
|
|
466
|
+
emphasis: {
|
|
467
|
+
focus: 'series'
|
|
468
|
+
},
|
|
469
|
+
data: [23, 21, 13]
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
name: 'Low',
|
|
473
|
+
itemStyle: {color: colorLow},
|
|
474
|
+
type: barType,
|
|
475
|
+
stack: stackType,
|
|
476
|
+
barWidth: barWidth,
|
|
477
|
+
barMaxWidth: barMaxWidth,
|
|
478
|
+
barGap: barGap,
|
|
479
|
+
barCategoryGap: barCategoryGap,
|
|
480
|
+
emphasis: {
|
|
481
|
+
focus: 'series'
|
|
482
|
+
},
|
|
483
|
+
data: [9, 15, 4]
|
|
484
|
+
}
|
|
485
|
+
];
|