8 Mar 2013 5:04 AM #1
Gxt Chart legend with many items.
In GXT, when a chart with a lot of items is generated, and the legend on the right is bigger than chart's size, it doesn't appear, only when you maximize the chart.
Is there some feature or workaround? Scroll? Paged legends(like gwt-vizualization from Google)?
20 May 2013 10:39 PM #2
I am facing the same Problem.
Please let me know the solution ASAP....
Attached is the screenshot
23 May 2013 3:28 PM #3
Thanks for the report! I have opened a bug in our bug tracker.
In the mean time, not sure if this fits the design, but at the moment the legend may fit better on the right or left side.
// http://www.sencha.com/examples/ final Legend<Data> legend = new Legend<Data>(); legend.setPosition(Position.BOTTOM); legend.setItemHighlighting(true); legend.setItemHiding(true); chart.setLegend(legend);
19 Jun 2013 4:37 PM #4
We have looked at this issue further. Given the wide variety of label sizes, color and layout conditions exist in legend chart design make it problematic to designing a legend that fits every use case. The workable solution is to design a legend widget that could fit any size of label, color and positioning for the developer. Our goal was to provide basic legend functionality in the charts for the common use cases and since a custom legend widget could be built to fit any legend condition by the developer, we are going to close this issue.
That said, using other GXT widgets, you can create functionality like what you are describing, and have it be as flexible as you want. For example, Colin provides some examples of how to go about building a standalone widget in this thread and may be useful for more information. http://www.sencha.com/forum/showthread.php?250682
The workaround would be to use something like ListView which could be used to provide the legend infrastructure and the ListView selection model which could be used for event observation. I would also check out the the dashboard http://www.sencha.com/examples/#ExamplePlace:dashboard because it provides a good example of how to link up charts to other widgets and help give some direction to external widget linking. Another thought is using the draw library could provide another nifty way to create a widget as well.
At the moment I'm going to close the issue. If you have some more questions on customized legend widget hit the reply.
4 Nov 2013 9:57 PM #5
Over a year ago I posted this issue to the ExtJS Bugs forum.
5 Nov 2013 6:38 AM #6
Thanks for the suggestion. I've updated the issue.
30 Jan 2014 11:38 AM #7
what about it?
I want to legend "penc" with blue color?
1-31-2014 2-30-31 AM.png
30 Jan 2014 3:35 PM #8
The last post doesn't look like it pertains to the bug. Could you post those questions to the general discussion or related. Good place to start is with the examples here > http://www.sencha.com/examples/#ExamplePlace:areachart
18 Nov 2015 7:31 AM #9
I'm having almost the same issue in GXT 3.1.4.
As you can see in the image below, the legend has more elements (2 elements are not shown) and there are cases in my application where there are twice as many elements in the chart.
A simple scroll on the legend would be ideal, but I cannot find any way to implement that.
does not fit.PNG
19 Nov 2015 6:19 AM #10
Why does this ticket have this state?
Looks like we can't reproduce the issue or there's a problem in the test case provided.