ramido / choosel

Automatically exported from code.google.com/p/choosel
0 stars 0 forks source link

Long label texts in Bar chart will cause overlap #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Insert some data into the bar chart that have long descriptions

What is the expected output? What do you see instead?
It should cut off the description labels along the bottom at some length and 
show an ellipsis instead of the rest of the description. However, the chart 
prints the whole label even if there is overlap with adjacent labels.

Original issue reported on code.google.com by bblashko@gmail.com on 23 Aug 2010 at 8:12

GoogleCodeExporter commented 9 years ago
This problem occurs on vertical bar charts as well: "when I show a BarChart, 
and one of the values of the Y-axis is a bit long, e.g. republic of China, some 
portions of the word 'republic' would not fit into the window. Where can I set 
these margins? Is this the 
org.thechiselgroup.choosel.client.views.chart.BarChartViewContentDisplay > 
HORIZONTAL_BAR_LABEL_EXTRA_MARGIN = 20? I am not sure. "

Original comment by Lars.Grammel on 14 Jan 2011 at 9:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The margin should be calculated dynamically. The 
HORIZONTAL_BAR_LABEL_EXTRA_MARGIN is used for statically setting the margin 
right now. I will introduce a min margin and a max margin. For values that are 
longer than max margin, I will cut them off and introduce '...' - the full 
label will be accessible in a tooltip. Min and max margin will be configurable 
via method calls.

Original comment by Lars.Grammel on 14 Jan 2011 at 9:23

GoogleCodeExporter commented 9 years ago

Original comment by Lars.Grammel on 14 Feb 2011 at 10:21

GoogleCodeExporter commented 9 years ago
The current implementation sets the label area dynamically. It does not cut of 
long label texts, but this seems to be good enough for now.

Original comment by Lars.Grammel on 15 Feb 2011 at 12:28