You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/11/19 06:13:22 UTC

[GitHub] leolong12 opened a new issue #9426: 当使用resize改变3D条状图的宽度时, 会产生 Z轴刻度在文字错误的问题

leolong12 opened a new issue #9426: 当使用resize改变3D条状图的宽度时, 会产生 Z轴刻度在文字错误的问题
URL: https://github.com/apache/incubator-echarts/issues/9426
 
 
   当使用resize改变3D条状图的宽度时, 会产生 Z轴刻度在文字错误的问题
   ![20181119141213](https://user-images.githubusercontent.com/13111956/48689365-2a17e200-ec05-11e8-943a-5078f449d3c3.png)
   
   
          <div onclick="event1()"> 点击 </div>
          <script type="text/javascript">
           var dom = document.getElementById("container");
           var myChart = echarts.init(dom);
           var app = {};
           option = null;
           var days = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月'];
           var data = [
             [0, 0, 555],
             [1, 0, 255],
             [2, 0, 456],
             [3, 0, 252],
             [4, 0, 123],
             [5, 0, 321],
             [6, 0, 661],
             [7, 0, 411],
           ];
           var option = {
             tooltip: {
               type: 'axis',
             },
             xAxis3D: {
               type: 'category',
               data: days,
               axisLine: {
                 lineStyle: {
                   color: '#00bcd4',
                 },
               },
               axisLabel: {
                 show: true,
                 interval: 0,
               },
               splitLine: {
                 show: false,
               },
             },
             yAxis3D: {
               type: 'category',
               axisLine: {
                 lineStyle: {
                   color: '#00bcd4',
                 },
               },
               splitLine: {
                 show: false,
               },
             },
             zAxis3D: {
               type: 'value',
               axisLine: {
                 lineStyle: {
                   color: '#00bcd4',
                 },
               },
               splitLine: {
                 show: false,
               },
             },
             grid3D: {
               boxWidth: 200,
               boxDepth: 40,
               axisPointer: {
                 show: false,
               },
               light: {
                 main: {
                   intensity: 1.2,
                 },
                 ambient: {
                   intensity: 0.3,
                 },
               },
               viewControl: {
                 alpha: 0,
                 beta: 0,
                 rotateMouseButton: 'right',
                 distance:220
               },
             },
             series: [{
               type: 'bar3D',
               name: '天数',
               stack: '总数',
               barSize: 15,
               data,
               label: {
                 show: false,
                 textStyle: {
                   fontSize: 16,
                   borderWidth: 1,
                 },
               },
           
               itemStyle: {
                 opacity: 0.9,
                 color: '#00bcd4',
               },
           
               emphasis: {
                 label: {
                   textStyle: {
                     fontSize: 20,
                     color: '#00bcd4',
                   },
                 },
               },
             }],
           };
           if (option && typeof option === "object") {
             myChart.setOption(option, true);
           }
           function event1()  {
             myChart.resize();
           }
          </script>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org