Hello,

I'm building a data visualizer for a company based on it's sales
fleet. I've got a few questions about XML and pie charts and I'm
hoping someone can point me in the right direction to figure this one out.

So, I've got this XML document that I'm importing into FLEX that looks
a bit like this (simplified):

<salesforce>
   <office>
      <name>Office A</name>
      <region>Texas</region>
      <revenue>100000</revenue>
   </office>
   <office>
      <name>Office B</name>
      <region>Texas</region>
      <revenue>150000</revenue>
   </office>
   <office>
      <name>Office C</name>
      <region>Iowa</region>
      <revenue>80000</revenue>
   </office>
   <office>
      <name>Office D</name>
      <region>Maine</region>
      <revenue>110000</revenue>
   </office>
</salesforce>

I've got some datagrids set up to explore the XML just fine, but I'd
also like to make pie charts that provide visuals for the client. For
example, I'd like a pie chart that shows where the offices are located
by region (so 50% texas, 25% Iowa and 25% Maine) and a second pie
chart that displays revenue by state (57% Texas, 18% Iowa and 25% Maine).

I'm finding that there isn't a simple way to collect this information
using something like
dataProvider="{service.lastResult.salesforce.office[region]}" for the
pie chart. I think I am going to have to step through the XML and
build this information dynamically, or am I wrong? Can FLEX handle this?

How would you go about setting these types of pie charts up to display
from the XML referenced above?

CHris

Reply via email to