View Full Version : A lot of values on the X axis

Evgeny Fisher
15 Dec 2009, 8:30 AM
When a certain com.extjs.gxt.charts.client.Chart instance is updated dynamically by adding new points to it continuously, each time a new point is added, the values on the X axis are not removed, until eventually they become clogged and form an ugly black line. Is there a way to overcome this problem?

Thank you,

19 Jan 2010, 6:29 PM
Did you make any progress on this? I have similar problem, when there are too many data points, the x axis gets very clustered with the labels, to a point where it's just pitch black. I found a way to overwrite the labels on x axis, however the same function also seem to control the tool tip, so if I return empty string for the label for certain data point, then that data point's tool tip also becomes empty. I also need to truncate the string in the label, when it's way too long to display, but it would also be truncated in the tool tip.

Evgeny Fisher
21 Jan 2010, 7:37 AM
No, any progress, I left it...

2 Mar 2010, 7:53 AM
Can you please post a fully working testcase that demonstrates what you are describing?

29 Jul 2010, 6:53 PM
sven: The problem Evgeny mentioned can easily be reproduced by using your live examples.
Go to http://www.sencha.com/examples/explorer.html#advancedcharts and make the month labels longer by editing them directly in the grid control. E.g append "xxxxxxxxxxxxx" to each month label

Evgeny: As a temporary workaround, try rotating the labels. E.g.

ChartModel cm = new ChartModel(...);
XAxis xAxis = new XAxis();
xAxis.getLabels().setRotation( Rotation.DIAGONAL );
cm.setXAxis( xAxis );

I've had to resort to rotating the labels myself, though I'm now experiencing the problems mentioned in (http://www.sencha.com/forum/showthread.php?86847-Chart-Legend-Text-getting-cut-off&highlight=Chart+Axis and http://www.sencha.com/forum/showthread.php?101174-2.1.x-Chart-YAxis-Labels-are-truncated-cut-off-for-numbers-gt-1000000&p=475060)

It's a shame OFC doesn't (appear to) have some smarts in it to know when to rotate, or resize the labels dynamically. Or am I missing something sven?


29 Jul 2010, 7:57 PM