0 Replies Latest reply on Nov 4, 2010 9:35 AM by TheGarfunkal

    Display linked info in a datatip

    TheGarfunkal

      hiya

       

      I have a chart and in the chart I have a dates on the horizontal axis, and the series is a numeric value.

       

      I have a renderer to show the value, but i also want to show a linked datafield in the datatips.

       

      My arraycollection comes from a database table - and the array does include a field called 'Comments' - Each day/value has a Comment which I'd like to show in the datatips

       

      Here is my Chart:


            <mx:ColumnChart  id="ccBarSystem"

            height="100%" width="100%" 

            showDataTips="true"  

            creationComplete="{PodContentBase.SystemHistory()}"

            dataTipRenderer="dashboard.renderers.ChartRender" x="19" y="10"   showDataTipTargets="true">

            <mx:horizontalAxis>

            <mx:CategoryAxis id="baraxis"

            dataProvider="{PodContentBase._SystemHistory}"

            c ategoryField="Period"  />

            </mx:horizontalAxis>

            <mx:series>

            <mx:ColumnSeries id="barseries"

            dataProvider="{PodContentBase._SystemHistory}" 

            yField="Breach"

                 fillFunction="myFillFunction">           

                 </mx:ColumnSeries>

           

            </mx:series>

           

               </mx:ColumnChart>

       

       

      ... and here is the renderer:

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="286" height="100" backgroundColor="#241616" backgroundAlpha="0.5">

          <mx:Label x="10" y="10" text="{data.chartItem.yValue}" color="#FFFFFF"/>

          <mx:Label x="10" y="36" text="I WANT MY COMMENTS HERE" color="#FFFFFF"/>   

       

      </mx:Canvas>

       

      Any thoughts?  How do I reference the comments field in the renderer?

       

      cheers

       

      Andrew