52jc opened a new issue #11253: echarts柱状图x轴显示问题
URL: https://github.com/apache/incubator-echarts/issues/11253
 
 
   ### Version
   4.3.0
   
   ### Steps to reproduce
   100条数据渲染柱状图,x轴会根据一定规律显示刻度值,有的显示,有的省略,如何让它必须显示最后一个值的x刻度
   
   ### What is expected?
   x轴的刻度值显示最后一个值的下标
   
   ### What is actually happening?
   x轴的刻度值不显示最后一个值的下标
   
   ---
   <!DOCTYPE html>
   <html>
        <head>
                <meta charset="UTF-8">
                <title></title>
                <style>
                        html,body{
                                width: 100%;
                                height: 100%;
                                margin: 0;
                                padding: 0;
                        }
                        #echarts{
                                width: 100%;
                                height: 100%;
                        }
                </style>
        </head>
        <body>
                <div id="echarts"></div>
                <script src="./echarts.min.js"></script>
                <script>
                        var myChart = 
echarts.init(document.getElementById('echarts'));
                        var xData=[];
                        var yData=[];
                        for(var i=0;i<=1000;i  ){
                                xData.push(i);
                                yData.push(i 1);
                        }
                        option = {
                            xAxis: {
                                type: 'category',
                                data: xData,
                                min: 0,
                                max: 1000,
                                axisTick: {
                                                alignWithLabel: true
                                        }
                            },
                            yAxis: {
                                type: 'value'
                            },
                            series: [{
                                data: yData,
                                type: 'bar'
                            }]
                        };
                        myChart.setOption(option);
                </script>
        </body>
   </html>
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to