See "Strtucture of Chart Data" in the Adobe documentation:

http://livedocs.adobe.com/flex/3/html/charts_intro_8.html

I reached this by Googling "flex chart datafunction"

On Mon, Dec 29, 2008 at 11:08 PM, kotha poornima <poorni_ag...@yahoo.com>wrote:

>   Hi Richard,
> Thanks for the replies.Can you please give me an example??
>
> Thanks
> Poornima
> ------------------------------
> *From:* Richard Rodseth <rrods...@gmail.com>
> *To:* flexcoders@yahoogroups.com
> *Sent:* Tuesday, December 30, 2008 12:14:19 PM
> *Subject:* Re: [flexcoders] FLEX CHARTING
>
>  But you can use the  dataFunction property to set a function that does
> calculations on the fly.
>
> On Mon, Dec 29, 2008 at 10:28 PM, Brendan Meutzner <bmeutz...@gmail. 
> com<bmeutz...@gmail.com>
> > wrote:
>
>>   yField is just a reference to a property or node in your dataset... in
>> your case "uptime"... if you want to do a calculation, you will have to
>> perform that on your dataset prior to plotting in the ColumnChart. .. you
>> can't perform a calculation on the field reference as you're trying to do.
>>
>>
>> Brendan
>>
>>
>>
>> On Tue, Dec 30, 2008 at 12:24 AM, kotha poornima <poorni_agile@ 
>> yahoo.com<poorni_ag...@yahoo.com>
>> > wrote:
>>
>>>   Hi All,
>>> I am using Column chart in my project. Here i need to plot uptime and
>>> downtime of the system using column chart. Uptime data will come from the
>>> database like this:
>>>     <StatusGraph>
>>>         <data>
>>>           <date>10</date>
>>>           <uptime>0</uptime>
>>>         </data>
>>>         <data>
>>>           <date>11</date>
>>>           <uptime>1</uptime>
>>>         </data>
>>>         <data>
>>>           <date>12</date>
>>>           <uptime>2</uptime>
>>>         </data>
>>>         <data>
>>>           <date>07</date>
>>>           <uptime>2</uptime>
>>>         </data>
>>>         <data>
>>>           <date>07</date>
>>>           <uptime>2</uptime>
>>>         </data>
>>>         <data>
>>>           <date>18</date>
>>>           <uptime>0</uptime>
>>>         </data>
>>>       </StatusGraph>
>>>  I am not getting any downtime information from the database. Doubt i
>>> have here is can i do any calculations before plotting the graph.
>>>  I tried like this. But its not working.
>>>                 <mx:ColumnChart id="chart"
>>> dataProvider="{resultXML.System[ 0].StatusGraph. data}"
>>> type="100%" width="500" height="250" showDataTips="true">
>>>                     <mx:series>
>>>                         <mx:ColumnSeries yField="uptime" />
>>>                         <mx:ColumnSeries yField="100-uptime" /> -- Doubt
>>>                     </mx:series>
>>>                     <mx:horizontalAxis>
>>>                         <mx:CategoryAxis categoryField="date" />
>>>                     </mx:horizontalAxis>
>>>                 </mx:ColumnChart>
>>> SO here iam using yfield as 100-uptime to calculate downtime. But its
>>> not displaying any data. Can any one help me regarding this.
>>>
>>> Thanks and Regards,
>>> Poornima
>>>
>>>
>>
>>
>> --
>> Brendan Meutzner
>> http://www.meutzner .com/blog/ <http://www.meutzner.com/blog/>
>>
>
>
>  
>

Reply via email to