You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/12/29 16:52:39 UTC

[GitHub] [incubator-echarts] wuwenyuan111 opened a new issue #11944: 横坐标轴只显示最大和最小标签值,标签溢出了。该如何解决?

wuwenyuan111 opened a new issue #11944: 横坐标轴只显示最大和最小标签值,标签溢出了。该如何解决?
URL: https://github.com/apache/incubator-echarts/issues/11944
 
 
   ### Version
   4.6.0
   
   ### Steps to reproduce
   关键配置:
   ```
   grid: {
   		// 网格容器距离上下左右侧的距离
   		top: 30,
   		right: 5,
   		bottom: 30,
   		left: 10,
   		containLabel: true,
   	},
   axisLabel: {
               interval: 400, // 坐标轴刻度标签的显示间隔。
               showMinLabel: true,
               showMaxLabel: true,
               align: 'left'
               }   
   ```
   ![avatar](https://segmentfault.com/img/bVbB6BL)
   
   ### What is expected?
   只需要显示最大和最小的标签,同时标签不溢出。
   不希望通过rotate或是换行的方式来全显,毕竟只要显示两个标签而已。
   
   ### What is actually happening?
   axisLabel.align设为left,则右边标签溢出;设为right,则左边标签溢出;设为center,则两个标签都有溢出部分。
   
   <!-- 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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Ovilia edited a comment on issue #11944: Axis label being outside of the canvas

Posted by GitBox <gi...@apache.org>.
Ovilia edited a comment on issue #11944: Axis label being outside of the canvas
URL: https://github.com/apache/incubator-echarts/issues/11944#issuecomment-593234336
 
 
   I found that there is an option [xAxis.data.textStyle.align](https://echarts.apache.org/zh/option.html#xAxis.data.textStyle.align) that can set the align of a single axis data label. So there are two options:
   
   1. For users who have such requirement, they can set the align value of the last element to be `'right'`:
   ```
       xAxis: {
           data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', {
               value: 'Satxxxxxxxxxxxxxxxxxxxxxxxy',
               textStyle: {
                   align: 'right'
               }
           }],
           axisLabel: {
               interval: 4,
               showMinLabel: true,
               showMaxLabel: true,
               align: 'left'
           }
       },
   ```
   Result:
   <img width="808" alt="屏幕快照 2020-03-02 13 58 19" src="https://user-images.githubusercontent.com/779050/75649502-3d31b280-5c8e-11ea-9b4f-75b8e8300f4b.png">
   
   
   2. We change the source code and set the last label to be `'right'` for all cases, or if the last label is larger than the given space.
   
   Apparently, setting the last label to be `'right'` for all cases is a bad solution for simple cases like:
   <img width="830" alt="屏幕快照 2020-03-02 13 52 09" src="https://user-images.githubusercontent.com/779050/75649357-d3190d80-5c8d-11ea-989b-8d9b57939360.png">
   
   
   I would suggest that we remain the logic simple and let the user decide whether they need to align the last label to right.  

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] wuwenyuan111 commented on issue #11944: Axis label being outside of the canvas

Posted by GitBox <gi...@apache.org>.
wuwenyuan111 commented on issue #11944: Axis label being outside of the canvas
URL: https://github.com/apache/incubator-echarts/issues/11944#issuecomment-593261932
 
 
   您这个方案是没法使用在大数据量上同时具有datazoom属性上的,在我对图表进行横向移动的时候,就又会出现同样的问题了(最右边的数据就不是最后一个数据了)。您的这个建议我已经尝试过了。
   希望能在V5.0见到能自动更新的。

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #11944: 横坐标轴只显示最大和最小标签值,标签溢出了。该如何解决?

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #11944: 横坐标轴只显示最大和最小标签值,标签溢出了。该如何解决?
URL: https://github.com/apache/incubator-echarts/issues/11944#issuecomment-569522588
 
 
   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Ovilia commented on issue #11944: Axis label being outside of the canvas

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #11944: Axis label being outside of the canvas
URL: https://github.com/apache/incubator-echarts/issues/11944#issuecomment-593234336
 
 
   I found that there is an option [xAxis.data.textStyle.align](https://echarts.apache.org/zh/option.html#xAxis.data.textStyle.align) that can set the align of a single axis data label. So there are two options:
   
   1. For users who have such requirement, they can set the align value of the last element to be `'right'`:
   ```
       xAxis: {
           data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', {
               value: 'Satxxxxxxxxxxxxxxxxxxxxxxxy',
               textStyle: {
                   align: 'right'
               }
           }],
           axisLabel: {
               interval: 4,
               showMinLabel: true,
               showMaxLabel: true,
               align: 'left'
           }
       },
   ```
   
   2. We change the source code and set the last label to be `'right'` for all cases, or if the last label is larger than the given space.
   
   Apparently, setting the last label to be `'right'` for all cases is a bad solution for simple cases like:
   <img width="830" alt="屏幕快照 2020-03-02 13 52 09" src="https://user-images.githubusercontent.com/779050/75649357-d3190d80-5c8d-11ea-989b-8d9b57939360.png">
   
   
   I would suggest that we remain the logic simple and let the user decide whether they need to align the last label to right.  

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Ovilia commented on issue #11944: Axis label being outside of the canvas

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #11944: Axis label being outside of the canvas
URL: https://github.com/apache/incubator-echarts/issues/11944#issuecomment-593259787
 
 
   @wuwenyuan111 Please use the above option to align the last label to right and we will see if this can be improved more automatically in v5.0.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Ovilia closed issue #11944: Axis label being outside of the canvas

Posted by GitBox <gi...@apache.org>.
Ovilia closed issue #11944: Axis label being outside of the canvas
URL: https://github.com/apache/incubator-echarts/issues/11944
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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