[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hitData function. How to Determine the LineSeries I have hit

Are you looking for something like:

var elementName:String = hitData.element.toString();
var c:int = elementName.lastIndexOf(".");
var lineSeriesName:String = elementName.substring(c + 1);

Of course, I could be wrong...


On 7/12/18, 4:33 AM, "npem" <philip.medlam@xxxxxxxxx> wrote:

        I have a LineChart:
    *<mx:LineChart id="myChartLive"  dataTipFunction="LineChartDataTips">*
     with several LineSeries:
    <mx:LineSeries id="LineSeries1" xField="x" yField="yTOP" form="curve"
    displayName="CF1" lineStroke="{s1}"/>
    <mx:LineSeries id="LineSeries2" xField="x" yField="yBOT" form="curve"
    displayName="CF2" lineStroke="{s1}"/>
    ...     ...
    ...     ...
    Anyone any idea how I can tell (within the LineChartDataTips function, which
    LineSeries I have
    Hit on the chart?
    One example from tracing:
    But I do not know how to convert this to a string, to search for LineSeries5
    (In this case)
    Help would be greatly appreciated,
    Sent from:;;sdata=220doB5901qMOFaASTBPYrSkYMvxcYC8Jdz5vnKKyLs%3D&amp;reserved=0