-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbar_chart_test.go
392 lines (371 loc) · 120 KB
/
bar_chart_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
package charts
import (
"strconv"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func makeBasicBarChartOption() BarChartOption {
seriesList := NewSeriesListBar([][]float64{
{2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3},
{2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3},
})
for index := range seriesList {
seriesList[index].Label.Show = Ptr(true)
}
return BarChartOption{
Padding: NewBoxEqual(10),
SeriesList: seriesList,
XAxis: XAxisOption{
Labels: []string{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
},
YAxis: []YAxisOption{
{
Show: Ptr(true),
},
},
}
}
func makeMinimalBarChartOption() BarChartOption {
opt := NewBarChartOptionWithData([][]float64{
{12, 24},
{24, 48},
})
opt.XAxis = XAxisOption{
Show: Ptr(false),
Labels: []string{"A", "B"},
}
opt.YAxis[0].Show = Ptr(false)
return opt
}
func makeFullBarChartStackedOption() BarChartOption {
seriesList := NewSeriesListBar([][]float64{
{4.9, 23.2, 25.6, 102.6, 142.2, 32.6, 20.0, 3.3},
{9.0, 26.4, 28.7, 144.6, 122.2, 48.7, 18.8, 2.3},
{80.0, 40.4, 28.4, 28.8, 24.4, 24.2, 40.8, 80.8},
}, BarSeriesOption{
Label: SeriesLabel{
Show: Ptr(false),
},
MarkPoint: NewMarkPoint("max"),
})
return BarChartOption{
Padding: NewBoxEqual(20),
SeriesList: seriesList,
StackSeries: Ptr(true),
XAxis: XAxisOption{
Labels: []string{"1", "2", "3", "4", "5", "6", "7", "8"},
},
Legend: LegendOption{
SeriesNames: []string{"A", "B", "C"},
Symbol: SymbolDot,
},
YAxis: []YAxisOption{
{
RangeValuePaddingScale: Ptr(1.0),
},
},
}
}
func TestNewBarChartOptionWithData(t *testing.T) {
t.Parallel()
opt := NewBarChartOptionWithData([][]float64{
{12, 24},
{24, 48},
})
assert.Len(t, opt.SeriesList, 2)
assert.Equal(t, ChartTypeBar, opt.SeriesList[0].getType())
assert.Len(t, opt.YAxis, 1)
assert.Equal(t, defaultPadding, opt.Padding)
p := NewPainter(PainterOptions{})
assert.NoError(t, p.BarChart(opt))
}
func TestBarChart(t *testing.T) {
t.Parallel()
tests := []struct {
name string
themed bool
makeOptions func() BarChartOption
result string
}{
{
name: "basic_themed",
themed: true,
makeOptions: makeBasicBarChartOption,
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:rgb(40,40,40)\"/><text x=\"9\" y=\"16\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">189</text><text x=\"9\" y=\"55\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">168</text><text x=\"9\" y=\"94\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">147</text><text x=\"9\" y=\"133\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">126</text><text x=\"9\" y=\"172\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">105</text><text x=\"18\" y=\"211\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">84</text><text x=\"18\" y=\"250\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">63</text><text x=\"18\" y=\"289\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">42</text><text x=\"18\" y=\"328\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">21</text><text x=\"27\" y=\"368\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 42 10\nL 590 10\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 49\nL 590 49\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 88\nL 590 88\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 128\nL 590 128\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 167\nL 590 167\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 206\nL 590 206\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 246\nL 590 246\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 285\nL 590 285\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 42 324\nL 590 324\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 46 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 46 369\nL 46 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 91 369\nL 91 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 136 369\nL 136 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 182 369\nL 182 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 227 369\nL 227 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 272 369\nL 272 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 318 369\nL 318 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 363 369\nL 363 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 408 369\nL 408 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 454 369\nL 454 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 499 369\nL 499 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 544 369\nL 544 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><text x=\"55\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jan</text><text x=\"100\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Feb</text><text x=\"145\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mar</text><text x=\"192\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Apr</text><text x=\"234\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">May</text><text x=\"282\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jun</text><text x=\"330\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jul</text><text x=\"371\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Aug</text><text x=\"418\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sep</text><text x=\"464\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Oct</text><text x=\"507\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Nov</text><text x=\"554\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Dec</text><path d=\"M 51 361\nL 67 361\nL 67 363\nL 51 363\nL 51 361\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 96 355\nL 112 355\nL 112 363\nL 96 363\nL 96 355\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 141 351\nL 157 351\nL 157 363\nL 141 363\nL 141 351\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 187 321\nL 203 321\nL 203 363\nL 187 363\nL 187 321\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 232 317\nL 248 317\nL 248 363\nL 232 363\nL 232 317\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 277 221\nL 293 221\nL 293 363\nL 277 363\nL 277 221\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 323 111\nL 339 111\nL 339 363\nL 323 363\nL 323 111\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 368 61\nL 384 61\nL 384 363\nL 368 363\nL 368 61\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 413 303\nL 429 303\nL 429 363\nL 413 363\nL 413 303\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 459 327\nL 475 327\nL 475 363\nL 459 363\nL 459 327\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 504 353\nL 520 353\nL 520 363\nL 504 363\nL 504 353\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 549 358\nL 565 358\nL 565 363\nL 549 363\nL 549 358\" style=\"stroke:none;fill:rgb(255,100,100)\"/><path d=\"M 70 360\nL 86 360\nL 86 363\nL 70 363\nL 70 360\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 115 353\nL 131 353\nL 131 363\nL 115 363\nL 115 353\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 160 348\nL 176 348\nL 176 363\nL 160 363\nL 160 348\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 206 315\nL 222 315\nL 222 363\nL 206 363\nL 206 315\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 251 311\nL 267 311\nL 267 363\nL 251 363\nL 251 311\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 296 232\nL 312 232\nL 312 363\nL 296 363\nL 296 232\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 342 36\nL 358 36\nL 358 363\nL 342 363\nL 342 36\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 387 23\nL 403 23\nL 403 363\nL 387 363\nL 387 23\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 432 273\nL 448 273\nL 448 363\nL 432 363\nL 432 273\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 478 329\nL 494 329\nL 494 363\nL 478 363\nL 478 329\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 523 353\nL 539 353\nL 539 363\nL 523 363\nL 523 353\" style=\"stroke:none;fill:rgb(255,210,100)\"/><path d=\"M 568 360\nL 584 360\nL 584 363\nL 568 363\nL 568 360\" style=\"stroke:none;fill:rgb(255,210,100)\"/><text x=\"55\" y=\"356\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"95\" y=\"350\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4.9</text><text x=\"145\" y=\"346\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"182\" y=\"316\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23.2</text><text x=\"227\" y=\"312\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25.6</text><text x=\"272\" y=\"216\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">76.7</text><text x=\"315\" y=\"106\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">135.6</text><text x=\"360\" y=\"56\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">162.2</text><text x=\"408\" y=\"298\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32.6</text><text x=\"460\" y=\"322\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"503\" y=\"348\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6.4</text><text x=\"548\" y=\"353\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3.3</text><text x=\"69\" y=\"355\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.6</text><text x=\"114\" y=\"348\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">5.9</text><text x=\"164\" y=\"343\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"201\" y=\"310\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26.4</text><text x=\"246\" y=\"306\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28.7</text><text x=\"291\" y=\"227\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">70.7</text><text x=\"334\" y=\"31\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">175.6</text><text x=\"379\" y=\"18\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">182.2</text><text x=\"427\" y=\"268\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48.7</text><text x=\"473\" y=\"324\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18.8</text><text x=\"527\" y=\"348\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"567\" y=\"355\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.3</text></svg>",
},
{
name: "rounded_caps",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
opt.RoundedBarCaps = Ptr(true)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 93 330\nL 94 330\nL 94 330\nA 63 63 90.00 0 1 157 393\nL 157 379\nL 30 379\nL 30 393\nL 30 393\nA 63 63 90.00 0 1 93 330\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 373 244\nL 374 244\nL 374 244\nA 63 63 90.00 0 1 437 307\nL 437 379\nL 310 379\nL 310 307\nL 310 307\nA 63 63 90.00 0 1 373 244\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 225 244\nL 226 244\nL 226 244\nA 63 63 90.00 0 1 289 307\nL 289 379\nL 162 379\nL 162 307\nL 162 307\nA 63 63 90.00 0 1 225 244\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 505 71\nL 506 71\nL 506 71\nA 63 63 90.00 0 1 569 134\nL 569 379\nL 442 379\nL 442 134\nL 442 134\nA 63 63 90.00 0 1 505 71\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/></svg>",
},
{
name: "custom_font",
makeOptions: func() BarChartOption {
opt := makeBasicBarChartOption()
customFont := NewFontStyleWithSize(4.0).WithColor(ColorBlue)
opt.Legend.FontStyle = customFont
opt.XAxis.FontStyle = customFont
opt.Title.FontStyle = customFont
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><text x=\"9\" y=\"16\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">189</text><text x=\"9\" y=\"55\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">168</text><text x=\"9\" y=\"94\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">147</text><text x=\"9\" y=\"133\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">126</text><text x=\"9\" y=\"172\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">105</text><text x=\"18\" y=\"212\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">84</text><text x=\"18\" y=\"251\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">63</text><text x=\"18\" y=\"290\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">42</text><text x=\"18\" y=\"329\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">21</text><text x=\"27\" y=\"369\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 42 10\nL 590 10\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 49\nL 590 49\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 88\nL 590 88\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 128\nL 590 128\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 167\nL 590 167\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 207\nL 590 207\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 246\nL 590 246\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 286\nL 590 286\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 325\nL 590 325\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 46 365\nL 590 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 46 370\nL 46 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 91 370\nL 91 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 136 370\nL 136 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 182 370\nL 182 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 227 370\nL 227 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 272 370\nL 272 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 318 370\nL 318 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 363 370\nL 363 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 408 370\nL 408 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 454 370\nL 454 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 499 370\nL 499 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 544 370\nL 544 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 590 370\nL 590 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"64\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Jan</text><text x=\"109\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Feb</text><text x=\"154\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Mar</text><text x=\"200\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Apr</text><text x=\"244\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">May</text><text x=\"291\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Jun</text><text x=\"337\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Jul</text><text x=\"380\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Aug</text><text x=\"427\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Sep</text><text x=\"472\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Oct</text><text x=\"516\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Nov</text><text x=\"563\" y=\"381\" style=\"stroke:none;fill:blue;font-size:5.1px;font-family:'Roboto Medium',sans-serif\">Dec</text><path d=\"M 51 362\nL 67 362\nL 67 364\nL 51 364\nL 51 362\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 96 356\nL 112 356\nL 112 364\nL 96 364\nL 96 356\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 141 352\nL 157 352\nL 157 364\nL 141 364\nL 141 352\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 187 322\nL 203 322\nL 203 364\nL 187 364\nL 187 322\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 232 317\nL 248 317\nL 248 364\nL 232 364\nL 232 317\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 277 221\nL 293 221\nL 293 364\nL 277 364\nL 277 221\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 323 111\nL 339 111\nL 339 364\nL 323 364\nL 323 111\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 368 61\nL 384 61\nL 384 364\nL 368 364\nL 368 61\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 413 304\nL 429 304\nL 429 364\nL 413 364\nL 413 304\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 459 328\nL 475 328\nL 475 364\nL 459 364\nL 459 328\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 504 353\nL 520 353\nL 520 364\nL 504 364\nL 504 353\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 549 359\nL 565 359\nL 565 364\nL 549 364\nL 549 359\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 70 361\nL 86 361\nL 86 364\nL 70 364\nL 70 361\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 115 354\nL 131 354\nL 131 364\nL 115 364\nL 115 354\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 160 349\nL 176 349\nL 176 364\nL 160 364\nL 160 349\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 206 316\nL 222 316\nL 222 364\nL 206 364\nL 206 316\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 251 312\nL 267 312\nL 267 364\nL 251 364\nL 251 312\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 296 233\nL 312 233\nL 312 364\nL 296 364\nL 296 233\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 342 36\nL 358 36\nL 358 364\nL 342 364\nL 342 36\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 387 23\nL 403 23\nL 403 364\nL 387 364\nL 387 23\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 432 274\nL 448 274\nL 448 364\nL 432 364\nL 432 274\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 478 330\nL 494 330\nL 494 364\nL 478 364\nL 478 330\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 523 354\nL 539 354\nL 539 364\nL 523 364\nL 523 354\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 568 361\nL 584 361\nL 584 364\nL 568 364\nL 568 361\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"55\" y=\"357\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"95\" y=\"351\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4.9</text><text x=\"145\" y=\"347\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"182\" y=\"317\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23.2</text><text x=\"227\" y=\"312\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25.6</text><text x=\"272\" y=\"216\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">76.7</text><text x=\"315\" y=\"106\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">135.6</text><text x=\"360\" y=\"56\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">162.2</text><text x=\"408\" y=\"299\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32.6</text><text x=\"460\" y=\"323\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"503\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6.4</text><text x=\"548\" y=\"354\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3.3</text><text x=\"69\" y=\"356\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.6</text><text x=\"114\" y=\"349\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">5.9</text><text x=\"164\" y=\"344\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"201\" y=\"311\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26.4</text><text x=\"246\" y=\"307\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28.7</text><text x=\"291\" y=\"228\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">70.7</text><text x=\"334\" y=\"31\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">175.6</text><text x=\"379\" y=\"18\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">182.2</text><text x=\"427\" y=\"269\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48.7</text><text x=\"473\" y=\"325\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18.8</text><text x=\"527\" y=\"349\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"567\" y=\"356\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.3</text></svg>",
},
{
name: "boundary_gap_enable",
makeOptions: func() BarChartOption {
opt := makeBasicBarChartOption()
opt.XAxis.BoundaryGap = Ptr(true)
opt.YAxis[0].Show = Ptr(false)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 10 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 10 369\nL 10 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 106 369\nL 106 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 155 369\nL 155 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 203 369\nL 203 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 251 369\nL 251 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 300 369\nL 300 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 348 369\nL 348 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 396 369\nL 396 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 445 369\nL 445 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 493 369\nL 493 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 541 369\nL 541 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"21\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jan</text><text x=\"69\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Feb</text><text x=\"116\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mar</text><text x=\"167\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Apr</text><text x=\"212\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">May</text><text x=\"262\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jun</text><text x=\"314\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jul</text><text x=\"358\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Aug</text><text x=\"407\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sep</text><text x=\"457\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Oct</text><text x=\"503\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Nov</text><text x=\"552\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Dec</text><path d=\"M 15 361\nL 32 361\nL 32 363\nL 15 363\nL 15 361\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 63 355\nL 80 355\nL 80 363\nL 63 363\nL 63 355\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 111 351\nL 128 351\nL 128 363\nL 111 363\nL 111 351\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 160 321\nL 177 321\nL 177 363\nL 160 363\nL 160 321\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 208 317\nL 225 317\nL 225 363\nL 208 363\nL 208 317\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 256 221\nL 273 221\nL 273 363\nL 256 363\nL 256 221\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 305 111\nL 322 111\nL 322 363\nL 305 363\nL 305 111\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 353 61\nL 370 61\nL 370 363\nL 353 363\nL 353 61\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 401 303\nL 418 303\nL 418 363\nL 401 363\nL 401 303\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 450 327\nL 467 327\nL 467 363\nL 450 363\nL 450 327\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 498 353\nL 515 353\nL 515 363\nL 498 363\nL 498 353\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 546 358\nL 563 358\nL 563 363\nL 546 363\nL 546 358\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 35 360\nL 52 360\nL 52 363\nL 35 363\nL 35 360\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 83 353\nL 100 353\nL 100 363\nL 83 363\nL 83 353\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 131 348\nL 148 348\nL 148 363\nL 131 363\nL 131 348\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 180 315\nL 197 315\nL 197 363\nL 180 363\nL 180 315\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 228 311\nL 245 311\nL 245 363\nL 228 363\nL 228 311\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 276 232\nL 293 232\nL 293 363\nL 276 363\nL 276 232\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 325 36\nL 342 36\nL 342 363\nL 325 363\nL 325 36\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 373 23\nL 390 23\nL 390 363\nL 373 363\nL 373 23\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 421 273\nL 438 273\nL 438 363\nL 421 363\nL 421 273\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 470 329\nL 487 329\nL 487 363\nL 470 363\nL 470 329\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 518 353\nL 535 353\nL 535 363\nL 518 363\nL 518 353\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 566 360\nL 583 360\nL 583 363\nL 566 363\nL 566 360\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"19\" y=\"356\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"62\" y=\"350\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4.9</text><text x=\"115\" y=\"346\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"155\" y=\"316\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23.2</text><text x=\"203\" y=\"312\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25.6</text><text x=\"251\" y=\"216\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">76.7</text><text x=\"297\" y=\"106\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">135.6</text><text x=\"345\" y=\"56\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">162.2</text><text x=\"396\" y=\"298\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32.6</text><text x=\"451\" y=\"322\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"497\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6.4</text><text x=\"545\" y=\"353\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3.3</text><text x=\"34\" y=\"355\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.6</text><text x=\"82\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">5.9</text><text x=\"135\" y=\"343\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"175\" y=\"310\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26.4</text><text x=\"223\" y=\"306\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28.7</text><text x=\"271\" y=\"227\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">70.7</text><text x=\"317\" y=\"31\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">175.6</text><text x=\"365\" y=\"18\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">182.2</text><text x=\"416\" y=\"268\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48.7</text><text x=\"465\" y=\"324\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18.8</text><text x=\"522\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"565\" y=\"355\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.3</text></svg>",
},
{
name: "boundary_gap_disable",
makeOptions: func() BarChartOption {
opt := makeBasicBarChartOption()
opt.XAxis.BoundaryGap = Ptr(false)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><text x=\"9\" y=\"16\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">189</text><text x=\"9\" y=\"55\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">168</text><text x=\"9\" y=\"94\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">147</text><text x=\"9\" y=\"133\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">126</text><text x=\"9\" y=\"172\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">105</text><text x=\"18\" y=\"211\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">84</text><text x=\"18\" y=\"250\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">63</text><text x=\"18\" y=\"289\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">42</text><text x=\"18\" y=\"328\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">21</text><text x=\"27\" y=\"368\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 42 10\nL 590 10\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 49\nL 590 49\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 88\nL 590 88\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 128\nL 590 128\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 167\nL 590 167\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 206\nL 590 206\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 246\nL 590 246\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 285\nL 590 285\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 324\nL 590 324\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 46 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 46 369\nL 46 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 95 369\nL 95 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 144 369\nL 144 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 194 369\nL 194 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 243 369\nL 243 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 293 369\nL 293 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 342 369\nL 342 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 392 369\nL 392 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 441 369\nL 441 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 491 369\nL 491 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 540 369\nL 540 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"45\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jan</text><text x=\"143\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mar</text><text x=\"242\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">May</text><text x=\"341\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jul</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Aug</text><text x=\"490\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Oct</text><text x=\"563\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Dec</text><path d=\"M 51 361\nL 67 361\nL 67 363\nL 51 363\nL 51 361\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 96 355\nL 112 355\nL 112 363\nL 96 363\nL 96 355\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 141 351\nL 157 351\nL 157 363\nL 141 363\nL 141 351\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 187 321\nL 203 321\nL 203 363\nL 187 363\nL 187 321\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 232 317\nL 248 317\nL 248 363\nL 232 363\nL 232 317\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 277 221\nL 293 221\nL 293 363\nL 277 363\nL 277 221\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 323 111\nL 339 111\nL 339 363\nL 323 363\nL 323 111\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 368 61\nL 384 61\nL 384 363\nL 368 363\nL 368 61\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 413 303\nL 429 303\nL 429 363\nL 413 363\nL 413 303\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 459 327\nL 475 327\nL 475 363\nL 459 363\nL 459 327\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 504 353\nL 520 353\nL 520 363\nL 504 363\nL 504 353\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 549 358\nL 565 358\nL 565 363\nL 549 363\nL 549 358\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 70 360\nL 86 360\nL 86 363\nL 70 363\nL 70 360\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 115 353\nL 131 353\nL 131 363\nL 115 363\nL 115 353\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 160 348\nL 176 348\nL 176 363\nL 160 363\nL 160 348\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 206 315\nL 222 315\nL 222 363\nL 206 363\nL 206 315\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 251 311\nL 267 311\nL 267 363\nL 251 363\nL 251 311\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 296 232\nL 312 232\nL 312 363\nL 296 363\nL 296 232\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 342 36\nL 358 36\nL 358 363\nL 342 363\nL 342 36\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 387 23\nL 403 23\nL 403 363\nL 387 363\nL 387 23\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 432 273\nL 448 273\nL 448 363\nL 432 363\nL 432 273\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 478 329\nL 494 329\nL 494 363\nL 478 363\nL 478 329\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 523 353\nL 539 353\nL 539 363\nL 523 363\nL 523 353\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 568 360\nL 584 360\nL 584 363\nL 568 363\nL 568 360\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"55\" y=\"356\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"95\" y=\"350\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4.9</text><text x=\"145\" y=\"346\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"182\" y=\"316\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23.2</text><text x=\"227\" y=\"312\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25.6</text><text x=\"272\" y=\"216\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">76.7</text><text x=\"315\" y=\"106\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">135.6</text><text x=\"360\" y=\"56\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">162.2</text><text x=\"408\" y=\"298\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32.6</text><text x=\"460\" y=\"322\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"503\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6.4</text><text x=\"548\" y=\"353\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3.3</text><text x=\"69\" y=\"355\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.6</text><text x=\"114\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">5.9</text><text x=\"164\" y=\"343\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"201\" y=\"310\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26.4</text><text x=\"246\" y=\"306\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28.7</text><text x=\"291\" y=\"227\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">70.7</text><text x=\"334\" y=\"31\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">175.6</text><text x=\"379\" y=\"18\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">182.2</text><text x=\"427\" y=\"268\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48.7</text><text x=\"473\" y=\"324\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18.8</text><text x=\"527\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"567\" y=\"355\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.3</text></svg>",
},
{
name: "value_formatter",
makeOptions: func() BarChartOption {
opt := makeBasicBarChartOption()
opt.ValueFormatter = func(f float64) string {
return "f"
}
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><text x=\"9\" y=\"16\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"55\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"94\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"133\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"172\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"211\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"250\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"289\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"328\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><text x=\"9\" y=\"368\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">f</text><path d=\"M 21 10\nL 590 10\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 49\nL 590 49\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 88\nL 590 88\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 128\nL 590 128\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 167\nL 590 167\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 206\nL 590 206\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 246\nL 590 246\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 285\nL 590 285\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 21 324\nL 590 324\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 25 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 25 369\nL 25 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 72 369\nL 72 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 119 369\nL 119 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 166 369\nL 166 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 213 369\nL 213 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 260 369\nL 260 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 307 369\nL 307 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 354 369\nL 354 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 401 369\nL 401 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 448 369\nL 448 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 495 369\nL 495 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 542 369\nL 542 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"35\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jan</text><text x=\"82\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Feb</text><text x=\"128\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mar</text><text x=\"177\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Apr</text><text x=\"221\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">May</text><text x=\"270\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jun</text><text x=\"320\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jul</text><text x=\"363\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Aug</text><text x=\"411\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sep</text><text x=\"459\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Oct</text><text x=\"504\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Nov</text><text x=\"553\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Dec</text><path d=\"M 30 361\nL 47 361\nL 47 363\nL 30 363\nL 30 361\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 77 355\nL 94 355\nL 94 363\nL 77 363\nL 77 355\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 124 351\nL 141 351\nL 141 363\nL 124 363\nL 124 351\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 171 321\nL 188 321\nL 188 363\nL 171 363\nL 171 321\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 218 317\nL 235 317\nL 235 363\nL 218 363\nL 218 317\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 265 221\nL 282 221\nL 282 363\nL 265 363\nL 265 221\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 312 111\nL 329 111\nL 329 363\nL 312 363\nL 312 111\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 359 61\nL 376 61\nL 376 363\nL 359 363\nL 359 61\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 406 303\nL 423 303\nL 423 363\nL 406 363\nL 406 303\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 453 327\nL 470 327\nL 470 363\nL 453 363\nL 453 327\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 500 353\nL 517 353\nL 517 363\nL 500 363\nL 500 353\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 547 358\nL 564 358\nL 564 363\nL 547 363\nL 547 358\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 50 360\nL 67 360\nL 67 363\nL 50 363\nL 50 360\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 97 353\nL 114 353\nL 114 363\nL 97 363\nL 97 353\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 144 348\nL 161 348\nL 161 363\nL 144 363\nL 144 348\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 191 315\nL 208 315\nL 208 363\nL 191 363\nL 191 315\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 238 311\nL 255 311\nL 255 363\nL 238 363\nL 238 311\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 285 232\nL 302 232\nL 302 363\nL 285 363\nL 285 232\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 332 36\nL 349 36\nL 349 363\nL 332 363\nL 332 36\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 379 23\nL 396 23\nL 396 363\nL 379 363\nL 379 23\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 426 273\nL 443 273\nL 443 363\nL 426 363\nL 426 273\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 473 329\nL 490 329\nL 490 363\nL 473 363\nL 473 329\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 520 353\nL 537 353\nL 537 363\nL 520 363\nL 520 353\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 567 360\nL 584 360\nL 584 363\nL 567 363\nL 567 360\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"34\" y=\"356\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"76\" y=\"350\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4.9</text><text x=\"128\" y=\"346\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"166\" y=\"316\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23.2</text><text x=\"213\" y=\"312\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25.6</text><text x=\"260\" y=\"216\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">76.7</text><text x=\"304\" y=\"106\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">135.6</text><text x=\"351\" y=\"56\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">162.2</text><text x=\"401\" y=\"298\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32.6</text><text x=\"454\" y=\"322\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"499\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6.4</text><text x=\"546\" y=\"353\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3.3</text><text x=\"49\" y=\"355\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.6</text><text x=\"96\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">5.9</text><text x=\"148\" y=\"343\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"186\" y=\"310\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26.4</text><text x=\"233\" y=\"306\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28.7</text><text x=\"280\" y=\"227\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">70.7</text><text x=\"324\" y=\"31\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">175.6</text><text x=\"371\" y=\"18\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">182.2</text><text x=\"421\" y=\"268\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48.7</text><text x=\"468\" y=\"324\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18.8</text><text x=\"524\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"566\" y=\"355\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.3</text></svg>",
},
{
name: "bar_width_truncate",
makeOptions: func() BarChartOption {
opt := makeBasicBarChartOption()
opt.XAxis.Show = Ptr(false)
opt.YAxis[0].Show = Ptr(false)
opt.BarWidth = 1000
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 15 386\nL 32 386\nL 32 389\nL 15 389\nL 15 386\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 63 381\nL 80 381\nL 80 389\nL 63 389\nL 63 381\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 111 376\nL 128 376\nL 128 389\nL 111 389\nL 111 376\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 160 344\nL 177 344\nL 177 389\nL 160 389\nL 160 344\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 208 339\nL 225 339\nL 225 389\nL 208 389\nL 208 339\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 256 236\nL 273 236\nL 273 389\nL 256 389\nL 256 236\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 305 118\nL 322 118\nL 322 389\nL 305 389\nL 305 118\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 353 64\nL 370 64\nL 370 389\nL 353 389\nL 353 64\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 401 325\nL 418 325\nL 418 389\nL 401 389\nL 401 325\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 450 350\nL 467 350\nL 467 389\nL 450 389\nL 450 350\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 498 378\nL 515 378\nL 515 389\nL 498 389\nL 498 378\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 546 384\nL 563 384\nL 563 389\nL 546 389\nL 546 384\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 35 385\nL 52 385\nL 52 389\nL 35 389\nL 35 385\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 83 379\nL 100 379\nL 100 389\nL 83 389\nL 83 379\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 131 372\nL 148 372\nL 148 389\nL 131 389\nL 131 372\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 180 337\nL 197 337\nL 197 389\nL 180 389\nL 180 337\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 228 333\nL 245 333\nL 245 389\nL 228 389\nL 228 333\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 276 248\nL 293 248\nL 293 389\nL 276 389\nL 276 248\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 325 37\nL 342 37\nL 342 389\nL 325 389\nL 325 37\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 373 24\nL 390 24\nL 390 389\nL 373 389\nL 373 24\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 421 293\nL 438 293\nL 438 389\nL 421 389\nL 421 293\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 470 353\nL 487 353\nL 487 389\nL 470 389\nL 470 353\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 518 378\nL 535 378\nL 535 389\nL 518 389\nL 518 378\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 566 386\nL 583 386\nL 583 389\nL 566 389\nL 566 386\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"19\" y=\"381\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"62\" y=\"376\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4.9</text><text x=\"115\" y=\"371\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"155\" y=\"339\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23.2</text><text x=\"203\" y=\"334\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25.6</text><text x=\"251\" y=\"231\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">76.7</text><text x=\"297\" y=\"113\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">135.6</text><text x=\"345\" y=\"59\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">162.2</text><text x=\"396\" y=\"320\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32.6</text><text x=\"451\" y=\"345\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"497\" y=\"373\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6.4</text><text x=\"545\" y=\"379\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3.3</text><text x=\"34\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.6</text><text x=\"82\" y=\"374\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">5.9</text><text x=\"135\" y=\"367\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"175\" y=\"332\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26.4</text><text x=\"223\" y=\"328\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28.7</text><text x=\"271\" y=\"243\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">70.7</text><text x=\"317\" y=\"32\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">175.6</text><text x=\"365\" y=\"19\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">182.2</text><text x=\"416\" y=\"288\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48.7</text><text x=\"465\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18.8</text><text x=\"522\" y=\"373\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"565\" y=\"381\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.3</text></svg>",
},
{
name: "bar_width_thin",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
opt.BarWidth = 2
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 155 330\nL 157 330\nL 157 379\nL 155 379\nL 155 330\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 435 244\nL 437 244\nL 437 379\nL 435 379\nL 435 244\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 162 244\nL 164 244\nL 164 379\nL 162 379\nL 162 244\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 442 71\nL 444 71\nL 444 379\nL 442 379\nL 442 71\" style=\"stroke:none;fill:rgb(145,204,117)\"/></svg>",
},
{
name: "bar_margin_narrow",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
opt.BarMargin = Ptr(0.0)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 30 330\nL 160 330\nL 160 379\nL 30 379\nL 30 330\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 310 244\nL 440 244\nL 440 379\nL 310 379\nL 310 244\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 160 244\nL 290 244\nL 290 379\nL 160 379\nL 160 244\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 440 71\nL 570 71\nL 570 379\nL 440 379\nL 440 71\" style=\"stroke:none;fill:rgb(145,204,117)\"/></svg>",
},
{
name: "bar_margin_wide",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
opt.BarMargin = Ptr(1000.0) // will be limited to fit graph
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 30 330\nL 90 330\nL 90 379\nL 30 379\nL 30 330\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 310 244\nL 370 244\nL 370 379\nL 310 379\nL 310 244\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 230 244\nL 290 244\nL 290 379\nL 230 379\nL 230 244\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 510 71\nL 570 71\nL 570 379\nL 510 379\nL 510 71\" style=\"stroke:none;fill:rgb(145,204,117)\"/></svg>",
},
{
name: "bar_width_and_narrow_margin",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
opt.BarWidth = 10
opt.BarMargin = Ptr(0.0)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 150 330\nL 160 330\nL 160 379\nL 150 379\nL 150 330\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 430 244\nL 440 244\nL 440 379\nL 430 379\nL 430 244\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 160 244\nL 170 244\nL 170 379\nL 160 379\nL 160 244\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 440 71\nL 450 71\nL 450 379\nL 440 379\nL 440 71\" style=\"stroke:none;fill:rgb(145,204,117)\"/></svg>",
},
{
name: "bar_width_and_wide_margin",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
opt.BarWidth = 10
opt.BarMargin = Ptr(1000.0) // will be limited for readability
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 85 330\nL 95 330\nL 95 379\nL 85 379\nL 85 330\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 365 244\nL 375 244\nL 375 379\nL 365 379\nL 365 244\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 225 244\nL 235 244\nL 235 379\nL 225 379\nL 225 244\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 505 71\nL 515 71\nL 515 379\nL 505 379\nL 505 71\" style=\"stroke:none;fill:rgb(145,204,117)\"/></svg>",
},
{
name: "double_yaxis",
makeOptions: func() BarChartOption {
opt := makeBasicBarChartOption()
opt.Theme = GetTheme(ThemeLight)
opt.Title.Text = "T"
opt.SeriesList[1].YAxisIndex = 1
opt.YAxis = append(opt.YAxis, opt.YAxis[0])
opt.YAxis[0].Theme = opt.Theme.WithYAxisSeriesColor(0)
opt.YAxis[1].Theme = opt.Theme.WithYAxisSeriesColor(1)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">T</text><text x=\"564\" y=\"47\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">189</text><text x=\"564\" y=\"82\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">168</text><text x=\"564\" y=\"118\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">147</text><text x=\"564\" y=\"154\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">126</text><text x=\"564\" y=\"189\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">105</text><text x=\"564\" y=\"225\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">84</text><text x=\"564\" y=\"261\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">63</text><text x=\"564\" y=\"296\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">42</text><text x=\"564\" y=\"332\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">21</text><text x=\"564\" y=\"368\" style=\"stroke:none;fill:rgb(145,204,117);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><text x=\"9\" y=\"47\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">180</text><text x=\"9\" y=\"82\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">160</text><text x=\"9\" y=\"118\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">140</text><text x=\"9\" y=\"154\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">120</text><text x=\"9\" y=\"189\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">100</text><text x=\"18\" y=\"225\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">80</text><text x=\"18\" y=\"261\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">60</text><text x=\"18\" y=\"296\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">40</text><text x=\"18\" y=\"332\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"27\" y=\"368\" style=\"stroke:none;fill:rgb(84,112,198);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 42 41\nL 554 41\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 76\nL 554 76\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 112\nL 554 112\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 148\nL 554 148\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 184\nL 554 184\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 220\nL 554 220\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 256\nL 554 256\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 292\nL 554 292\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 42 328\nL 554 328\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 46 364\nL 554 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 46 369\nL 46 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 88 369\nL 88 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 130 369\nL 130 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 173 369\nL 173 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 215 369\nL 215 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 257 369\nL 257 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 300 369\nL 300 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 342 369\nL 342 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 384 369\nL 384 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 427 369\nL 427 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 469 369\nL 469 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 511 369\nL 511 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 554 369\nL 554 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"54\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jan</text><text x=\"96\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Feb</text><text x=\"137\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mar</text><text x=\"182\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Apr</text><text x=\"221\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">May</text><text x=\"265\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jun</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Jul</text><text x=\"349\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Aug</text><text x=\"392\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sep</text><text x=\"436\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Oct</text><text x=\"476\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Nov</text><text x=\"519\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Dec</text><path d=\"M 51 361\nL 65 361\nL 65 363\nL 51 363\nL 51 361\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 93 356\nL 107 356\nL 107 363\nL 93 363\nL 93 356\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 135 352\nL 149 352\nL 149 363\nL 135 363\nL 135 352\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 178 323\nL 192 323\nL 192 363\nL 178 363\nL 178 323\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 220 319\nL 234 319\nL 234 363\nL 220 363\nL 220 319\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 262 227\nL 276 227\nL 276 363\nL 262 363\nL 262 227\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 305 121\nL 319 121\nL 319 363\nL 305 363\nL 305 121\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 347 73\nL 361 73\nL 361 363\nL 347 363\nL 347 73\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 389 306\nL 403 306\nL 403 363\nL 389 363\nL 389 306\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 432 329\nL 446 329\nL 446 363\nL 432 363\nL 432 329\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 474 353\nL 488 353\nL 488 363\nL 474 363\nL 474 353\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 516 359\nL 530 359\nL 530 363\nL 516 363\nL 516 359\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 68 360\nL 82 360\nL 82 363\nL 68 363\nL 68 360\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 110 354\nL 124 354\nL 124 363\nL 110 363\nL 110 354\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 152 349\nL 166 349\nL 166 363\nL 152 363\nL 152 349\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 195 319\nL 209 319\nL 209 363\nL 195 363\nL 195 319\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 237 315\nL 251 315\nL 251 363\nL 237 363\nL 237 315\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 279 244\nL 293 244\nL 293 363\nL 279 363\nL 279 244\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 322 64\nL 336 64\nL 336 363\nL 322 363\nL 322 64\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 364 53\nL 378 53\nL 378 363\nL 364 363\nL 364 53\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 406 281\nL 420 281\nL 420 363\nL 406 363\nL 406 281\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 449 332\nL 463 332\nL 463 363\nL 449 363\nL 449 332\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 491 354\nL 505 354\nL 505 363\nL 491 363\nL 491 354\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 533 361\nL 547 361\nL 547 363\nL 533 363\nL 533 361\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"54\" y=\"356\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"91\" y=\"351\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4.9</text><text x=\"138\" y=\"347\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"172\" y=\"318\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23.2</text><text x=\"214\" y=\"314\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25.6</text><text x=\"256\" y=\"222\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">76.7</text><text x=\"296\" y=\"116\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">135.6</text><text x=\"338\" y=\"68\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">162.2</text><text x=\"383\" y=\"301\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32.6</text><text x=\"432\" y=\"324\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"472\" y=\"348\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6.4</text><text x=\"514\" y=\"354\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3.3</text><text x=\"66\" y=\"355\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.6</text><text x=\"108\" y=\"349\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">5.9</text><text x=\"155\" y=\"344\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"189\" y=\"314\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26.4</text><text x=\"231\" y=\"310\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28.7</text><text x=\"273\" y=\"239\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">70.7</text><text x=\"313\" y=\"59\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">175.6</text><text x=\"355\" y=\"48\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">182.2</text><text x=\"400\" y=\"276\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48.7</text><text x=\"443\" y=\"327\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18.8</text><text x=\"494\" y=\"349\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"531\" y=\"356\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2.3</text></svg>",
},
{
name: "mark_line",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
for i := range opt.SeriesList {
opt.SeriesList[i].MarkLine = NewMarkLine("min", "max", "average")
}
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 30 330\nL 157 330\nL 157 379\nL 30 379\nL 30 330\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 310 244\nL 437 244\nL 437 379\nL 310 379\nL 310 244\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 162 244\nL 289 244\nL 289 379\nL 162 379\nL 162 244\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 442 71\nL 569 71\nL 569 379\nL 442 379\nL 442 71\" style=\"stroke:none;fill:rgb(145,204,117)\"/><circle cx=\"23\" cy=\"330\" r=\"3\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 330\nL 562 330\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 325\nL 578 330\nL 562 335\nL 567 330\nL 562 325\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><text x=\"580\" y=\"334\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">12</text><circle cx=\"23\" cy=\"244\" r=\"3\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 244\nL 562 244\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 239\nL 578 244\nL 562 249\nL 567 244\nL 562 239\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><text x=\"580\" y=\"248\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">24</text><circle cx=\"23\" cy=\"287\" r=\"3\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 287\nL 562 287\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 282\nL 578 287\nL 562 292\nL 567 287\nL 562 282\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><text x=\"580\" y=\"291\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18</text><circle cx=\"23\" cy=\"244\" r=\"3\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 244\nL 562 244\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 239\nL 578 244\nL 562 249\nL 567 244\nL 562 239\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><text x=\"580\" y=\"248\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">24</text><circle cx=\"23\" cy=\"71\" r=\"3\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 71\nL 562 71\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 66\nL 578 71\nL 562 76\nL 567 71\nL 562 66\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><text x=\"580\" y=\"75\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48</text><circle cx=\"23\" cy=\"157\" r=\"3\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 157\nL 562 157\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 152\nL 578 157\nL 562 162\nL 567 157\nL 562 152\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><text x=\"580\" y=\"161\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">36</text></svg>",
},
{
name: "mark_point",
makeOptions: func() BarChartOption {
opt := makeMinimalBarChartOption()
for i := range opt.SeriesList {
opt.SeriesList[i].MarkPoint = NewMarkPoint("min", "max")
}
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 30 300\nL 157 300\nL 157 379\nL 30 379\nL 30 300\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 310 220\nL 437 220\nL 437 379\nL 310 379\nL 310 220\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 162 220\nL 289 220\nL 289 379\nL 162 379\nL 162 220\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 442 60\nL 569 60\nL 569 379\nL 442 379\nL 442 60\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 89 293\nA 14 14 330.00 1 1 97 293\nL 93 279\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 79 279\nQ93,314 107,279\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><text x=\"86\" y=\"284\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">12</text><path d=\"M 369 213\nA 14 14 330.00 1 1 377 213\nL 373 199\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 359 199\nQ373,234 387,199\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><text x=\"366\" y=\"204\" style=\"stroke:none;fill:rgb(238,238,238);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">24</text><path d=\"M 221 213\nA 14 14 330.00 1 1 229 213\nL 225 199\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 211 199\nQ225,234 239,199\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"218\" y=\"204\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">24</text><path d=\"M 501 53\nA 14 14 330.00 1 1 509 53\nL 505 39\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 491 39\nQ505,74 519,39\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"498\" y=\"44\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48</text></svg>",
},
{
name: "stack_series",
makeOptions: makeFullBarChartStackedOption,
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 217 29\nL 247 29\" style=\"stroke-width:3;stroke:rgb(84,112,198);fill:none\"/><circle cx=\"232\" cy=\"29\" r=\"5\" style=\"stroke-width:3;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><text x=\"249\" y=\"35\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">A</text><path d=\"M 280 29\nL 310 29\" style=\"stroke-width:3;stroke:rgb(145,204,117);fill:none\"/><circle cx=\"295\" cy=\"29\" r=\"5\" style=\"stroke-width:3;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><text x=\"312\" y=\"35\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">B</text><path d=\"M 342 29\nL 372 29\" style=\"stroke-width:3;stroke:rgb(250,200,88);fill:none\"/><circle cx=\"357\" cy=\"29\" r=\"5\" style=\"stroke-width:3;stroke:rgb(250,200,88);fill:rgb(250,200,88)\"/><text x=\"374\" y=\"35\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">C</text><text x=\"19\" y=\"62\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">297</text><text x=\"19\" y=\"94\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">264</text><text x=\"19\" y=\"127\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">231</text><text x=\"19\" y=\"160\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">198</text><text x=\"19\" y=\"193\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">165</text><text x=\"19\" y=\"226\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">132</text><text x=\"28\" y=\"259\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">99</text><text x=\"28\" y=\"292\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">66</text><text x=\"28\" y=\"325\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">33</text><text x=\"37\" y=\"358\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 52 56\nL 580 56\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 89\nL 580 89\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 122\nL 580 122\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 155\nL 580 155\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 188\nL 580 188\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 221\nL 580 221\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 254\nL 580 254\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 287\nL 580 287\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 52 320\nL 580 320\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 56 354\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 56 359\nL 56 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 121 359\nL 121 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 187 359\nL 187 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 252 359\nL 252 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 318 359\nL 318 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 383 359\nL 383 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 449 359\nL 449 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 514 359\nL 514 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 580 359\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"84\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1</text><text x=\"150\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"215\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">3</text><text x=\"281\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">4</text><text x=\"346\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">5</text><text x=\"412\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"477\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"543\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">8</text><path d=\"M 66 350\nL 111 350\nL 111 354\nL 66 354\nL 66 350\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 131 331\nL 176 331\nL 176 354\nL 131 354\nL 131 331\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 197 329\nL 242 329\nL 242 354\nL 197 354\nL 197 329\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 262 252\nL 307 252\nL 307 354\nL 262 354\nL 262 252\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 328 212\nL 373 212\nL 373 354\nL 328 354\nL 328 212\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 393 322\nL 438 322\nL 438 354\nL 393 354\nL 393 322\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 459 334\nL 504 334\nL 504 354\nL 459 354\nL 459 334\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 524 351\nL 569 351\nL 569 354\nL 524 354\nL 524 351\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 66 341\nL 111 341\nL 111 350\nL 66 350\nL 66 341\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 131 305\nL 176 305\nL 176 331\nL 131 331\nL 131 305\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 197 301\nL 242 301\nL 242 329\nL 197 329\nL 197 301\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 262 107\nL 307 107\nL 307 252\nL 262 252\nL 262 107\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 328 90\nL 373 90\nL 373 212\nL 328 212\nL 328 90\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 393 274\nL 438 274\nL 438 322\nL 393 322\nL 393 274\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 459 316\nL 504 316\nL 504 334\nL 459 334\nL 459 316\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 524 349\nL 569 349\nL 569 351\nL 524 351\nL 524 349\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 66 261\nL 111 261\nL 111 341\nL 66 341\nL 66 261\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 131 265\nL 176 265\nL 176 305\nL 131 305\nL 131 265\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 197 273\nL 242 273\nL 242 301\nL 197 301\nL 197 273\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 262 79\nL 307 79\nL 307 107\nL 262 107\nL 262 79\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 328 66\nL 373 66\nL 373 90\nL 328 90\nL 328 66\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 393 250\nL 438 250\nL 438 274\nL 393 274\nL 393 250\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 459 276\nL 504 276\nL 504 316\nL 459 316\nL 459 276\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 524 268\nL 569 268\nL 569 349\nL 524 349\nL 524 268\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 346 205\nA 14 14 330.00 1 1 354 205\nL 350 191\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 336 191\nQ350,226 364,191\nZ\" style=\"stroke:none;fill:rgb(84,112,198)\"/><text x=\"337\" y=\"196\" style=\"stroke:none;fill:rgb(238,238,238);font-size:10.2px;font-family:'Roboto Medium',sans-serif\">142.2</text><path d=\"M 280 100\nA 14 14 330.00 1 1 288 100\nL 284 86\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 270 86\nQ284,121 298,86\nZ\" style=\"stroke:none;fill:rgb(145,204,117)\"/><text x=\"271\" y=\"91\" style=\"stroke:none;fill:rgb(70,70,70);font-size:10.2px;font-family:'Roboto Medium',sans-serif\">144.6</text><path d=\"M 542 261\nA 14 14 330.00 1 1 550 261\nL 546 247\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 532 247\nQ546,282 560,247\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><text x=\"533\" y=\"252\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">80.8</text></svg>",
},
{
name: "stack_series_capped_bar",
makeOptions: func() BarChartOption {
opt := makeFullBarChartStackedOption()
opt.RoundedBarCaps = Ptr(true)
// disable some extra visuals
for i := range opt.SeriesList {
opt.SeriesList[i].Label.Show = Ptr(true)
opt.SeriesList[i].Label.ValueFormatter = func(f float64) string {
return strconv.Itoa(int(f))
}
opt.SeriesList[i].MarkLine.Lines = nil
opt.SeriesList[i].MarkPoint.Points = nil
}
opt.YAxis[0].Show = Ptr(false)
opt.Legend.Show = Ptr(false)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 20 354\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 20 359\nL 20 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 90 359\nL 90 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 160 359\nL 160 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 230 359\nL 230 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 300 359\nL 300 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 370 359\nL 370 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 440 359\nL 440 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 510 359\nL 510 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 580 359\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"51\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1</text><text x=\"121\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"191\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">3</text><text x=\"261\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">4</text><text x=\"331\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">5</text><text x=\"401\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"471\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"541\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">8</text><path d=\"M 30 349\nL 80 349\nL 80 354\nL 30 354\nL 30 349\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 100 328\nL 150 328\nL 150 354\nL 100 354\nL 100 328\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 170 326\nL 220 326\nL 220 354\nL 170 354\nL 170 326\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 240 239\nL 290 239\nL 290 354\nL 240 354\nL 240 239\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 310 195\nL 360 195\nL 360 354\nL 310 354\nL 310 195\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 380 318\nL 430 318\nL 430 354\nL 380 354\nL 380 318\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 450 332\nL 500 332\nL 500 354\nL 450 354\nL 450 332\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 520 351\nL 570 351\nL 570 354\nL 520 354\nL 520 351\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 30 339\nL 80 339\nL 80 349\nL 30 349\nL 30 339\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 100 299\nL 150 299\nL 150 328\nL 100 328\nL 100 299\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 170 294\nL 220 294\nL 220 326\nL 170 326\nL 170 294\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 240 77\nL 290 77\nL 290 239\nL 240 239\nL 240 77\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 310 58\nL 360 58\nL 360 195\nL 310 195\nL 310 58\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 380 264\nL 430 264\nL 430 318\nL 380 318\nL 380 264\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 450 311\nL 500 311\nL 500 332\nL 450 332\nL 450 311\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 520 349\nL 570 349\nL 570 351\nL 520 351\nL 520 349\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 55 250\nL 55 250\nL 55 250\nA 25 25 90.00 0 1 80 275\nL 80 339\nL 30 339\nL 30 275\nL 30 275\nA 25 25 90.00 0 1 55 250\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 125 254\nL 125 254\nL 125 254\nA 25 25 90.00 0 1 150 279\nL 150 299\nL 100 299\nL 100 279\nL 100 279\nA 25 25 90.00 0 1 125 254\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 195 263\nL 195 263\nL 195 263\nA 25 25 90.00 0 1 220 288\nL 220 294\nL 170 294\nL 170 288\nL 170 288\nA 25 25 90.00 0 1 195 263\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 265 45\nL 265 45\nL 265 45\nA 25 25 90.00 0 1 290 70\nL 290 77\nL 240 77\nL 240 70\nL 240 70\nA 25 25 90.00 0 1 265 45\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 335 31\nL 335 31\nL 335 31\nA 25 25 90.00 0 1 360 56\nL 360 58\nL 310 58\nL 310 56\nL 310 56\nA 25 25 90.00 0 1 335 31\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 405 237\nL 405 237\nL 405 237\nA 25 25 90.00 0 1 430 262\nL 430 264\nL 380 264\nL 380 262\nL 380 262\nA 25 25 90.00 0 1 405 237\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 475 266\nL 475 266\nL 475 266\nA 25 25 90.00 0 1 500 291\nL 500 311\nL 450 311\nL 450 291\nL 450 291\nA 25 25 90.00 0 1 475 266\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 545 259\nL 545 259\nL 545 259\nA 25 25 90.00 0 1 570 284\nL 570 349\nL 520 349\nL 520 284\nL 520 284\nA 25 25 90.00 0 1 545 259\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><text x=\"51\" y=\"344\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4</text><text x=\"118\" y=\"323\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23</text><text x=\"188\" y=\"321\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25</text><text x=\"254\" y=\"234\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">102</text><text x=\"324\" y=\"190\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">142</text><text x=\"398\" y=\"313\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32</text><text x=\"468\" y=\"327\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"541\" y=\"346\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3</text><text x=\"51\" y=\"334\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"118\" y=\"294\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26</text><text x=\"188\" y=\"289\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28</text><text x=\"254\" y=\"72\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">144</text><text x=\"324\" y=\"53\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">122</text><text x=\"398\" y=\"259\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48</text><text x=\"468\" y=\"306\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18</text><text x=\"541\" y=\"344\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"48\" y=\"245\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">80</text><text x=\"118\" y=\"249\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">40</text><text x=\"188\" y=\"258\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28</text><text x=\"258\" y=\"40\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28</text><text x=\"328\" y=\"26\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">24</text><text x=\"398\" y=\"232\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">24</text><text x=\"468\" y=\"261\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">40</text><text x=\"538\" y=\"254\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">80</text></svg>",
},
{
name: "stack_series_global_mark_point",
makeOptions: func() BarChartOption {
opt := makeFullBarChartStackedOption()
// add global point configurations
opt.SeriesList[len(opt.SeriesList)-1].MarkPoint.AddGlobalPoints(SeriesMarkTypeMax)
// disable some extra visuals
for i := range opt.SeriesList {
opt.SeriesList[i].Label.Show = Ptr(true)
opt.SeriesList[i].Label.ValueFormatter = func(f float64) string {
return strconv.Itoa(int(f))
}
opt.SeriesList[i].MarkLine.Lines = nil
if i != len(opt.SeriesList)-1 {
opt.SeriesList[i].MarkPoint.Points = nil
}
}
opt.YAxis[0].Show = Ptr(false)
opt.Legend.Show = Ptr(false)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 20 354\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 20 359\nL 20 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 90 359\nL 90 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 160 359\nL 160 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 230 359\nL 230 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 300 359\nL 300 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 370 359\nL 370 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 440 359\nL 440 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 510 359\nL 510 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 580 359\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"51\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1</text><text x=\"121\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"191\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">3</text><text x=\"261\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">4</text><text x=\"331\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">5</text><text x=\"401\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"471\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"541\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">8</text><path d=\"M 30 349\nL 80 349\nL 80 354\nL 30 354\nL 30 349\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 100 328\nL 150 328\nL 150 354\nL 100 354\nL 100 328\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 170 326\nL 220 326\nL 220 354\nL 170 354\nL 170 326\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 240 239\nL 290 239\nL 290 354\nL 240 354\nL 240 239\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 310 195\nL 360 195\nL 360 354\nL 310 354\nL 310 195\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 380 318\nL 430 318\nL 430 354\nL 380 354\nL 380 318\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 450 332\nL 500 332\nL 500 354\nL 450 354\nL 450 332\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 520 351\nL 570 351\nL 570 354\nL 520 354\nL 520 351\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 30 339\nL 80 339\nL 80 349\nL 30 349\nL 30 339\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 100 299\nL 150 299\nL 150 328\nL 100 328\nL 100 299\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 170 294\nL 220 294\nL 220 326\nL 170 326\nL 170 294\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 240 77\nL 290 77\nL 290 239\nL 240 239\nL 240 77\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 310 58\nL 360 58\nL 360 195\nL 310 195\nL 310 58\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 380 264\nL 430 264\nL 430 318\nL 380 318\nL 380 264\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 450 311\nL 500 311\nL 500 332\nL 450 332\nL 450 311\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 520 349\nL 570 349\nL 570 351\nL 520 351\nL 520 349\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 30 250\nL 80 250\nL 80 339\nL 30 339\nL 30 250\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 100 254\nL 150 254\nL 150 299\nL 100 299\nL 100 254\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 170 263\nL 220 263\nL 220 294\nL 170 294\nL 170 263\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 240 45\nL 290 45\nL 290 77\nL 240 77\nL 240 45\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 310 31\nL 360 31\nL 360 58\nL 310 58\nL 310 31\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 380 237\nL 430 237\nL 430 264\nL 380 264\nL 380 237\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 450 266\nL 500 266\nL 500 311\nL 450 311\nL 450 266\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 520 259\nL 570 259\nL 570 349\nL 520 349\nL 520 259\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 541 252\nA 14 14 330.00 1 1 549 252\nL 545 238\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 531 238\nQ545,273 559,238\nZ\" style=\"stroke:none;fill:rgb(250,200,88)\"/><text x=\"538\" y=\"243\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">80</text><path d=\"M 331 24\nA 14 14 330.00 1 1 339 24\nL 335 10\nZ\" style=\"stroke:none;fill:rgb(211,211,211)\"/><path d=\"M 321 10\nQ335,45 349,10\nZ\" style=\"stroke:none;fill:rgb(211,211,211)\"/><text x=\"324\" y=\"15\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">288</text><text x=\"51\" y=\"344\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">4</text><text x=\"118\" y=\"323\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">23</text><text x=\"188\" y=\"321\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">25</text><text x=\"254\" y=\"234\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">102</text><text x=\"324\" y=\"190\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">142</text><text x=\"398\" y=\"313\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">32</text><text x=\"468\" y=\"327\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">20</text><text x=\"541\" y=\"346\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">3</text><text x=\"51\" y=\"334\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">9</text><text x=\"118\" y=\"294\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">26</text><text x=\"188\" y=\"289\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28</text><text x=\"254\" y=\"72\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">144</text><text x=\"324\" y=\"53\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">122</text><text x=\"398\" y=\"259\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">48</text><text x=\"468\" y=\"306\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">18</text><text x=\"541\" y=\"344\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"48\" y=\"245\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">80</text><text x=\"118\" y=\"249\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">40</text><text x=\"188\" y=\"258\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28</text><text x=\"258\" y=\"40\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">28</text><text x=\"398\" y=\"232\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">24</text><text x=\"468\" y=\"261\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">40</text></svg>",
},
{
name: "stack_series_global_mark_line",
makeOptions: func() BarChartOption {
opt := makeFullBarChartStackedOption()
// add global line configurations
opt.SeriesList[len(opt.SeriesList)-1].MarkLine.AddGlobalLines(SeriesMarkTypeAverage,
SeriesMarkTypeMin, SeriesMarkTypeMax)
// disable some extra visuals
for i := range opt.SeriesList {
opt.SeriesList[i].Label.Show = Ptr(false)
opt.SeriesList[i].Label.ValueFormatter = func(f float64) string {
return strconv.Itoa(int(f))
}
opt.SeriesList[i].MarkPoint.Points = nil
}
opt.YAxis[0].Show = Ptr(false)
opt.Legend.Show = Ptr(false)
return opt
},
result: "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 600 400\"><path d=\"M 0 0\nL 600 0\nL 600 400\nL 0 400\nL 0 0\" style=\"stroke:none;fill:white\"/><path d=\"M 20 354\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 20 359\nL 20 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 90 359\nL 90 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 160 359\nL 160 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 230 359\nL 230 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 300 359\nL 300 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 370 359\nL 370 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 440 359\nL 440 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 510 359\nL 510 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 580 359\nL 580 354\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><text x=\"51\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1</text><text x=\"121\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">2</text><text x=\"191\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">3</text><text x=\"261\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">4</text><text x=\"331\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">5</text><text x=\"401\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">6</text><text x=\"471\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">7</text><text x=\"541\" y=\"380\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">8</text><path d=\"M 30 349\nL 80 349\nL 80 354\nL 30 354\nL 30 349\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 100 328\nL 150 328\nL 150 354\nL 100 354\nL 100 328\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 170 326\nL 220 326\nL 220 354\nL 170 354\nL 170 326\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 240 239\nL 290 239\nL 290 354\nL 240 354\nL 240 239\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 310 195\nL 360 195\nL 360 354\nL 310 354\nL 310 195\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 380 318\nL 430 318\nL 430 354\nL 380 354\nL 380 318\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 450 332\nL 500 332\nL 500 354\nL 450 354\nL 450 332\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 520 351\nL 570 351\nL 570 354\nL 520 354\nL 520 351\" style=\"stroke:none;fill:rgb(84,112,198)\"/><path d=\"M 30 339\nL 80 339\nL 80 349\nL 30 349\nL 30 339\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 100 299\nL 150 299\nL 150 328\nL 100 328\nL 100 299\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 170 294\nL 220 294\nL 220 326\nL 170 326\nL 170 294\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 240 77\nL 290 77\nL 290 239\nL 240 239\nL 240 77\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 310 58\nL 360 58\nL 360 195\nL 310 195\nL 310 58\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 380 264\nL 430 264\nL 430 318\nL 380 318\nL 380 264\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 450 311\nL 500 311\nL 500 332\nL 450 332\nL 450 311\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 520 349\nL 570 349\nL 570 351\nL 520 351\nL 520 349\" style=\"stroke:none;fill:rgb(145,204,117)\"/><path d=\"M 30 250\nL 80 250\nL 80 339\nL 30 339\nL 30 250\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 100 254\nL 150 254\nL 150 299\nL 100 299\nL 100 254\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 170 263\nL 220 263\nL 220 294\nL 170 294\nL 170 263\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 240 45\nL 290 45\nL 290 77\nL 240 77\nL 240 45\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 310 31\nL 360 31\nL 360 58\nL 310 58\nL 310 31\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 380 237\nL 430 237\nL 430 264\nL 380 264\nL 380 237\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 450 266\nL 500 266\nL 500 311\nL 450 311\nL 450 266\" style=\"stroke:none;fill:rgb(250,200,88)\"/><path d=\"M 520 259\nL 570 259\nL 570 349\nL 520 349\nL 520 259\" style=\"stroke:none;fill:rgb(250,200,88)\"/><circle cx=\"23\" cy=\"199\" r=\"3\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 199\nL 562 199\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 194\nL 578 199\nL 562 204\nL 567 199\nL 562 194\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><text x=\"580\" y=\"203\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">137</text><circle cx=\"23\" cy=\"265\" r=\"3\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 265\nL 562 265\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 260\nL 578 265\nL 562 270\nL 567 265\nL 562 260\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><text x=\"580\" y=\"269\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">79</text><circle cx=\"23\" cy=\"30\" r=\"3\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 29 30\nL 562 30\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><path stroke-dasharray=\"4.0, 2.0\" d=\"M 562 25\nL 578 30\nL 562 35\nL 567 30\nL 562 25\" style=\"stroke-width:1;stroke:rgb(211,211,211);fill:rgb(211,211,211)\"/><text x=\"580\" y=\"34\" style=\"stroke:none;fill:rgb(70,70,70);font-size:12.8px;font-family:'Roboto Medium',sans-serif\">288</text></svg>",
},
}
for i, tt := range tests {
painterOptions := PainterOptions{
OutputFormat: ChartOutputSVG,
Width: 600,
Height: 400,
}
if tt.themed {
t.Run(strconv.Itoa(i)+"-"+tt.name+"-painter", func(t *testing.T) {
p := NewPainter(painterOptions, PainterThemeOption(GetTheme(ThemeVividDark)))
validateBarChartRender(t, p, tt.makeOptions(), tt.result)
})
t.Run(strconv.Itoa(i)+"-"+tt.name+"-options", func(t *testing.T) {
p := NewPainter(painterOptions)
opt := tt.makeOptions()
opt.Theme = GetTheme(ThemeVividDark)
validateBarChartRender(t, p, opt, tt.result)
})
} else {
t.Run(strconv.Itoa(i)+"-"+tt.name, func(t *testing.T) {
p := NewPainter(painterOptions)
validateBarChartRender(t, p, tt.makeOptions(), tt.result)
})
}
}
}
func validateBarChartRender(t *testing.T, p *Painter, opt BarChartOption, expectedResult string) {
t.Helper()
err := p.BarChart(opt)
require.NoError(t, err)
data, err := p.Bytes()
require.NoError(t, err)
assertEqualSVG(t, expectedResult, data)
}
func TestBarChartError(t *testing.T) {
t.Parallel()
tests := []struct {
name string
makeOptions func() BarChartOption
errorMsgContains string
}{
{
name: "empty_series",
makeOptions: func() BarChartOption {
return NewBarChartOptionWithData([][]float64{})
},
errorMsgContains: "empty series list",
},
}
for i, tt := range tests {
t.Run(strconv.Itoa(i)+"-"+tt.name, func(t *testing.T) {
p := NewPainter(PainterOptions{
Width: 600,
Height: 400,
})
err := p.BarChart(tt.makeOptions())
require.Error(t, err)
require.ErrorContains(t, err, tt.errorMsgContains)
})
}
}