Sign in to follow this  
wjgilmore

Dynamically Adding Multiple Axes Via Ajax

Recommended Posts

Hi,

 

We're evaluating various charting solutions for an upcoming project, PowerCharts XT included. One of our critical requirements is the ability to dynamically add series *and companion axes* to an existing chart via Ajax. I've confirmed that PowerCharts supports a) multi-series charts, as evidenced here. I have also confirmed PowerCharts' ability to add data to a chart via JSON and Ajax as documented here. But it is not clear whether PowerCharts is able to dynamically add a companion axis *complete with a title and range* when retrieving series via Ajax. Many other charting solutions are unable to do this.

 

To be perfectly clear in regards to what I am asking, take a look at the PowerCharts demo presented here http://www.fusioncharts.com/demos/gallery/multi-axis-line-chart/chart.asp?id=multi_2. I want to do this, however when the page loads the chart will be empty. The user will then choose from a series of checkboxes which in the case of this example would include CPU Usage, PF Usage, and Processes. When the user selects one of those checkboxes, an Ajax request will be made to the server to retrieve the data. The series will then be added along with the companion axis (with title *and* data range).

 

Can somebody confirm whether this feature is supported?

 

Thanks!

 

Jason

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

I am afraid, PowerCharts XT does not support the feature of "When the user selects one of those checkboxes, an Ajax request will be made to the server to retrieve the data", as of now.

 

However, you can create HTML buttons similar to the checkboxes of Multi-Axis Chart, and make a Ajax request to the server and then update the entire chart XML with the new data based on the Ajax request.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi,

 

Thank you for your response. I'm however afraid I wasn't particularly clear in regards to my phrasing of the question. I am specifically interested to know whether PowerCharts is able to add a new yAxis / xAxis, complete with title and proper series range, to an *existing* chart, were I to perform an Ajax request and retrieve some series of data by way of a checkbox/button/whatever.

 

That is to say, is PowerCharts' JS library capable of properly adjusting an *existing* chart to integrate a newly retrieved series and associated axis?

 

Thank you

Jason

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

FusionCharts does not have the feature of adding a new Y-Axis or X-Axis to the existing chart.

 

Please note that FusionCharts works with both XML and JSON data and accepts data either as string or you can provide the URL of the data file.

 

So, as a work around you can plot the empty graph by providing the XML/JSON string with empty data (initially) and later you can update the entire data (perform an Ajax request) with new data series, which will re-render the chart with one new Axis, title and the new series of data.

 

For more information on "Providing and Updating chart data", please follow the link below:

http://docs.fusioncharts.com/charts/contents/?JavaScript/JS_ChangeData.html

 

But, you can not add the newly retrieved data to the existing chart using FusionCharts as of now.

 

Please note that you can only update the chart cosmetics (defined in the <chart> element) of the existing chart, using "setChartAttribute()" method.

 

Hope I am able to clarify myself.

 

Please do let us know if we could be of any further help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this