0 Replies Latest reply on Oct 29, 2008 6:19 AM by platus2000

    Problem with AreaChart multiple custom data tips

    platus2000
      I have a very annoying problem - I probably just don't understand how Renderers work well enough or maybe it's something deeper.

      I have a type="stacked" AreaChart component for which I used
      dataTipRenderer="<Renderers.MyRenderer>" and
      dataTipMode="multiple"

      The problem happens when I have a lot of data on a particular tick, Flex renders a tooltip for EACH value, which isn't so good because sometimes they are so many that they even go out of the screen.

      What I want to do is FILTER out the datatips for the series points that have a 0 value.

      My Data Provider looks someting like this (for example if I have two stacked series):
      <GRAPH>
      <SLICE caption="" id="1" date="20080911164030"><POINT1>10</POINT1><POINT2>5</POINT2></SLICE>
      <SLICE caption="" id="2" date="20080911164035"><POINT1>10</POINT1><POINT2>0</POINT2></SLICE>
      :
      :
      </GRAPH>

      On this example, When I hover my mouse on the 2nd tick's tip, I want Flex to only render POINT1 , not POINT2 (or other POINTs that have a value of 0).

      Any ideas?


      EDIT: I tried to make the renderer invisible when the data value is 0, but the problem is that the custom tooltip still takes its place on the screen, I don't want it at all:

      Code from my custom renderer:

      "
      override public function set data(value:Object):void
      {
      super.data = value;
      if (data) {
      // setting the tooltip stuff
      if (val == 0)
      this.visible = false;
      }
      "

      I also tried this.width = 0 and this.height = 0, but that just messes up the layout of the datatips altogether.