17 Replies Latest reply on Jun 27, 2008 11:37 AM by Developer504

    Adding lines to the tooltip on a BarChart

    Developer504
      I have the following barchart in my App

      <mx:BarChart x="35" y="{this.height * 0.025}" id="EmpUtil" height="{euSize}" width="90%" dataProvider="{euDs}" showDataTips="True" themeColor="#E3F1CE" paddingLeft="5" paddingRight="5" >
      <mx:verticalAxis>
      <mx:CategoryAxis categoryField="@name"/>
      </mx:verticalAxis>
      <mx:series>
      <mx:BarSeries displayName="Employee" xField="@percent" fill="{sc2}" stroke="{s4}"/>
      </mx:series>
      </mx:BarChart>

      When I mouseover an element, I get a Tool Tip which displays the text "Employee", as well as the data from the name (@name) field and the value of the xField (@percent)

      How can I add a third field to my toolTip display which isn't part of the CategoryAxis or XField? I tried defining a field and putting it in there in place of the text "Employee" but I can't figure out the syntax to get my data into that field. I tried making a function, a variable etc. combining my name, the @percentage, and a new field @code, but I can't get anything to work or even pass checker. Can anyone help with tihs?

      M.