|
Hi Ghostme,
A slight problem that i can see with the code is that both hidXCategories1 and hidValues1need to be arrays whereas you have used strings for both. Changing them to arrays should fix your problem.
Let us know if you still face problems.
Regards,
Rahul
Side Note:
I personally prefer to use point objects to achieve this, instead of populating the X-Axis as you have done.
Instead of trying to assign values to Serie.data as "data =
new object[]{hidValues1}", try using the PointCollection class to get a collection of Point objects (where you can set the X and Y values for each Point) that can then be used to set data for the Serie object. This is
especially useful for a situation where you have multiple series in one chart, and all of them have different update frequencies (ie. most cases where I've used this library)
Alternately, you can also take all your datapoints in an numeric array and then set Serie.data with that array.
The advantage of using a simple numeric array is that it will be lighter in terms of the server load and faster to render on the client browser. Both of these are more visible when you are trying to populate a graph with 50,000-100,000 datapoints.
On the other hand, if you use the Point/PointCollection solution, you will be able to get a much more customizable point object where you can specify the x/y values of each point individually, as well as CSS styles and images for points meeting specific
criteria. The disadvantage of this approach, however will be that you will need to do a lot more processing as you will need to populate objects for each point that you need to show. It will definitely be slower.
|