apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.58k stars 19.62k forks source link

柱状图X轴显示两级类目实现原理(上次你们回答的答案有bug,) #9819

Closed heianqishizhisuiyuan closed 5 years ago

heianqishizhisuiyuan commented 5 years ago

General Questions

In this issue, I have provided information with: 在这个 issue 中我提供了以下信息:

Issue Type

Issue Details

柱状图X轴显示两级类目

Expected Behavior

image

Current Behavior

image

Online Example

https://gallery.echartsjs.com/editor.html?c=xQNLk5u-67&v=5

   axisTick: {
          show:true,
          length: 110,
          alignWithLabel: false,
          interval: function(param,value){
            if(value ==undefined){
              return true
            }
            return param%4 ===0;
          },
        },

Topics

Anything Else We Need to Know

1.我想实现 柱状图X轴显示两级类目,想利用了两个x轴实现,但是发现第二个类目没法居中(兼容dataZoom放大缩小,兼容dataZoom放大缩小,兼容dataZoom放大缩小,重要的事情说三遍。) 之前我发过一个提问,但是你的回答说做了一个例子 https://gallery.echartsjs.com/editor.html?c=xR9ug3y7FY&v=2。但是有个bug,当触发dataZoom的时候 会发现第二类目的范围会出现偏差。

Environment

100pah commented 5 years ago

https://gallery.echartsjs.com/editor.html?c=xR9ug3y7FY&v=3

heianqishizhisuiyuan commented 5 years ago

https://gallery.echartsjs.com/editor.html?c=xR9ug3y7FY&v=3

Thank you for your answer, It solved my problem. ^^.