Click here to Skip to main content
15,881,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is it possible To make extjs Column Chart Like This..
|
|
|
|
|
|
|
|
|
|
|
|____________________________________________________________
(0-10)----(11-20)----(21-30)

in X-Axis For make better result
bcoz i have so much data to represent in X-axix
that's why i need to modify like this.
is it possible? please make comment ..
Posted
Updated 30-Sep-13 2:21am
v3

1 solution

From the very sparse description of your problem, I'd say you're looking at the problem from the wrong side.

Consider the axis values that you want as simply lables (0-10, 11-20, etc.).

Now concern yourself with the data!

If you are, for example, simply counting the data, reorganize the data by recounting into what are often referred to as bins. Each bin has a range and you increment it for each value that is within the range. Now, all you need do is plot the values of the bin-counts that correspond to your labels.

Now - in order not to do all the work for you, I'll leave you the problem of how to generate the bins (and labels) dynamically, rather than hand code them.




 
Share this answer
 
Comments
7045Jeegnesh 1-Oct-13 6:59am    
means make a new store,with this bin as string
W Balboos, GHB 1-Oct-13 7:36am    
The bin's are for your counting - another array, of stings, could be made for your labels.

Consider this - if you do this correctly, you can create the number of bins = number points you wish to plot. Should your data range then change, the bin-sizes could change along with it (this is an possible if you create all dynamically).

You could be very clever about assigning bins - the index could, for example, be the result of division by 10, cast as an int. This means you don't even need a switch or other conditional. Simply do something like:

for(...)
bin[yourVal/10]++;

Rule 1: Make the computer do the work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900