Closed rubenbuysse closed 10 months ago
Example: https://echarts.apache.org/examples/en/editor.html?c=bar-label-rotation
Only use year to date data, or add a filter where you can select the year you want to view data for
option = {
"animation": true,
"grid": {
"left": "3%",
"right": "4%",
"bottom": "3%",
"containLabel": true
},
"tooltip": {
"trigger": "axis",
"axisPointer": {
"type": "shadow"
}
},
"legend": {},
"toolbox": {
"feature": {
"dataZoom": {
"yAxisIndex": "none"
},
"restore": {}
}
},
"xAxis": [
{
"type": "category",
"axisTick": {
"show": false
},
"data": [
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016",
"2012",
"2013",
"2014",
"2015",
"2016"
]
}
],
"yAxis": [
{
"type": "value"
}
],
"dataZoom": [
{
"type": "inside",
"start": 90,
"end": 100,
"minSpan": 10,
"maxSpan": 10,
"brushSelect": false,
"zoomLock": true
},
{}
],
"series": [
{
"name": "Zwift Hub",
"type": "bar",
"barGap": 0,
"emphasis": {
"focus": "series"
},
"label": {
"show": true,
"position": "insideBottom",
"verticalAlign": "middle",
"align": "left",
"rotate": 90,
"formatter": "{distance|{c} km} - {a}",
"rich": {
"distance": {
"fontSize": 14
}
}
},
"data": [
320,
332,
301,
334,
390,
320,
332,
301,
334,
390,
320,
332,
301,
334,
390,
320,
332,
301,
334,
390,
320,
332,
301,
334,
390,
320,
332,
301,
334,
390,
320,
332,
301,
334,
390,
320,
332,
301,
334,
390,
320,
332,
301,
334,
390
]
},
{
"name": "Stadsfiets",
"type": "bar",
"barGap": 0,
"emphasis": {
"focus": "series"
},
"label": {
"show": true,
"position": "insideBottom",
"verticalAlign": "middle",
"align": "left",
"rotate": 90,
"formatter": "{distance|{c} km} - {a}",
"rich": {
"distance": {
"fontSize": 14
}
}
},
"data": [
220,
182,
191,
234,
290,
220,
182,
191,
234,
290,
220,
182,
191,
234,
290,
220,
182,
191,
234,
290,
220,
182,
191,
234,
290,
220,
182,
191,
234,
290,
220,
182,
191,
234,
290,
220,
182,
191,
234,
290,
220,
182,
191,
234,
290
]
},
{
"name": "MTB",
"type": "bar",
"barGap": 0,
"emphasis": {
"focus": "series"
},
"label": {
"show": true,
"position": "insideBottom",
"verticalAlign": "middle",
"align": "left",
"rotate": 90,
"formatter": "{distance|{c} km} - {a}",
"rich": {
"distance": {
"fontSize": 14
}
}
},
"data": [
150,
232,
201,
154,
190,
150,
232,
201,
154,
190,
150,
232,
201,
154,
190,
150,
232,
201,
154,
190,
150,
232,
201,
154,
190,
150,
232,
201,
154,
190,
150,
232,
201,
154,
190,
150,
232,
201,
154,
190,
150,
232,
201,
154,
190
]
},
{
"name": "Koersvelo",
"type": "bar",
"barGap": 0,
"emphasis": {
"focus": "series"
},
"data": [
98,
77,
101,
99,
40
]
}
]
};
Graphical representation of the use of the different bike gear:
e.g. bar chart:
So that you can see which bike you are using when :)