Check out the dataTipFunction abilities.

Adrian

abhishekchess1 wrote:

hello frnd,
plz check theis code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml>"
layout="vertical" verticalAlign="top" horizontalAlign="center"
backgroundGradientColors="0x000000,0x323232]" paddingTop="0"
viewSourceURL="srcview/index.html">

<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var expensesAC:ArrayCollection = new ArrayCollection
( [
{ Month: "Jan", Profit: 2000, Expenses: 1500, Amount:
450 },
{ Month: "Feb", Profit: 1000, Expenses: 200, Amount:
600 },
{ Month: "Mar", Profit: 1500, Expenses: 500, Amount:
300 },
{ Month: "Apr", Profit: 1800, Expenses: 1200, Amount:
900 },
{ Month: "May", Profit: 2400, Expenses: 575, Amount:
500 } ]);
]]>
</mx:Script>

<mx:Panel title="LineChart Control" layout="horizontal"
color="0xffffff" borderAlpha="0.15" width="600" height="240"
paddingTop="10" paddingRight="5" paddingBottom="10"
paddingLeft="5" horizontalAlign="center">

<mx:LineChart id="linechart" color="0x323232" height="100%"
showDataTips="true" dataProvider="{expensesAC}">

<mx:horizontalAxis>
<mx:CategoryAxis categoryField="Month"/>
</mx:horizontalAxis>

<mx:series>
<mx:LineSeries yField="Profit" form="curve"
displayName="Profit"/>
</mx:series>
</mx:LineChart>

<mx:Legend dataProvider="{linechart}" color="0x323232"/>

</mx:Panel>
</mx:Application>

this code is working fine, but is thr any way with i can do the 1
thing that is
when i rollover on any name of month(which at X axis, like Jan),
it should show tooltip, and on this tooltip i can see the profit ,
month,amount like save i can see when i rollover on that line.
thx in advanced,
:)


Reply via email to