I have been using flash charts in my Web Dynpro components for a while now and I thought it's time to try and take it to the next level and create an interactive chart. I got a request from my user for a graph with 2 levels - a weekly level that shows data for 7 weeks, and then a daily level that shows the daily data for each of the weeks. I saw a beautiful example from adobe that fits this request exactly:
http://examples.adobe.com/flex3/devnet/dashboard/main.html
As you can see in the two right charts, when you click on a month you get the daily chart for that month. I have the code for a working flex chart with this exact structure. I did some tests trying to get it to work with variables from my WDA components but without success so far. The major difference between this chart and a simple chart is the structure of the array collection. Here is the structure of the array collection in my example:
public var dpac:ArrayCollection = new ArrayCollection ([
,
,
]);
We have 2 dates here and For each date there are six different values. Obviously the values are hard-coded here but what I wanted to do is to create a different variable for each of the values of each of the dates and fill each of these during the run of the WDA component. my structure was:
date: = (VAR1) assets: (VAR2)....ETC
date: = (VAR8) assets: (VAR9)....ETC
Obviously not the most fancy thing I have ever written from a developer perspective but i couldn't think of different way to make this lovely chart work in WDA. Here is the link for the chart I took the code from:
http://blogs.adobe.com/flexdoc/2007/03/chart_data_drill_down_examples.html
You can download the source code, the chart I used as my portfolio was "DrillDownWithEffects".