In EXTJS PIE Chart i want to sort top 10 values and display in Descending order.
Currently it gets all records from store and displays. I need only top 10.
Can anyone guide me to solve this issue?
Thanks
I do not think it's' pie charts' job to show top 10 values. you should provide a process that will transofrm the original store in what you really need. A plugin that replaces the original store might be an ideea.
You can try sorting and filtering the store. I manipulated example code in ExtJS docs and figured, that data is displayed by given order. Maybe if you apply sorter to store you might get desired effect. As for filtering: find min value of top ten values and apply filter that leaves only values above it. Might work, but I haven't tried it.
Related
I'm trying to display some query results on a GridLayout but the results keep on shrinking once it is more than one. On codename one GUI Builder, I placed a container with GridLayout, 1 row and 4 columns within another container with BoxLayout Y. How can I overcome this please?
Please check the attached picture for more clarification.
Output Screenshot
Best Regards,
Yahya-Imam Munir Kolapo
You need to set the row count to match the number of actual rows you are adding which you can calculate based on the number of components / the number of rows.
You need to do this by code since the GUI builder can't know that at this stage.
In Silverlight, I know RadTreeListView.VisibleElements gets me the currently loaded elements on the screen, but for example, if I have 20 elements but only 10 are loaded, I would like to retrieve 20 instead of 10.
The problem is that I do not know how to do this. I would appreciate any help.
Thanks in advance.
Ok. I have solved the problem and the solution has been as simple as binding the counter of the list which I am using to load the control.
The problem I am having now is that I have to retrieve the amount of filtered elements in the RadTreeListView. I am searching on the documentation and on the hierarchy's classes, but I do not find anything.
I'm working on getting familiar with Sencha charts. I'd like to know if there is any way that I can extend a column outside of the view port. For example I have data for which I have the min, first quartile, third quartile, and max for and I make a stacked chart out of these. However the max contains several outliers that probably won't be relevant to the user. What I want to do is end the view after the third quartile somewhere. Is there a simple and easy way to accomplish this?
You would have to work out the algorithm to get the percentage of records that go beyond your third quartile. That shouldn't be too hard.
Then create a function that set's the chart's width to a size which is equal to:
[viewport width] * (1 + [the percentage])
You can use the chart's setWidth method for this.
You can call this function in the chart's beforerefresh event (it should fire after the chart store data is loaded but before it is rendered on the chart) and also in the viewport's resize event.
I am trying to load dataset during initialization of the JFreeChart. But every time I tried to create a dataset with higher "number of item per series", the more data (all data) displayed visible in the chart (the bigger the dataset, the smaller the graph). But actually what I wanted is to have the fixed range of dataset values displayed on the chart while the rest is still hidden. Just the same way the data would normally be displayed in the actual trading platform, let's say Metatrader (MT4). First time when I open the chart I can see the screen filled with the only visible dataset of the chart and if I left-scroll the chart I will be able to see the old/history dataset as well. Does anyone have idea how to achieve this using JFreechart?
Really appreciate for any help or any thing/articles I can refer. Thanks so much!
You can use setRange() on either the domain or range axis, as shown in this fragment. If you've already tried this, it may help to edit your question to include an sscce and/or image that exhibits any problems you encountered.
I want to add in series dynamically into my chart. For instance, I have a grid of unknown number of products. When clicked on the particular row, the sales statistics of that product is added to the chart. Therefore, there may be multiple lines on chart.
The question is, how do I define the fields of the jsonstore for the yfield of the series which I do not know beforehand?
I stumbled across the same problem.
I searched the official forum for a bit, and this seems to be the official way:
You define an new store with all the fields, and then you use the bindstore method:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.chart.Chart-method-bindStore
Don't forget to define the appropriate series (setSeries-method) and then reload to store to redraw the chart.
if you still looking for the answer, you can go to this link
Dynamically generate axis and series in Extjs 4 I answered about it