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 2022/10/25 18:00:14 UTC

[GitHub] [echarts] helgasoft opened a new issue, #17828: Add option to keep endLabel inside chart

helgasoft opened a new issue, #17828:
URL: https://github.com/apache/echarts/issues/17828

   ### What problem does this feature solve?
   
   [example code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDesCwAoWXYA8CCOEAzgFzKwAmAhmFWQNoCMANAEzMDMzALMwKzMAbMwDsAXVgBfZhmywAngWJkkYeSACmZAOQA3KgBsArhu1SZmbEQ0AnCBtKx6suchevY0KgFstsbQYwAOawYBo4YMywrAAMsADGABZUNkTaFh5Yapo6BhDQplHurtS0DIyMMVGMHOywlSz1HLywAJxV0RwdrJViGZka0BQAMlQARhoGKrBEicAA7iRgNiZRAGbANt40YTY6SFSSZpLFWNKnbpYeXr65wbah4ZGhicSwbxx8Cck2VPG7aX6HmyfgC-UKCTyIDIa0M1iBJRodCcPW6tSisRYrGaGPaGO4aJifQuWEGI3GkxUswWSxWGnWm22YF2-0O2hJ2AA9JzmDZgLQwmRuAJYMA1mtrGAGABaGpcbhiDknK7YSRoFWK9CSIA)
   If too long, _series-line.endLabel_ overflows outside the chart.
    One remedy is to use _offset_ and/or _rotate_, but his is not always a good option. Sometimes users want to see a normal straight text at the end of  the chart.
   
   ### What does the proposed API look like?
   
   Could it be possible to have an additional option **endLabel.confine** ?
   There are already similar _tooltip.confine_ and  _grid.containLabel_


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] Add option to keep endLabel inside chart [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17828:
URL: https://github.com/apache/echarts/issues/17828#issuecomment-2453576552

   This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] plainheart commented on issue #17828: Add option to keep endLabel inside chart

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #17828:
URL: https://github.com/apache/echarts/issues/17828#issuecomment-1291407945

   It sounds good but you can do it via [`labelLayout`](https://echarts.apache.org/option.html#series-line.labelLayout) for now. Here is an [example](https://echarts.apache.org/examples/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDesCwAoWXYA8CCOEAzgFzKwAmAhmFWQNoCMANAEzMDMzALMwKzMAbMwDsAXVgBfZhmywAngWJkkYeSACmZAOQA3KgBsArhu1SZmbEQ0AnCBtKx6suchevY0KgFstsbQYwAOawYBo4YMywrAAMsADGABZUNkTaFh5Yapo6BhDQplHurtS0DIyMMVGMHOywlSz1HLywAJxV0RwdrJViGZka0BQAMlQARhoGKrBEicAA7iRgNiZRAGbANt40YTY6SFSSZpLFWNKnbpYeXr65wbah4ZGhicSwbxx8Cck2VPG7aX6HmyfgC-UKCTyIDIa0M1iBJRodCcPW6tSisRYrGaGPaGO4aJifQuWEGI3GkxUswWSxWGnWm22YF2-0O2hJ2AA9JzmDZgLQwmRuAJYMA1mtrGAGABaGpcbhiDknK7YSRoFWK9CSIA) for your reference.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] helgasoft commented on issue #17828: Add option to keep endLabel inside chart

Posted by GitBox <gi...@apache.org>.
helgasoft commented on issue #17828:
URL: https://github.com/apache/echarts/issues/17828#issuecomment-1294450628

   [grid.containLabel](https://echarts.apache.org/en/option.html#grid.containLabel) is to control _"Whether the grid region contains axis tick label of axis"_.
   I know it's a long shot, but maybe someone will look into implementing the <ins>same feature</ins> for **endLabel**.
   There is similarity - [yAxis.axisLabel](https://echarts.apache.org/en/option.html#yAxis.axisLabel) usually overflow to the left, while [series-line.endLabel](https://echarts.apache.org/en/option.html#series-line.endLabel) - overflow to the 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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] plainheart commented on issue #17828: Add option to keep endLabel inside chart

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #17828:
URL: https://github.com/apache/echarts/issues/17828#issuecomment-1291470572

   > but it seems labelLayout duplicates the effect of endLabel: { offset: [-133,10] } in moving the label inward.
   
   When using `offset: [-133, 10]`, you will have to know the width of the text. But if you use `labelLayout`, you can get the real width, height, and position of the text from the callback parameters, which allows you to customize the label layout and is suitable for many cases.
   
   > The idea is to somehow shrink the graphical part of the chart to accommodate long labels on the right side.
   
   If so, I think if a text is very long the chart will be unreadable due to the limited area for showing the text completely. And it sounds like what the `grid` component does.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] helgasoft commented on issue #17828: Add option to keep endLabel inside chart

Posted by GitBox <gi...@apache.org>.
helgasoft commented on issue #17828:
URL: https://github.com/apache/echarts/issues/17828#issuecomment-1291446004

   @plainheart, thank you for the quick reply.  
   Interesting code, but it seems _labelLayout_ duplicates the effect of _endLabel: { offset: [-133,10] }_ in moving the label inward.
   The idea is to somehow _shrink_ the graphical part of the chart to accommodate long labels on the right side.
   I don't know if this is feasible, maybe too much to ask for...


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] Add option to keep endLabel inside chart [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17828:
URL: https://github.com/apache/echarts/issues/17828#issuecomment-2440174497

   This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] Add option to keep endLabel inside chart [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #17828: Add option to keep endLabel inside chart
URL: https://github.com/apache/echarts/issues/17828


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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