Skip to content

Commit 897cdbd

Browse files
authored
Merge pull request #118 from simzer/main
preset fix for doc gen
2 parents 231dc2c + 09d46d5 commit 897cdbd

File tree

5 files changed

+133
-159
lines changed

5 files changed

+133
-159
lines changed

test/integration/test_cases/test_cases.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -838,22 +838,22 @@
838838
},
839839
"web_content/preset/32_C_A_stream": {
840840
"refs": [
841-
"245c5e6"
841+
"0cf1c53"
842842
]
843843
},
844844
"web_content/preset/33_C_A_vertical_stream": {
845845
"refs": [
846-
"c290013"
846+
"6df82ea"
847847
]
848848
},
849849
"web_content/preset/34_C_A_violin": {
850850
"refs": [
851-
"a15441c"
851+
"dec603d"
852852
]
853853
},
854854
"web_content/preset/35_C_A_vertical_violin": {
855855
"refs": [
856-
"5d03a03"
856+
"53f9d84"
857857
]
858858
},
859859
"web_content/preset/38_C_L_line": {
Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,43 @@
11
import { data } from '../../../test_data/music_industry_history_1.mjs';
22

33
const testSteps = [
4-
chart => {
5-
chart.on('plot-axis-label-draw', event => {
6-
let year = parseFloat(event.data.text);
7-
if (!isNaN(year) && year % 5 != 0)
8-
event.preventDefault();
9-
});
10-
return chart.animate(
11-
{
12-
data: Object.assign(data, {
13-
filter: record =>
14-
record.Format == 'DVD' ||
15-
record.Format == 'Other' ||
16-
record.Format == 'Tapes' ||
17-
record.Format == 'Download' ||
18-
record.Format == 'Streaming' ||
19-
record.Format == 'Cassette' ||
20-
record.Format == 'Vinyl' ||
21-
record.Format == 'CD'
22-
}),
23-
config: chart.constructor.presets.stream({
24-
x: 'Year',
25-
y: 'Revenue [m$]',
26-
stackedBy: 'Format',
27-
title: 'Stream Graph'
28-
}),
29-
style: {
30-
plot: {
31-
paddingLeft: '1.2em',
32-
yAxis: {
33-
label: {
34-
paddingRight: '0.8em'
35-
},
36-
interlacing: { color: '#ffffff00' }
4+
chart => chart.animate(
5+
{
6+
data: Object.assign(data, {
7+
filter: record =>
8+
record.Format == 'DVD' ||
9+
record.Format == 'Other' ||
10+
record.Format == 'Tapes' ||
11+
record.Format == 'Download' ||
12+
record.Format == 'Streaming' ||
13+
record.Format == 'Cassette' ||
14+
record.Format == 'Vinyl' ||
15+
record.Format == 'CD'
16+
}),
17+
config: chart.constructor.presets.stream({
18+
x: 'Year',
19+
y: 'Revenue [m$]',
20+
stackedBy: 'Format',
21+
title: 'Stream Graph'
22+
}),
23+
style: {
24+
plot: {
25+
paddingLeft: '1.2em',
26+
yAxis: {
27+
label: {
28+
paddingRight: '0.8em'
3729
},
38-
xAxis: {
39-
label: {
40-
paddingTop: '0.8em'
41-
}
30+
interlacing: { color: '#ffffff00' }
31+
},
32+
xAxis: {
33+
label: {
34+
paddingTop: '0.8em',
35+
angle: '-45deg'
4236
}
4337
}
4438
}
45-
});
46-
}
39+
}
40+
})
4741
];
4842

4943
export default testSteps;
Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,41 @@
11
import { data } from '../../../test_data/music_industry_history_1.mjs';
22

33
const testSteps = [
4-
chart => {
5-
chart.on('plot-axis-label-draw', event => {
6-
let year = parseFloat(event.data.text);
7-
if (!isNaN(year) && year % 5 != 0)
8-
event.preventDefault();
9-
});
10-
return chart.animate(
11-
{
12-
data: Object.assign(data, {
13-
filter: record =>
14-
record.Format == 'DVD' ||
15-
record.Format == 'Other' ||
16-
record.Format == 'Tapes' ||
17-
record.Format == 'Download' ||
18-
record.Format == 'Streaming' ||
19-
record.Format == 'Cassette' ||
20-
record.Format == 'Vinyl' ||
21-
record.Format == 'CD'
22-
}),
23-
config: chart.constructor.presets.verticalStream({
24-
x: 'Revenue [m$]',
25-
y: 'Year',
26-
stackedBy: 'Format',
27-
title: 'Vertical Stream Graph'
28-
}),
29-
style: {
30-
plot: {
31-
paddingLeft: '1.2em',
32-
yAxis: {
33-
label: {
34-
paddingRight: '0.8em'
35-
}
36-
},
37-
xAxis: {
38-
title: { paddingTop: '2.4em' },
39-
label: { paddingTop: '0.8em' },
40-
interlacing: { color: '#ffffff00' }
4+
chart => chart.animate(
5+
{
6+
data: Object.assign(data, {
7+
filter: record =>
8+
record.Format == 'DVD' ||
9+
record.Format == 'Other' ||
10+
record.Format == 'Tapes' ||
11+
record.Format == 'Download' ||
12+
record.Format == 'Streaming' ||
13+
record.Format == 'Cassette' ||
14+
record.Format == 'Vinyl' ||
15+
record.Format == 'CD'
16+
}),
17+
config: chart.constructor.presets.verticalStream({
18+
x: 'Revenue [m$]',
19+
y: 'Year',
20+
stackedBy: 'Format',
21+
title: 'Vertical Stream Graph'
22+
}),
23+
style: {
24+
plot: {
25+
paddingLeft: '1.2em',
26+
yAxis: {
27+
label: {
28+
paddingRight: '0.8em'
4129
}
30+
},
31+
xAxis: {
32+
title: { paddingTop: '2.4em' },
33+
label: { paddingTop: '0.8em' },
34+
interlacing: { color: '#ffffff00' }
4235
}
4336
}
44-
});
45-
}
37+
}
38+
})
4639
];
4740

4841
export default testSteps;
Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,43 @@
11
import { data } from '../../../test_data/music_industry_history_1.mjs';
22

33
const testSteps = [
4-
chart => {
5-
chart.on('plot-axis-label-draw', event => {
6-
let year = parseFloat(event.data.text);
7-
if (!isNaN(year) && year % 5 != 0)
8-
event.preventDefault();
9-
});
10-
return chart.animate(
11-
{
12-
data: Object.assign(data, {
13-
filter: record =>
14-
record.Format == 'DVD' ||
15-
record.Format == 'Other' ||
16-
record.Format == 'Tapes' ||
17-
record.Format == 'Download' ||
18-
record.Format == 'Streaming' ||
19-
record.Format == 'Cassette' ||
20-
record.Format == 'Vinyl' ||
21-
record.Format == 'CD'
22-
}),
23-
config: chart.constructor.presets.violin({
24-
x: 'Year',
25-
y: 'Revenue [m$]',
26-
splittedBy: 'Format',
27-
title: 'Violin Graph'
28-
}),
29-
style: {
30-
plot: {
31-
paddingLeft: '1.2em',
32-
yAxis: {
33-
label: {
34-
paddingRight: '0.8em'
35-
},
36-
interlacing: { color: '#ffffff00' }
4+
chart => chart.animate(
5+
{
6+
data: Object.assign(data, {
7+
filter: record =>
8+
record.Format == 'DVD' ||
9+
record.Format == 'Other' ||
10+
record.Format == 'Tapes' ||
11+
record.Format == 'Download' ||
12+
record.Format == 'Streaming' ||
13+
record.Format == 'Cassette' ||
14+
record.Format == 'Vinyl' ||
15+
record.Format == 'CD'
16+
}),
17+
config: chart.constructor.presets.violin({
18+
x: 'Year',
19+
y: 'Revenue [m$]',
20+
splittedBy: 'Format',
21+
title: 'Violin Graph'
22+
}),
23+
style: {
24+
plot: {
25+
paddingLeft: '1.2em',
26+
yAxis: {
27+
label: {
28+
paddingRight: '0.8em'
3729
},
38-
xAxis: {
39-
label: {
40-
paddingTop: '0.8em'
41-
}
30+
interlacing: { color: '#ffffff00' }
31+
},
32+
xAxis: {
33+
label: {
34+
paddingTop: '0.8em',
35+
angle: '-45deg'
4236
}
4337
}
4438
}
45-
});
46-
}
39+
}
40+
})
4741
];
4842

4943
export default testSteps;
Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,39 @@
11
import { data } from '../../../test_data/music_industry_history_1.mjs';
22

33
const testSteps = [
4-
chart => {
5-
chart.on('plot-axis-label-draw', event => {
6-
let year = parseFloat(event.data.text);
7-
if (!isNaN(year) && year % 5 != 0)
8-
event.preventDefault();
9-
});
10-
return chart.animate(
11-
{
12-
data: Object.assign(data, {
13-
filter: record =>
14-
record.Format == 'DVD' ||
15-
record.Format == 'Other' ||
16-
record.Format == 'Tapes' ||
17-
record.Format == 'Download' ||
18-
record.Format == 'Streaming' ||
19-
record.Format == 'Cassette' ||
20-
record.Format == 'Vinyl' ||
21-
record.Format == 'CD'
22-
}),
23-
config: chart.constructor.presets.verticalViolin({
24-
x: 'Revenue [m$]',
25-
y: 'Year',
26-
splittedBy: 'Format',
27-
title: 'Vertical Violin Graph'
28-
}),
29-
style: {
30-
plot: {
31-
paddingLeft: '1.2em',
32-
yAxis: {
33-
label: { paddingRight: '0.8em' }
34-
},
35-
xAxis: {
36-
title: { paddingTop: '2.4em' },
37-
label: { paddingTop: '0.8em' },
38-
interlacing: { color: '#ffffff00' }
39-
}
4+
chart => chart.animate(
5+
{
6+
data: Object.assign(data, {
7+
filter: record =>
8+
record.Format == 'DVD' ||
9+
record.Format == 'Other' ||
10+
record.Format == 'Tapes' ||
11+
record.Format == 'Download' ||
12+
record.Format == 'Streaming' ||
13+
record.Format == 'Cassette' ||
14+
record.Format == 'Vinyl' ||
15+
record.Format == 'CD'
16+
}),
17+
config: chart.constructor.presets.verticalViolin({
18+
x: 'Revenue [m$]',
19+
y: 'Year',
20+
splittedBy: 'Format',
21+
title: 'Vertical Violin Graph'
22+
}),
23+
style: {
24+
plot: {
25+
paddingLeft: '1.2em',
26+
yAxis: {
27+
label: { paddingRight: '0.8em' }
28+
},
29+
xAxis: {
30+
title: { paddingTop: '2.4em' },
31+
label: { paddingTop: '0.8em' },
32+
interlacing: { color: '#ffffff00' }
4033
}
4134
}
42-
});
43-
}
35+
}
36+
})
4437
];
4538

4639
export default testSteps;

0 commit comments

Comments
 (0)