title: Setting different Chart DataTip styles in Flex Components
body: <p>I have a following issue:My task is to style a datatip for two charts in Flex 4.5.Both charts reside in two different <code>&lt;Group&gt;</code> based components which are added to the <code>&lt;Application&gt;</code></p>
  
  <p>So after a thorough research here is what I tried to do.First applying a css descending selectors:</p>
  
  <pre><code>#container#chart1 chartClasses|DataTip{     
      backgroundColor:white;
      backgroundAlpha:0.01;
      fontSize: 12; 
      fontWeight:bold;
      fontStyle:italic; 
  }
  </code></pre>
  
  <p>So the component with Id=container and inside it a chart with id="chart1"
  It doesn't work despite the fact that Adobe docs say it should.
  Another approach which I believed was supposed to solve it was to put this CSS style</p>
  
  <pre><code>chartClasses|DataTip{
      backgroundColor:white;
      backgroundAlpha:0.01;
      fontSize: 12; 
      fontWeight:bold;
      fontStyle:italic; 
  }
  </code></pre>
  
  <p>inside each of these components but guess what,chart DataTip class selector work only on <code>&lt;Application&gt;</code> level(and then it applies the same style to all chart datatips found in the application.So putting it in each of the two components containing the charts has no effect.</p>
  
  <p>Next ,I created a  class that is fed into dataTipRenderer style of the chart.Then inside the class called MyCustomDataTipRenderer I set the class selector :</p>
  
  <pre><code>.dataTip{
      backgroundColor:white;
      backgroundAlpha:0.01;
      fontSize: 12; 
      fontWeight:bold;
      fontStyle:italic; 
  }
  </code></pre>
  
  <p>And yes ,it works.But let's say I want to be able to set different styles for the custom datatip renderer based on the hosting chart.How can I do it ? It seems the Flex SDK has not exposed in any way thr datatipRenderer.So If I effectively set the custom datatip renderer like this:</p>
  
  <pre><code>columnchart1.setStyle("dataTipRenderer",CustomDataTip); 
  </code></pre>
  
  <p>Then I would like to be able to get access to the instance of the CustomDataTip class.But I can't .So currently the only thing I can do is to create a distinct custom datatip renderer class for each chart.That could be fine if you have only a couple of charts you want to style but what can we do if we have many of them?  </p>