5 Replies Latest reply on Oct 31, 2007 8:57 AM by Mush15

    Noob Chart Question

    Level 1
      Hello Once again.

      I have a request to show datatips/labels in a second chart when a user rollsover a complimentary datatip in the first chart is this possible??

      If so how can it be done or where can I read about it?

      Thank you in advance.
        • 1. Re: Noob Chart Question
          Gregory Lafrance Level 6
          When the user rolls over the first chart, and that rollover event is fired, you could dispatch your own event and have the second chart listen to it. Or perhaps the second chart could simply listen for rollover events where the first chart is the target. Examine these FB2 help topics:

          Creating Custom Events
          Dispatching custom events
          • 2. Re: Noob Chart Question
            Level 1
            Firstly thank you for the reply and suggestion.

            Though I feel you have the right idea it brings me no closer to understanding how to call the method to show a data tip label.

            If you have any ideas I'm all ears or eyes as the case may be.
            • 3. Re: Noob Chart Question
              davidmedifit Level 1
              So, you'll want to do two things:
              1) Set datatips to show on your chart
              2) Create a custom data tip function

              1) <mx:ColumnChart id="myChart" dataProvider="{myprovider}"
              showDataTips="true" dataTipFunction="formatDataTip">

              private function formatDataTip(hitData:HitData):String{

              return "Total: "+ hitData.item.NameOfSeriesHere;

              Now, I'll warn you ahead of time, that the name of the "NameOfSeriesHere" item you want to display - that actual value, works a little depending on the type of series you are using - specifically, pie chart vs. all the others. So, debug your app, watch the "hitData" variable and determine what variables you want to use.

              The Flex 2 developers guide is a great resource also.


              • 4. Re: Noob Chart Question
                davidmedifit Level 1
                Sorry, wait, I read your post wrong - yeah, what Greg said!


                • 5. Re: Noob Chart Question
                  Level 1