-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy paththeme_test.go
501 lines (409 loc) · 162 KB
/
theme_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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
package charts
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
var allThemes = []string{ThemeLight, ThemeDark, ThemeVividLight, ThemeVividDark, ThemeAnt, ThemeGrafana,
ThemeNatureLight, ThemeNatureDark, ThemeRetro, ThemeOcean, ThemeSlate, ThemeGray,
ThemeWinter, ThemeSpring, ThemeSummer, ThemeFall}
func TestInstallGetTheme(t *testing.T) {
t.Parallel()
name := "TestInstallGetTheme"
InstallTheme(name, ThemeOption{IsDarkMode: true})
getThemeResult := GetTheme(name)
assert.NotNil(t, getThemeResult)
assert.NotEqual(t, GetDefaultTheme(), getThemeResult)
assert.Equal(t, name, fmt.Sprintf("%s", getThemeResult))
}
func TestGetPreferredTheme(t *testing.T) {
t.Parallel()
t.Run("default", func(t *testing.T) {
assert.Equal(t, getPreferredTheme(nil), GetDefaultTheme())
})
t.Run("provided", func(t *testing.T) {
theme := GetTheme(ThemeGrafana)
assert.Equal(t, getPreferredTheme(theme), theme)
})
}
func TestDefaultTheme(t *testing.T) {
t.Parallel()
assert.Equal(t, GetTheme(ThemeLight), GetDefaultTheme())
assert.Equal(t, GetTheme("Unknown Theme"), GetDefaultTheme())
}
func TestSetDefaultThemeError(t *testing.T) {
t.Parallel()
assert.Error(t, SetDefaultFont("not a theme"))
}
func renderTestLineChartWithThemeName(t *testing.T, fullChart bool, themeName string) []byte {
t.Helper()
return renderTestLineChartWithTheme(t, fullChart, GetTheme(themeName))
}
func renderTestLineChartWithTheme(t *testing.T, fullChart bool, theme ColorPalette) []byte {
t.Helper()
p := NewPainter(PainterOptions{
OutputFormat: ChartOutputSVG,
Width: 600,
Height: 400,
})
opt := makeFullLineChartOption()
if len(opt.YAxis) == 0 {
opt.YAxis = []YAxisOption{{}}
}
opt.YAxis[0].LabelCount = 5
opt.YAxis[0].LabelSkipCount = 1
if !fullChart {
opt.Title.Show = Ptr(false)
opt.Symbol = SymbolNone
}
opt.Theme = theme
err := p.LineChart(opt)
require.NoError(t, err)
data, err := p.Bytes()
require.NoError(t, err)
return data
}
func TestThemeLight(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeLight)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(84,112,198);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(145,204,117);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(250,200,88);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(250,200,88);fill:rgb(250,200,88)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(238,102,102);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(238,102,102);fill:rgb(238,102,102)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(115,192,222);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(115,192,222);fill:rgb(115,192,222)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 58 364\nL 590 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 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 514 369\nL 514 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=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(84,112,198);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(145,204,117);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(250,200,88);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(238,102,102);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(115,192,222);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:white\"/></svg>", svg)
}
func TestThemeDark(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeDark)
assertEqualSVG(t, "<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)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(84,112,198);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(84,112,198);fill:rgb(84,112,198)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(145,204,117);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(145,204,117);fill:rgb(145,204,117)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(250,200,88);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(250,200,88);fill:rgb(250,200,88)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(238,102,102);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(238,102,102);fill:rgb(238,102,102)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(115,192,222);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(115,192,222);fill:rgb(115,192,222)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 514 369\nL 514 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=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(84,112,198);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(84,112,198);fill:rgb(40,40,40)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(145,204,117);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,204,117);fill:rgb(40,40,40)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(250,200,88);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,200,88);fill:rgb(40,40,40)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(238,102,102);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(238,102,102);fill:rgb(40,40,40)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(115,192,222);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(115,192,222);fill:rgb(40,40,40)\"/></svg>", svg)
}
func TestThemeVividLight(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeVividLight)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(255,100,100);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(255,100,100);fill:rgb(255,100,100)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(255,210,100);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(255,210,100);fill:rgb(255,210,100)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(100,180,210);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(100,180,210);fill:rgb(100,180,210)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(64,160,110);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(64,160,110);fill:rgb(64,160,110)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(154,100,180);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(154,100,180);fill:rgb(154,100,180)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 58 364\nL 590 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 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 514 369\nL 514 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=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(255,100,100);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(255,210,100);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(100,180,210);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(64,160,110);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(154,100,180);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:white\"/></svg>", svg)
}
func TestThemeVividDark(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeVividDark)
assertEqualSVG(t, "<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)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(255,100,100);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(255,100,100);fill:rgb(255,100,100)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(255,210,100);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(255,210,100);fill:rgb(255,210,100)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(100,180,210);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(100,180,210);fill:rgb(100,180,210)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(64,160,110);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(64,160,110);fill:rgb(64,160,110)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(154,100,180);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(154,100,180);fill:rgb(154,100,180)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 514 369\nL 514 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=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(255,100,100);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,100,100);fill:rgb(40,40,40)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(255,210,100);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,210,100);fill:rgb(40,40,40)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(100,180,210);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(100,180,210);fill:rgb(40,40,40)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(64,160,110);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(64,160,110);fill:rgb(40,40,40)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(154,100,180);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(154,100,180);fill:rgb(40,40,40)\"/></svg>", svg)
}
func TestThemeAnt(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeAnt)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(91,143,249);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(91,143,249);fill:rgb(91,143,249)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(90,216,166);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(90,216,166);fill:rgb(90,216,166)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(93,112,146);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(93,112,146);fill:rgb(93,112,146)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(246,189,22);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(246,189,22);fill:rgb(246,189,22)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(111,94,249);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(111,94,249);fill:rgb(111,94,249)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 58 364\nL 590 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 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 514 369\nL 514 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=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(91,143,249);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(91,143,249);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(91,143,249);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(91,143,249);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(91,143,249);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(91,143,249);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(91,143,249);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(91,143,249);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(90,216,166);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,216,166);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,216,166);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,216,166);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,216,166);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,216,166);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,216,166);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,216,166);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(93,112,146);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(93,112,146);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(93,112,146);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(93,112,146);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(93,112,146);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(93,112,146);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(93,112,146);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(93,112,146);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(246,189,22);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(246,189,22);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(246,189,22);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(246,189,22);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(246,189,22);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(246,189,22);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(246,189,22);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(246,189,22);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(111,94,249);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(111,94,249);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(111,94,249);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(111,94,249);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(111,94,249);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(111,94,249);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(111,94,249);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(111,94,249);fill:white\"/></svg>", svg)
}
func TestThemeGrafana(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeGrafana)
assertEqualSVG(t, "<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(31,29,29)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(126,178,109);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(126,178,109);fill:rgb(126,178,109)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(234,184,57);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(234,184,57);fill:rgb(234,184,57)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(110,208,224);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(110,208,224);fill:rgb(110,208,224)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(239,132,60);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(239,132,60);fill:rgb(239,132,60)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(226,77,66);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(226,77,66);fill:rgb(226,77,66)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" y=\"368\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(68,67,67);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(68,67,67);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(68,67,67);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(68,67,67);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(185,184,206);fill:none\"/><path d=\"M 514 369\nL 514 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=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(216,217,218);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(126,178,109);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(126,178,109);fill:rgb(31,29,29)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(126,178,109);fill:rgb(31,29,29)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(126,178,109);fill:rgb(31,29,29)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(126,178,109);fill:rgb(31,29,29)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(126,178,109);fill:rgb(31,29,29)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(126,178,109);fill:rgb(31,29,29)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(126,178,109);fill:rgb(31,29,29)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(234,184,57);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(234,184,57);fill:rgb(31,29,29)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(234,184,57);fill:rgb(31,29,29)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(234,184,57);fill:rgb(31,29,29)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(234,184,57);fill:rgb(31,29,29)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(234,184,57);fill:rgb(31,29,29)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(234,184,57);fill:rgb(31,29,29)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(234,184,57);fill:rgb(31,29,29)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(110,208,224);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,208,224);fill:rgb(31,29,29)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,208,224);fill:rgb(31,29,29)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,208,224);fill:rgb(31,29,29)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,208,224);fill:rgb(31,29,29)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,208,224);fill:rgb(31,29,29)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,208,224);fill:rgb(31,29,29)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,208,224);fill:rgb(31,29,29)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(239,132,60);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(239,132,60);fill:rgb(31,29,29)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(239,132,60);fill:rgb(31,29,29)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(239,132,60);fill:rgb(31,29,29)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(239,132,60);fill:rgb(31,29,29)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(239,132,60);fill:rgb(31,29,29)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(239,132,60);fill:rgb(31,29,29)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(239,132,60);fill:rgb(31,29,29)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(226,77,66);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(226,77,66);fill:rgb(31,29,29)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(226,77,66);fill:rgb(31,29,29)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(226,77,66);fill:rgb(31,29,29)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(226,77,66);fill:rgb(31,29,29)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(226,77,66);fill:rgb(31,29,29)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(226,77,66);fill:rgb(31,29,29)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(226,77,66);fill:rgb(31,29,29)\"/></svg>", svg)
}
func TestThemeNatureLight(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeNatureLight)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(156,175,136);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(156,175,136);fill:rgb(156,175,136)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(242,153,119);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(242,153,119);fill:rgb(242,153,119)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(130,175,222);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(130,175,222);fill:rgb(130,175,222)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(121,191,127);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(121,191,127);fill:rgb(121,191,127)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(171,136,100);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(171,136,100);fill:rgb(171,136,100)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(200,203,208);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(200,203,208);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(200,203,208);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(200,203,208);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(156,175,136);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(242,153,119);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(130,175,222);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(121,191,127);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(171,136,100);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:white\"/></svg>", svg)
}
func TestThemeNatureDark(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeNatureDark)
assertEqualSVG(t, "<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)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(156,175,136);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(156,175,136);fill:rgb(156,175,136)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(242,153,119);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(242,153,119);fill:rgb(242,153,119)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(130,175,222);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(130,175,222);fill:rgb(130,175,222)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(121,191,127);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(121,191,127);fill:rgb(121,191,127)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(171,136,100);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(171,136,100);fill:rgb(171,136,100)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(72,71,83);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(138,142,146);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(238,238,238);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(156,175,136);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(156,175,136);fill:rgb(40,40,40)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(242,153,119);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(242,153,119);fill:rgb(40,40,40)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(130,175,222);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(130,175,222);fill:rgb(40,40,40)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(121,191,127);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(121,191,127);fill:rgb(40,40,40)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(171,136,100);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(171,136,100);fill:rgb(40,40,40)\"/></svg>", svg)
}
func TestThemeRetro(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeRetro)
assertEqualSVG(t, "<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(255,250,240)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:maroon;fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:maroon;fill:maroon\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(145,150,99);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(145,150,99);fill:rgb(145,150,99)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(210,180,140);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(210,180,140);fill:rgb(210,180,140)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(184,90,0);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(184,90,0);fill:rgb(184,90,0)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(101,67,33);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(101,67,33);fill:rgb(101,67,33)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" y=\"368\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(140,135,130);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(51,36,16);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:maroon;fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:maroon;fill:rgb(255,250,240)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:maroon;fill:rgb(255,250,240)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:maroon;fill:rgb(255,250,240)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:maroon;fill:rgb(255,250,240)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:maroon;fill:rgb(255,250,240)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:maroon;fill:rgb(255,250,240)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:maroon;fill:rgb(255,250,240)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(145,150,99);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,150,99);fill:rgb(255,250,240)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,150,99);fill:rgb(255,250,240)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,150,99);fill:rgb(255,250,240)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,150,99);fill:rgb(255,250,240)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,150,99);fill:rgb(255,250,240)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,150,99);fill:rgb(255,250,240)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(145,150,99);fill:rgb(255,250,240)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(210,180,140);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,140);fill:rgb(255,250,240)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,140);fill:rgb(255,250,240)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,140);fill:rgb(255,250,240)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,140);fill:rgb(255,250,240)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,140);fill:rgb(255,250,240)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,140);fill:rgb(255,250,240)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,140);fill:rgb(255,250,240)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(184,90,0);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(184,90,0);fill:rgb(255,250,240)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(184,90,0);fill:rgb(255,250,240)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(184,90,0);fill:rgb(255,250,240)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(184,90,0);fill:rgb(255,250,240)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(184,90,0);fill:rgb(255,250,240)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(184,90,0);fill:rgb(255,250,240)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(184,90,0);fill:rgb(255,250,240)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(101,67,33);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(101,67,33);fill:rgb(255,250,240)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(101,67,33);fill:rgb(255,250,240)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(101,67,33);fill:rgb(255,250,240)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(101,67,33);fill:rgb(255,250,240)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(101,67,33);fill:rgb(255,250,240)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(101,67,33);fill:rgb(255,250,240)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(101,67,33);fill:rgb(255,250,240)\"/></svg>", svg)
}
func TestThemeOcean(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeOcean)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(135,206,235);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(135,206,235);fill:rgb(135,206,235)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(90,210,160);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(90,210,160);fill:rgb(90,210,160)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(252,163,148);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(252,163,148);fill:rgb(252,163,148)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(180,140,210);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(180,140,210);fill:rgb(180,140,210)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(0,116,217);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(0,116,217);fill:rgb(0,116,217)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" y=\"368\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(0,45,72);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(135,206,235);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(90,210,160);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,210,160);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,210,160);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,210,160);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,210,160);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,210,160);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,210,160);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,210,160);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(252,163,148);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(252,163,148);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(252,163,148);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(252,163,148);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(252,163,148);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(252,163,148);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(252,163,148);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(252,163,148);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(180,140,210);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,140,210);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,140,210);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,140,210);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,140,210);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,140,210);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,140,210);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,140,210);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(0,116,217);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(0,116,217);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(0,116,217);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(0,116,217);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(0,116,217);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(0,116,217);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(0,116,217);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(0,116,217);fill:white\"/></svg>", svg)
}
func TestThemeSlate(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeSlate)
assertEqualSVG(t, "<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(51,53,60)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(240,128,128);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(240,128,128);fill:rgb(240,128,128)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(169,179,188);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(125,210,196);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(125,210,196);fill:rgb(125,210,196)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(169,179,188);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(250,240,120);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(250,240,120);fill:rgb(250,240,120)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(169,179,188);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(170,190,255);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(170,190,255);fill:rgb(170,190,255)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(169,179,188);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(190,164,240);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(190,164,240);fill:rgb(190,164,240)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(169,179,188);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" y=\"368\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(72,71,73);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(72,71,73);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(72,71,73);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(72,71,73);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(128,129,132);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(240,128,128);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,128,128);fill:rgb(51,53,60)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,128,128);fill:rgb(51,53,60)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,128,128);fill:rgb(51,53,60)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,128,128);fill:rgb(51,53,60)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,128,128);fill:rgb(51,53,60)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,128,128);fill:rgb(51,53,60)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,128,128);fill:rgb(51,53,60)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(125,210,196);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(125,210,196);fill:rgb(51,53,60)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(125,210,196);fill:rgb(51,53,60)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(125,210,196);fill:rgb(51,53,60)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(125,210,196);fill:rgb(51,53,60)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(125,210,196);fill:rgb(51,53,60)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(125,210,196);fill:rgb(51,53,60)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(125,210,196);fill:rgb(51,53,60)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(250,240,120);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,240,120);fill:rgb(51,53,60)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,240,120);fill:rgb(51,53,60)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,240,120);fill:rgb(51,53,60)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,240,120);fill:rgb(51,53,60)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,240,120);fill:rgb(51,53,60)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,240,120);fill:rgb(51,53,60)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,240,120);fill:rgb(51,53,60)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(170,190,255);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(170,190,255);fill:rgb(51,53,60)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(170,190,255);fill:rgb(51,53,60)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(170,190,255);fill:rgb(51,53,60)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(170,190,255);fill:rgb(51,53,60)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(170,190,255);fill:rgb(51,53,60)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(170,190,255);fill:rgb(51,53,60)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(170,190,255);fill:rgb(51,53,60)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(190,164,240);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,164,240);fill:rgb(51,53,60)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,164,240);fill:rgb(51,53,60)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,164,240);fill:rgb(51,53,60)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,164,240);fill:rgb(51,53,60)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,164,240);fill:rgb(51,53,60)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,164,240);fill:rgb(51,53,60)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,164,240);fill:rgb(51,53,60)\"/></svg>", svg)
}
func TestThemeGray(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeGray)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(40,40,40);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(40,40,40);fill:rgb(40,40,40)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(88,88,88);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(88,88,88);fill:rgb(88,88,88)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(128,128,128);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(128,128,128);fill:rgb(128,128,128)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(160,160,160);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(160,160,160);fill:rgb(160,160,160)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(190,190,190);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(190,190,190);fill:rgb(190,190,190)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:black;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(204,204,204);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(204,204,204);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(204,204,204);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(204,204,204);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(142,142,142);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(40,40,40);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(40,40,40);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(40,40,40);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(40,40,40);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(40,40,40);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(40,40,40);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(40,40,40);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(40,40,40);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(88,88,88);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(88,88,88);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(88,88,88);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(88,88,88);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(88,88,88);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(88,88,88);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(88,88,88);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(88,88,88);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(128,128,128);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(128,128,128);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(128,128,128);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(128,128,128);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(128,128,128);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(128,128,128);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(128,128,128);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(128,128,128);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(160,160,160);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(160,160,160);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(160,160,160);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(160,160,160);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(160,160,160);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(160,160,160);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(160,160,160);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(160,160,160);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(190,190,190);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(190,190,190);fill:white\"/></svg>", svg)
}
func TestThemeThemeWinter(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeWinter)
assertEqualSVG(t, "<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(240,255,255)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(150,190,255);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(150,190,255);fill:rgb(150,190,255)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(221,160,221);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(221,160,221);fill:rgb(221,160,221)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(110,150,240);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(110,150,240);fill:rgb(110,150,240)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(210,180,230);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(210,180,230);fill:rgb(210,180,230)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(90,130,210);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(90,130,210);fill:rgb(90,130,210)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(0,0,153);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(140,145,150);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(150,190,255);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,190,255);fill:rgb(240,255,255)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,190,255);fill:rgb(240,255,255)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,190,255);fill:rgb(240,255,255)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,190,255);fill:rgb(240,255,255)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,190,255);fill:rgb(240,255,255)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,190,255);fill:rgb(240,255,255)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,190,255);fill:rgb(240,255,255)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(221,160,221);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(221,160,221);fill:rgb(240,255,255)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(221,160,221);fill:rgb(240,255,255)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(221,160,221);fill:rgb(240,255,255)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(221,160,221);fill:rgb(240,255,255)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(221,160,221);fill:rgb(240,255,255)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(221,160,221);fill:rgb(240,255,255)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(221,160,221);fill:rgb(240,255,255)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(110,150,240);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,150,240);fill:rgb(240,255,255)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,150,240);fill:rgb(240,255,255)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,150,240);fill:rgb(240,255,255)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,150,240);fill:rgb(240,255,255)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,150,240);fill:rgb(240,255,255)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,150,240);fill:rgb(240,255,255)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(110,150,240);fill:rgb(240,255,255)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(210,180,230);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,230);fill:rgb(240,255,255)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,230);fill:rgb(240,255,255)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,230);fill:rgb(240,255,255)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,230);fill:rgb(240,255,255)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,230);fill:rgb(240,255,255)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,230);fill:rgb(240,255,255)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(210,180,230);fill:rgb(240,255,255)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(90,130,210);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,130,210);fill:rgb(240,255,255)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,130,210);fill:rgb(240,255,255)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,130,210);fill:rgb(240,255,255)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,130,210);fill:rgb(240,255,255)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,130,210);fill:rgb(240,255,255)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,130,210);fill:rgb(240,255,255)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(90,130,210);fill:rgb(240,255,255)\"/></svg>", svg)
}
func TestThemeThemeSpring(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeSpring)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(120,200,130);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(120,200,130);fill:rgb(120,200,130)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(220,210,100);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(220,210,100);fill:rgb(220,210,100)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(135,206,235);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(135,206,235);fill:rgb(135,206,235)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(150,230,180);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(150,230,180);fill:rgb(150,230,180)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(240,220,120);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(240,220,120);fill:rgb(240,220,120)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:rgb(31,87,61);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(200,210,220);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(120,130,140);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(120,200,130);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(120,200,130);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(120,200,130);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(120,200,130);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(120,200,130);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(120,200,130);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(120,200,130);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(120,200,130);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(220,210,100);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,210,100);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,210,100);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,210,100);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,210,100);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,210,100);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,210,100);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,210,100);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(135,206,235);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(135,206,235);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(150,230,180);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,230,180);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,230,180);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,230,180);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,230,180);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,230,180);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,230,180);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(150,230,180);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(240,220,120);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,220,120);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,220,120);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,220,120);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,220,120);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,220,120);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,220,120);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,220,120);fill:white\"/></svg>", svg)
}
func TestThemeThemeSummer(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeSummer)
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(250,128,114);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(250,128,114);fill:rgb(250,128,114)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(230,220,110);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(230,220,110);fill:rgb(230,220,110)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(255,165,0);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(255,165,0);fill:rgb(255,165,0)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(217,101,0);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(217,101,0);fill:rgb(217,101,0)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(250,160,140);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(250,160,140);fill:rgb(250,160,140)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:black;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" 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 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(220,210,200);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(220,210,200);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(220,210,200);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(220,210,200);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(150,140,130);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(250,128,114);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,128,114);fill:white\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,128,114);fill:white\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,128,114);fill:white\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,128,114);fill:white\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,128,114);fill:white\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,128,114);fill:white\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,128,114);fill:white\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(230,220,110);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,220,110);fill:white\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,220,110);fill:white\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,220,110);fill:white\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,220,110);fill:white\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,220,110);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,220,110);fill:white\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,220,110);fill:white\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(255,165,0);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,165,0);fill:white\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,165,0);fill:white\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,165,0);fill:white\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,165,0);fill:white\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,165,0);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,165,0);fill:white\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(255,165,0);fill:white\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(217,101,0);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(217,101,0);fill:white\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(217,101,0);fill:white\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(217,101,0);fill:white\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(217,101,0);fill:white\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(217,101,0);fill:white\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(217,101,0);fill:white\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(217,101,0);fill:white\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(250,160,140);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,160,140);fill:white\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,160,140);fill:white\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,160,140);fill:white\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,160,140);fill:white\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,160,140);fill:white\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,160,140);fill:white\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(250,160,140);fill:white\"/></svg>", svg)
}
func TestThemeThemeFall(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithThemeName(t, true, ThemeFall)
assertEqualSVG(t, "<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)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(220,190,110);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(220,190,110);fill:rgb(220,190,110)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(211,211,211);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(200,130,70);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(200,130,70);fill:rgb(200,130,70)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(211,211,211);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(180,120,60);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(180,120,60);fill:rgb(180,120,60)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(211,211,211);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(240,190,90);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(240,190,90);fill:rgb(240,190,90)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(211,211,211);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(230,140,50);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(230,140,50);fill:rgb(230,140,50)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(211,211,211);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"10\" y=\"26\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Line</text><text x=\"18\" y=\"52\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"21\" y=\"210\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"39\" y=\"368\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 54 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(160,120,80);fill:none\"/><path d=\"M 54 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(160,120,80);fill:none\"/><path d=\"M 54 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(160,120,80);fill:none\"/><path d=\"M 54 284\nL 590 284\" style=\"stroke-width:1;stroke:rgb(160,120,80);fill:none\"/><path d=\"M 58 364\nL 590 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 58 369\nL 58 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 134 369\nL 134 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 210 369\nL 210 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 286 369\nL 286 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 362 369\nL 362 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 438 369\nL 438 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 514 369\nL 514 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><path d=\"M 590 369\nL 590 364\" style=\"stroke-width:1;stroke:rgb(130,90,60);fill:none\"/><text x=\"81\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"159\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"233\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"311\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"391\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"465\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"539\" y=\"390\" style=\"stroke:none;fill:white;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 96 337\nL 172 335\nL 248 342\nL 324 334\nL 400 344\nL 476 312\nL 552 317\" style=\"stroke-width:2;stroke:rgb(220,190,110);fill:none\"/><circle cx=\"96\" cy=\"337\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,190,110);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"335\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,190,110);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"342\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,190,110);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"334\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,190,110);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"344\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,190,110);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,190,110);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"317\" r=\"2\" style=\"stroke-width:1;stroke:rgb(220,190,110);fill:rgb(40,40,40)\"/><path d=\"M 96 315\nL 172 323\nL 248 321\nL 324 311\nL 400 299\nL 476 290\nL 552 294\" style=\"stroke-width:2;stroke:rgb(200,130,70);fill:none\"/><circle cx=\"96\" cy=\"315\" r=\"2\" style=\"stroke-width:1;stroke:rgb(200,130,70);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"323\" r=\"2\" style=\"stroke-width:1;stroke:rgb(200,130,70);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(200,130,70);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"311\" r=\"2\" style=\"stroke-width:1;stroke:rgb(200,130,70);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"299\" r=\"2\" style=\"stroke-width:1;stroke:rgb(200,130,70);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(200,130,70);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"294\" r=\"2\" style=\"stroke-width:1;stroke:rgb(200,130,70);fill:rgb(40,40,40)\"/><path d=\"M 96 330\nL 172 312\nL 248 319\nL 324 330\nL 400 321\nL 476 290\nL 552 271\" style=\"stroke-width:2;stroke:rgb(180,120,60);fill:none\"/><circle cx=\"96\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,120,60);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"312\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,120,60);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"319\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,120,60);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"330\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,120,60);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"321\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,120,60);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,120,60);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"271\" r=\"2\" style=\"stroke-width:1;stroke:rgb(180,120,60);fill:rgb(40,40,40)\"/><path d=\"M 96 292\nL 172 289\nL 248 296\nL 324 289\nL 400 276\nL 476 290\nL 552 292\" style=\"stroke-width:2;stroke:rgb(240,190,90);fill:none\"/><circle cx=\"96\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,190,90);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,190,90);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"296\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,190,90);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"289\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,190,90);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"276\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,190,90);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"290\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,190,90);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"292\" r=\"2\" style=\"stroke-width:1;stroke:rgb(240,190,90);fill:rgb(40,40,40)\"/><path d=\"M 96 178\nL 172 153\nL 248 160\nL 324 152\nL 400 71\nL 476 62\nL 552 65\" style=\"stroke-width:2;stroke:rgb(230,140,50);fill:none\"/><circle cx=\"96\" cy=\"178\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,140,50);fill:rgb(40,40,40)\"/><circle cx=\"172\" cy=\"153\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,140,50);fill:rgb(40,40,40)\"/><circle cx=\"248\" cy=\"160\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,140,50);fill:rgb(40,40,40)\"/><circle cx=\"324\" cy=\"152\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,140,50);fill:rgb(40,40,40)\"/><circle cx=\"400\" cy=\"71\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,140,50);fill:rgb(40,40,40)\"/><circle cx=\"476\" cy=\"62\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,140,50);fill:rgb(40,40,40)\"/><circle cx=\"552\" cy=\"65\" r=\"2\" style=\"stroke-width:1;stroke:rgb(230,140,50);fill:rgb(40,40,40)\"/></svg>", svg)
}
func TestLightThemeSeriesRepeat(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithTheme(t, false,
&themeColorPalette{
name: t.Name(),
isDarkMode: false,
xaxisStrokeColor: Color{R: 110, G: 112, B: 121, A: 255},
yaxisStrokeColor: Color{R: 110, G: 112, B: 121, A: 255},
axisSplitLineColor: Color{R: 224, G: 230, B: 242, A: 255},
backgroundColor: ColorWhite,
legendTextColor: Color{R: 70, G: 70, B: 70, A: 255},
seriesColors: []Color{
{R: 50, G: 50, B: 50, A: 255},
{R: 200, G: 50, B: 50, A: 255},
},
})
assertEqualSVG(t, "<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 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(50,50,50);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(50,50,50);fill:rgb(50,50,50)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(200,50,50);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(200,50,50);fill:rgb(200,50,50)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(95,95,95);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(95,95,95);fill:rgb(95,95,95)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(200,90,90);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(200,90,90);fill:rgb(200,90,90)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(141,141,141);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(141,141,141);fill:rgb(141,141,141)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"19\" y=\"44\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"19\" y=\"202\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"19\" y=\"361\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 15 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 15 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 15 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 15 285\nL 590 285\" style=\"stroke-width:1;stroke:rgb(224,230,242);fill:none\"/><path d=\"M 19 365\nL 590 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 19 370\nL 19 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 100 370\nL 100 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 263 370\nL 263 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 345 370\nL 345 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 426 370\nL 426 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 508 370\nL 508 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=\"59\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"141\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"222\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"304\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"385\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"467\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"549\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 59 338\nL 141 335\nL 222 342\nL 304 335\nL 385 345\nL 467 313\nL 549 318\" style=\"stroke-width:2;stroke:rgb(50,50,50);fill:none\"/><path d=\"M 59 315\nL 141 324\nL 222 322\nL 304 312\nL 385 299\nL 467 290\nL 549 295\" style=\"stroke-width:2;stroke:rgb(200,50,50);fill:none\"/><path d=\"M 59 331\nL 141 313\nL 222 320\nL 304 330\nL 385 322\nL 467 290\nL 549 272\" style=\"stroke-width:2;stroke:rgb(95,95,95);fill:none\"/><path d=\"M 59 293\nL 141 290\nL 222 297\nL 304 289\nL 385 277\nL 467 290\nL 549 293\" style=\"stroke-width:2;stroke:rgb(200,90,90);fill:none\"/><path d=\"M 59 179\nL 141 153\nL 222 160\nL 304 153\nL 385 72\nL 467 62\nL 549 65\" style=\"stroke-width:2;stroke:rgb(141,141,141);fill:none\"/></svg>", svg)
}
func TestDarkThemeSeriesRepeat(t *testing.T) {
t.Parallel()
svg := renderTestLineChartWithTheme(t, false,
&themeColorPalette{
name: t.Name(),
isDarkMode: true,
xaxisStrokeColor: Color{R: 110, G: 112, B: 121, A: 255},
yaxisStrokeColor: Color{R: 110, G: 112, B: 121, A: 255},
axisSplitLineColor: Color{R: 40, G: 40, B: 60, A: 255},
backgroundColor: Color{R: 40, G: 40, B: 60, A: 255},
legendTextColor: Color{R: 70, G: 70, B: 70, A: 255},
seriesColors: []Color{
{R: 250, G: 250, B: 250, A: 255},
{R: 200, G: 50, B: 50, A: 255},
},
})
assertEqualSVG(t, "<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,60)\"/><path d=\"M 20 19\nL 50 19\" style=\"stroke-width:3;stroke:rgb(250,250,250);fill:none\"/><circle cx=\"35\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(250,250,250);fill:rgb(250,250,250)\"/><text x=\"52\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Email</text><path d=\"M 111 19\nL 141 19\" style=\"stroke-width:3;stroke:rgb(200,50,50);fill:none\"/><circle cx=\"126\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(200,50,50);fill:rgb(200,50,50)\"/><text x=\"143\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Union Ads</text><path d=\"M 234 19\nL 264 19\" style=\"stroke-width:3;stroke:rgb(204,204,204);fill:none\"/><circle cx=\"249\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(204,204,204);fill:rgb(204,204,204)\"/><text x=\"266\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Video Ads</text><path d=\"M 357 19\nL 387 19\" style=\"stroke-width:3;stroke:rgb(156,52,52);fill:none\"/><circle cx=\"372\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(156,52,52);fill:rgb(156,52,52)\"/><text x=\"389\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Direct</text><path d=\"M 450 19\nL 480 19\" style=\"stroke-width:3;stroke:rgb(158,158,158);fill:none\"/><circle cx=\"465\" cy=\"19\" r=\"5\" style=\"stroke-width:3;stroke:rgb(158,158,158);fill:rgb(158,158,158)\"/><text x=\"482\" y=\"25\" style=\"stroke:none;fill:rgb(70,70,70);font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Search Engine</text><text x=\"19\" y=\"44\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">1.4k</text><text x=\"19\" y=\"202\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">700</text><text x=\"19\" y=\"361\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">0</text><path d=\"M 15 46\nL 590 46\" style=\"stroke-width:1;stroke:rgb(40,40,60);fill:none\"/><path d=\"M 15 125\nL 590 125\" style=\"stroke-width:1;stroke:rgb(40,40,60);fill:none\"/><path d=\"M 15 205\nL 590 205\" style=\"stroke-width:1;stroke:rgb(40,40,60);fill:none\"/><path d=\"M 15 285\nL 590 285\" style=\"stroke-width:1;stroke:rgb(40,40,60);fill:none\"/><path d=\"M 19 365\nL 590 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 19 370\nL 19 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 100 370\nL 100 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 263 370\nL 263 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 345 370\nL 345 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 426 370\nL 426 365\" style=\"stroke-width:1;stroke:rgb(110,112,121);fill:none\"/><path d=\"M 508 370\nL 508 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=\"59\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Mon</text><text x=\"141\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Tue</text><text x=\"222\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Wed</text><text x=\"304\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Thu</text><text x=\"385\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Fri</text><text x=\"467\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sat</text><text x=\"549\" y=\"375\" style=\"stroke:none;fill:none;font-size:15.3px;font-family:'Roboto Medium',sans-serif\">Sun</text><path d=\"M 59 338\nL 141 335\nL 222 342\nL 304 335\nL 385 345\nL 467 313\nL 549 318\" style=\"stroke-width:2;stroke:rgb(250,250,250);fill:none\"/><path d=\"M 59 315\nL 141 324\nL 222 322\nL 304 312\nL 385 299\nL 467 290\nL 549 295\" style=\"stroke-width:2;stroke:rgb(200,50,50);fill:none\"/><path d=\"M 59 331\nL 141 313\nL 222 320\nL 304 330\nL 385 322\nL 467 290\nL 549 272\" style=\"stroke-width:2;stroke:rgb(204,204,204);fill:none\"/><path d=\"M 59 293\nL 141 290\nL 222 297\nL 304 289\nL 385 277\nL 467 290\nL 549 293\" style=\"stroke-width:2;stroke:rgb(156,52,52);fill:none\"/><path d=\"M 59 179\nL 141 153\nL 222 160\nL 304 153\nL 385 72\nL 467 62\nL 549 65\" style=\"stroke-width:2;stroke:rgb(158,158,158);fill:none\"/></svg>", svg)
}
func TestWithAxisColor(t *testing.T) {
t.Parallel()
whiteCP := &themeColorPalette{
name: t.Name(),
isDarkMode: false,
axisSplitLineColor: ColorWhite,
xaxisStrokeColor: ColorWhite,
yaxisStrokeColor: ColorWhite,
backgroundColor: ColorWhite,
seriesColors: []Color{ColorWhite},
}
blackCP := whiteCP.WithXAxisColor(ColorBlack).WithYAxisColor(ColorBlack)
assert.Equal(t, ColorWhite, whiteCP.xaxisStrokeColor)
assert.Equal(t, ColorWhite, whiteCP.yaxisStrokeColor)
assert.Equal(t, ColorWhite, whiteCP.backgroundColor)
assert.Equal(t, ColorWhite, whiteCP.seriesColors[0])
assert.NotEqual(t, ColorBlack, blackCP.GetAxisSplitLineColor())
assert.Equal(t, ColorBlack, blackCP.GetXAxisStrokeColor())
assert.Equal(t, ColorBlack, blackCP.GetYAxisStrokeColor())
assert.Equal(t, ColorWhite, blackCP.GetBackgroundColor())
assert.Equal(t, ColorWhite, blackCP.GetSeriesColor(0))
}
func TestWithTextColor(t *testing.T) {
t.Parallel()
whiteCP := &themeColorPalette{
name: t.Name(),
isDarkMode: false,
axisSplitLineColor: ColorWhite,
xaxisStrokeColor: ColorWhite,
yaxisStrokeColor: ColorWhite,
backgroundColor: ColorWhite,
titleTextColor: ColorWhite,
markTextColor: ColorWhite,
labelTextColor: ColorWhite,
legendTextColor: ColorWhite,
xaxisTextColor: ColorWhite,
yaxisTextColor: ColorWhite,
seriesColors: []Color{ColorWhite},
}
blackCP := whiteCP.WithTextColor(ColorBlack)
assert.Equal(t, ColorWhite, whiteCP.axisSplitLineColor)
assert.Equal(t, ColorWhite, whiteCP.xaxisStrokeColor)
assert.Equal(t, ColorWhite, whiteCP.yaxisStrokeColor)
assert.Equal(t, ColorWhite, whiteCP.backgroundColor)
assert.Equal(t, ColorWhite, whiteCP.GetTitleTextColor())
assert.Equal(t, ColorWhite, whiteCP.GetLabelTextColor())
assert.Equal(t, ColorWhite, whiteCP.GetLegendTextColor())
assert.Equal(t, ColorWhite, whiteCP.GetMarkTextColor())
assert.Equal(t, ColorWhite, whiteCP.GetXAxisTextColor())
assert.Equal(t, ColorWhite, whiteCP.GetYAxisTextColor())
assert.Equal(t, ColorWhite, whiteCP.seriesColors[0])
assert.Equal(t, ColorBlack, blackCP.GetTitleTextColor())
assert.Equal(t, ColorBlack, blackCP.GetLabelTextColor())
assert.Equal(t, ColorBlack, blackCP.GetLegendTextColor())
assert.Equal(t, ColorBlack, blackCP.GetMarkTextColor())
assert.Equal(t, ColorBlack, blackCP.GetXAxisTextColor())
assert.Equal(t, ColorBlack, blackCP.GetYAxisTextColor())
assert.Equal(t, ColorWhite, blackCP.GetAxisSplitLineColor())
assert.Equal(t, ColorWhite, blackCP.GetXAxisStrokeColor())
assert.Equal(t, ColorWhite, blackCP.GetYAxisStrokeColor())
assert.Equal(t, ColorWhite, blackCP.GetBackgroundColor())
assert.Equal(t, ColorWhite, blackCP.GetSeriesColor(0))
redCP := blackCP.WithTitleTextColor(ColorRed).WithLabelTextColor(ColorRed).
WithMarkTextColor(ColorRed).WithLegendTextColor(ColorRed).
WithXAxisTextColor(ColorRed).WithYAxisTextColor(ColorRed)
assert.Equal(t, ColorRed, redCP.GetTitleTextColor())
assert.Equal(t, ColorRed, redCP.GetLabelTextColor())
assert.Equal(t, ColorRed, redCP.GetLegendTextColor())
assert.Equal(t, ColorRed, redCP.GetMarkTextColor())
assert.Equal(t, ColorRed, redCP.GetXAxisTextColor())
assert.Equal(t, ColorRed, redCP.GetYAxisTextColor())
}
func TestWithSeriesColors(t *testing.T) {
t.Parallel()
yellowCP := &themeColorPalette{
name: t.Name(),
isDarkMode: false,
axisSplitLineColor: ColorYellow,
xaxisStrokeColor: ColorYellow,
yaxisStrokeColor: ColorYellow,
backgroundColor: ColorYellow,
seriesColors: []Color{ColorYellow},
}
t.Run("ignored", func(t *testing.T) {
invalidCP := yellowCP.WithSeriesColors([]Color{})
assert.Equal(t, yellowCP.GetSeriesColor(0), invalidCP.GetSeriesColor(0))
})
t.Run("updated", func(t *testing.T) {
blackCP := yellowCP.WithSeriesColors([]Color{ColorBlack})
assert.Equal(t, ColorYellow, blackCP.GetAxisSplitLineColor())
assert.Equal(t, ColorYellow, blackCP.GetXAxisStrokeColor())
assert.Equal(t, ColorYellow, blackCP.GetYAxisStrokeColor())
assert.Equal(t, ColorYellow, blackCP.GetBackgroundColor())
assert.Equal(t, ColorBlack, blackCP.GetSeriesColor(0))
})
}
func TestWithBackgroundColor(t *testing.T) {
t.Parallel()
whiteCP := &themeColorPalette{
name: t.Name(),
isDarkMode: false,
axisSplitLineColor: ColorWhite,
xaxisStrokeColor: ColorWhite,
yaxisStrokeColor: ColorWhite,
backgroundColor: ColorWhite,
seriesColors: []Color{ColorWhite},
}
blackCP := whiteCP.WithBackgroundColor(ColorBlack)
require.False(t, whiteCP.IsDark())
assert.True(t, blackCP.IsDark())
yellowCP := blackCP.WithBackgroundColor(ColorYellow)
require.False(t, yellowCP.IsDark())
}
func TestWithLegendBorderColor(t *testing.T) {
t.Parallel()
whiteCP := &themeColorPalette{
name: t.Name(),
isDarkMode: false,
axisSplitLineColor: ColorWhite,
xaxisStrokeColor: ColorWhite,
yaxisStrokeColor: ColorWhite,
backgroundColor: ColorWhite,
legendBorderColor: ColorWhite,
seriesColors: []Color{ColorWhite},
}
blackCP := whiteCP.WithLegendBorderColor(ColorBlack)
assert.Equal(t, ColorBlack, blackCP.GetLegendBorderColor())
assert.Equal(t, ColorWhite, whiteCP.GetLegendBorderColor())
}
func getThemeSeriesColors(name string) []Color {
if value, ok := palettes.Load(name); ok {
if cp, ok := value.(*themeColorPalette); ok {
return cp.seriesColors
}
}
return nil
}
const makeSeriesLoopColorSamples = false
func TestThemeLightSeriesLoopColors(t *testing.T) {
t.Parallel()
if !makeSeriesLoopColorSamples {
return // color samples are generated through a test failure
}
for _, theme := range allThemes {
t.Run(theme+"-loop", func(t *testing.T) {
testColorShadeVariation(t, func(c Color) Color {
return adjustSeriesColor(c, 1, false)
}, getThemeSeriesColors(theme)...)
})
t.Run(theme+"-pie", func(t *testing.T) {
svg := renderTestPieChartWithThemeName(t, theme)
assertEqualSVG(t, "", svg)
})
}
}
func renderTestPieChartWithThemeName(t *testing.T, themeName string) []byte {
t.Helper()
p := NewPainter(PainterOptions{
OutputFormat: ChartOutputSVG,
Width: 800,
Height: 600,
})
values := []float64{
64358845, 48070697, 40850717, 40059777, 36753736, 19051562, 17947406, 11754004,
10827529, 10521556, 10467366, 10394055, 9597085, 9104772, 6447710, 5932654,
5563970, 5428792, 5194336, 3850894, 2857279, 2116792, 1883008, 1373101,
920701, 660809, 542051,
}
opt := PieChartOption{
Theme: GetTheme(themeName),
Title: TitleOption{
Text: "Example " + themeName,
},
SeriesList: NewSeriesListPie(values, PieSeriesOption{
Label: SeriesLabel{
Show: Ptr(false),
},
}),
Radius: "200",
Padding: NewBoxEqual(20),
Legend: LegendOption{
Show: Ptr(false),
},
}
err := p.PieChart(opt)
require.NoError(t, err)
data, err := p.Bytes()
require.NoError(t, err)
return data
}
const makeTrendColorSamples = false
func TestThemeTrendColors(t *testing.T) {
t.Parallel()
if !makeTrendColorSamples {
return // color samples are generated through a test failure
}
for _, theme := range allThemes {
t.Run(theme, func(t *testing.T) {
testColorShadeVariation(t, autoSeriesTrendColor, getThemeSeriesColors(theme)...)
})
}
}
func testColorShadeVariation(t *testing.T, mutateFunc func(Color) Color, colors ...Color) {
t.Helper()
p := NewPainter(PainterOptions{
OutputFormat: ChartOutputSVG,
Width: 600,
Height: 400,
})
sampleWidth := p.Width() / len(colors)
for i, c := range colors {
startX := i * sampleWidth
endX := (i + 1) * sampleWidth
if i == len(colors)-1 {
endX = p.Width() // ensure edge is painted
}
p.FilledRect(startX, 0, endX, p.Height(),
c, ColorTransparent, 0.0)
margin := (endX - startX) / 4
c2 := mutateFunc(c)
p.FilledRect(startX+margin, 0, endX-margin, p.Height(),
c2, ColorTransparent, 0.0)
}
data, err := p.Bytes()
require.NoError(t, err)
assertEqualSVG(t, "", data)
}