2 Replies Latest reply on Nov 29, 2010 6:15 AM by bschrooten

    Issue with datatips showing on line chart

    bschrooten

      I have a line chart but the datatip is only showing on the middle point, not the first two. Dont know why. Heres the code.

       

       

      <fx:Script>
              <![CDATA[
                  import mx.collections.ArrayCollection;           
                  [Bindable]
                  private var t:ArrayCollection = new ArrayCollection([
                      {Num: "1", Y:20.5, X:1},
                      {Num: "1", Y:21.5, X:2},
                      {Num: "1", Y:22.5, X:3}           
                  ]);
              ]]>
          </fx:Script>
         
          <mx:Canvas width="100%" height="100%">
              <s:VGroup width="100%">
                  <mx:LineChart   id="myChart"  width="100%"
                                  showDataTips="true"
                                  dataProvider="{t}"
                                  >
                      <mx:series>
                          <mx:LineSeries xField="X" yField="Y"/>
                      </mx:series>
                      <mx:horizontalAxis>
                          <mx:LinearAxis direction="inverted" title="X" />
                      </mx:horizontalAxis>
                      <mx:verticalAxis>
                          <mx:LinearAxis title="Y"/>
                      </mx:verticalAxis>
                  </mx:LineChart>
              </s:VGroup>
          </mx:Canvas>