[Feature] Confidence Band example with xAxis.type and yAxis.type equal "log"
What problem does this feature solve?
I set xAxis.type from "category" to "log" in a Confidence Band example. The chart won't show right. You can run the attachment by browser.
What does the proposed API look like?
"xAxis.type" is also needed 'log' type.
I can see you've submitted the same issue https://github.com/apache/echarts/issues/16646 before. This problem is caused by wrong stack dimension. At:https://github.com/apache/echarts/blob/d3dbf1215a0ae0c5075efffb10b17fe4de37582c/src/data/helper/dataStackHelper.ts#L104-L117 Echarts is trying to set the stack dimension and its way is to find the FIRST dimension that can be stacked! This means when x axis type is 'category', 'time', or 'ordinary' echarts can correctly find y axis as stack axis. But when x axis is also "stackable", echarts will take x axis as default axis to stack the data. That results in wrong stack in both bar chart and line chart. Here's a wrong-stacked bar example:
option = {
xAxis: {
type: 'value',
data: [1,2,3,4,5,6,7]
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
stack: '1',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
},
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
stack: '1',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
},
]
};
Changing x axis type into 'category' and things will look right.
When user use bar or line chart, they might want to stack data to x or y axis and a default stack axis is never enough. So I think the best way is to add a new option series.stackDim to allow user to specify the axis to stack.
Submitting a PR to solve this.
Any news about this fix? This is something we need in our project too.
Any status? This topic is quite blocking for us too
Same for us, this would really help.
Same here