[Feature] Realtime Label of Categary Axis
What problem does this feature solve?
The category axis's label can be configured with real-time effect.
What does the proposed API look like?
const len = 10;
const randomValue = () => +(Math.random() * len + 5).toFixed(1);
const categories = Array(len)
.fill(0)
.map((e, i) => i);
const data = categories.map(() => randomValue());
option = {
title: {
text: 'Realtime Label of Categary Axis'
},
grid: { top: '15%' },
xAxis: {
/* Demand (not exist) */
// label: {
// realtime: true
// },
type: 'category',
data: categories
},
yAxis: {
max: 18,
min: 0
},
series: {
/* Existing (real-time bound with sort) */
// realtimeSort: true,
type: 'bar',
data
}
};
let count = len + 1;
setInterval(function () {
data.shift();
data.push(randomValue());
categories.shift();
categories.push(count++);
myChart.setOption({
xAxis: {
data: categories
},
series: {
data
}
});
}, 2100);
realtimeSort means to sort with the axis's value. Do you wish to sort category axis in dictionary order? Can you give an example about the user-case?
Not about sorting at all. The use case is to turn pages smoothly to display data. ECharts already has the function of turning pages, and has the ability to display labels smoothly. So why not open this ability? By the way, the above code is a simplified example.
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!