Oh, I forgot: I'm using Flex 2.0.1

On Dec 13, 2007 3:20 PM, Guido <[EMAIL PROTECTED]> wrote:

> Hi, people.
>
> I have a LineChart with multiple series in it, and I'd like to have a
> custom data tip function for each series, and not one for the whole chart.
> I've thought of a couple of ways of doing this, but none of them are what
> you'd call 'tidy'. I'd like to know if there's a reasonably declarative
> fashion (that is, without using an if ... then ... else statement and
> comparing to a given property on the hit data on my data tip function) of
> specifying a custom data tip function for a specific series in the chart,
> instead of using one single data tip function for all series in the chart.
>
> Any ideas on this one?
>
> Here's my code (I know there's no dataTipFunction specified on the chart
> right now, since it makes data tips for all series the same):
>
> <mx:LineChart id="lineChart"
>     height="100%"
>     showDataTips="true"
>     width="100%">
>
>     <mx:horizontalAxis>
>      <mx:CategoryAxis
>       displayName="Muestra"
>       categoryField="{ClinicalStudy.xField}"
>       dataProvider="{selectedStudy.results}"/>
>     </mx:horizontalAxis>
>
>     <mx:verticalAxis>
>      <mx:LinearAxis
>       alignLabelsToInterval="false"
>       autoAdjust="false"
>       baseAtZero="false"
>       displayName="Valor"
>       maximum="{maxVerticalAxis}"
>       minimum="{minVerticalAxis}"/>
>     </mx:verticalAxis>
>
>     <mx:series>
>
>      <mx:LineSeries
>       dataProvider="{selectedStudy.results}"
>       displayName="{ selectedStudy.name}"
>       yField="{ClinicalStudy.yField}">
>       <mx:lineStroke>
>        <mx:Stroke alpha="0.8" color="#F5821F" weight="4"/>
>       </mx:lineStroke>
>      </mx:LineSeries>
>
>      <mx:LineSeries
>       dataProvider="{selectedStudy.averageDataProvider}"
>       displayName="Media"
>       yField="{ClinicalStudy.yField}">
>       <mx:lineStroke>
>        <mx:Stroke alpha="0.8" color="#499615" weight="2"/>
>       </mx:lineStroke>
>      </mx:LineSeries>
>
>     </mx:series>
> </mx:LineChart>
>
>
> Thanks in advance,
>
>
> Guido.
>

Reply via email to