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/09/04 08:28:42 UTC

[GitHub] [incubator-echarts] zevero opened a new issue #11166: Bar Graph: Hide/Show Labels automatically if enough space when zooming

zevero opened a new issue #11166: Bar Graph: Hide/Show Labels automatically if enough space when zooming
URL: https://github.com/apache/incubator-echarts/issues/11166
 
 
   ### What problem does this feature solve?
   I have a bar graph (screenshots below) with few big entries an many small entries. It is not possible to display a label for every entry. There would be too many labels overlapping.
   My current solution is to use label: formatter: p => p.value[1] > minLabelValue ? p.value[1] : '' in order to hide labels for values smaller than my defined minLabelValue.
   However, when zooming in, those entries will of course not get displayed.
   
   Users should only see relevant labels (without beeing distracted from man overlapping tiny ones). But when zooming in, these labels (as there is enough room) should appear.
   
   ### What does the proposed API look like?
   an option like:
   barMinHeightLabel: 10
   could only show the label if there is enough room (at least 10 pixel) for it.
   or even better
   label: {
     hideIfNotEnoughSpace: true
   }
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->
   ![LabelZoom1](https://user-images.githubusercontent.com/2234140/64238302-7adf9980-cefe-11e9-9f7b-47e6dfb7fad5.PNG)
   When not zoomed, it looks like intended.
   ![LabelZoom2](https://user-images.githubusercontent.com/2234140/64238303-7adf9980-cefe-11e9-81ae-47a650cd2208.PNG)
   But on zoom, label values should appear as they fit into the graph.
   

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