"Live" data for charting examples

| 1 Comment

This is not a major announcement, but it's got a touch of cool factor and represents an improvement to about 200 doc examples. The charting examples in Flex documentation have been updated to use real-time data served up from a MySQL database. They connect to the database via an HTTPService tag, and then use the results as the data provider for the charts.

The server that hosts the data is located at:
aspexamples.adobe.com

The following list provides links to the new example data. The link in parentheses provides the XML output of the request. The best way to view the source data as it is used by Flex is to click the XML link, and then select View > Source in your browser:

To use these URLs as data sources in your apps, you can do something like the following:


<mx:HTTPService
id="srv"
url="http://aspexamples.adobe.com/chart_examples/expenses-xml.aspx"
/>

Be sure to call the service's send() method when your app is finished loading (in the creationComplete event handler):


creationComplete="srv.send()"

And then set the value of the chart's dataProvider property to something like this:


dataProvider="{srv.lastResult.data.result}"

The updated examples won't appear in the Flex documentation until the next time it is generated for the public. This will likely be for the Flex 4 ("Gumbo") beta. But the data is available now for your testing.

1 Comment

um ... asp?

Leave a comment

Community Help

Contribute to Community Help

About this Entry

This page contains a single entry by Matthew J. Horn published on January 5, 2009 1:24 PM.

Learning Paths provides help content according to role was the previous entry in this blog.

Updated Doc on using the Flex ASDoc Tool is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.