I am having trouble with some advanced configuration of an ECharts themeRiver chart.
You can see my implementation here, and a codepen is attached below.
Here are my questions:
Thanks you!
echarts option object(codepen here. The Data objects are abbreviated here but available in codepen):
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
lineStyle: {
color: 'rgba(0,0,0,0.2)',
width: 5,
type: 'solid'
}
}
},
legend: {
data: [...]
},
singleAxis: {
min: 1606,
max: 2011,
top: 50,
bottom: 50,
axisTick: {interval: 50},
axisLabel: {
formatter: function (value) {
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "");
}
},
type: 'value',
axisPointer: {
animation: true,
label: {
show: true
}
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
opacity: 0.2
}
}
},
series: [
{
type: 'themeRiver',
emphasis: {
itemStyle: {
shadowBlur: 20,
shadowColor: 'rgba(0, 0, 0, 0.8)'
}
},
data: [...]
}
]
};
series: [
{
label: {show: false}
}
]
singleAxis: {
maxInterval: 50,
}
tooltip: {
formatter: function(values) {
const year = parseInt(values[0].data[0]);
return year.toFixed() + "\n" + values.map(value => value.data[1] + " " + value.data[2]).join("\n");
}
}
myChart.setOption({
aria: {
enabled: true,
decal: {show: true}
}
})
Here is the adjusted Demo.