Skip to content

Commit 8e559a8

Browse files
committed
fix tutorial and showcases
1 parent 545321f commit 8e559a8

File tree

4 files changed

+35
-20
lines changed

4 files changed

+35
-20
lines changed

docs/showcases/musicformats/musicformats.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Year,Format,Revenue
3737
1982,Tapes,97
3838
1982,Cassette,3713
3939
1982,Vinyl,5922
40+
1982,CD,0
41+
1983,Tapes,0
4042
1983,CD,45
4143
1983,Cassette,4706
4244
1983,Vinyl,5089
@@ -55,6 +57,7 @@ Year,Format,Revenue
5557
1988,Vinyl,1559
5658
1988,CD,4594
5759
1988,Cassette,7531
60+
1988,DVD,0
5861
1989,DVD,241
5962
1989,Vinyl,703
6063
1989,CD,5401
@@ -115,6 +118,9 @@ Year,Format,Revenue
115118
2003,Cassette,152
116119
2003,DVD,574
117120
2003,CD,15888
121+
2003,Streaming,0
122+
2003,Download,0
123+
2004,Other,0
118124
2004,Streaming,10
119125
2004,Cassette,33
120126
2004,Vinyl,54
@@ -149,6 +155,7 @@ Year,Format,Revenue
149155
2008,Other,1178
150156
2008,Download,2054
151157
2008,CD,6585
158+
2009,Cassette,0
152159
2009,Vinyl,80
153160
2009,DVD,255
154161
2009,Streaming,436

docs/tutorial/shorthands_store.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ Promise.all([dataLoaded, mdChartLoaded]).then((results) => {
4444
return chart.animate({
4545
config: {
4646
channels: {
47-
y: { detach: 'Kinds' },
48-
x: { attach: 'Kinds' }
47+
x: { attach: 'Kinds' },
48+
y: { detach: 'Kinds' }
4949
},
5050
align: 'none'
5151
}
@@ -106,7 +106,7 @@ Promise.all([dataLoaded, mdChartLoaded]).then((results) => {
106106
return chart.animate({
107107
style: {
108108
'plot.xAxis.label.fontSize': '150%',
109-
'title.backgroundColor': '#A0A0A0'
109+
'plot.backgroundColor': '#A0A0A0'
110110
}
111111
})
112112
}
@@ -122,11 +122,11 @@ Promise.all([dataLoaded, mdChartLoaded]).then((results) => {
122122
title: 'Store function',
123123
align: 'stretch',
124124
channels: {
125-
y: { set: ['Popularity', 'Kinds'] },
126-
x: { set: ['Genres'] },
127-
label: { attach: ['Popularity'] }
125+
y: ['Popularity', 'Kinds'],
126+
x: ['Genres'],
127+
label: ['Popularity']
128128
},
129-
color: { set: ['Kinds'] }
129+
color: ['Kinds']
130130
}
131131
},
132132
0
@@ -165,11 +165,11 @@ Promise.all([dataLoaded, mdChartLoaded]).then((results) => {
165165
title: 'Store function',
166166
align: 'stretch',
167167
channels: {
168-
y: { set: ['Popularity', 'Kinds'] },
169-
x: { set: ['Genres'] },
170-
label: { attach: ['Popularity'] }
168+
y: ['Popularity', 'Kinds'],
169+
x: ['Genres'],
170+
label: ['Popularity']
171171
},
172-
color: { set: ['Kinds'] }
172+
color: ['Kinds']
173173
}
174174
})
175175
}

docs/tutorial/shorthands_store.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ chart.animate(
104104
{
105105
# "plot": { "xAxis": { "label": { "fontSize": "150%" } } },
106106
"plot.xAxis.label.fontSize": "150%",
107-
"title.backgroundColor": "#A0A0A0",
107+
"plot.backgroundColor": "#A0A0A0",
108108
}
109109
)
110110
)

docs/tutorial/stacking_explanation.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
const mdChartLoaded = import('../assets/javascripts/mdchart.js')
2-
const animOptions = {
3-
duration: 2,
4-
delay: 3
5-
}
62

73
Promise.all([mdChartLoaded]).then((results) => {
84
const MdChart = results[0].default
@@ -48,7 +44,10 @@ Promise.all([mdChartLoaded]).then((results) => {
4844
legend: null
4945
}
5046
},
51-
{ ...animOptions, delay: 0 }
47+
{
48+
duration: 2,
49+
delay: 0
50+
}
5251
),
5352
(chart) =>
5453
chart.animate(
@@ -78,7 +77,10 @@ Promise.all([mdChartLoaded]).then((results) => {
7877
}
7978
}
8079
},
81-
animOptions
80+
{
81+
duration: 2,
82+
delay: 3
83+
}
8284
),
8385
(chart) =>
8486
chart.animate(
@@ -108,7 +110,10 @@ Promise.all([mdChartLoaded]).then((results) => {
108110
}
109111
}
110112
},
111-
animOptions
113+
{
114+
duration: 2,
115+
delay: 3
116+
}
112117
),
113118
(chart) =>
114119
chart.animate(
@@ -139,7 +144,10 @@ Promise.all([mdChartLoaded]).then((results) => {
139144
legend: null
140145
}
141146
},
142-
animOptions
147+
{
148+
duration: 2,
149+
delay: 3
150+
}
143151
)
144152
]
145153
}

0 commit comments

Comments
 (0)