1 Reply Latest reply on Dec 8, 2010 1:45 PM by armalock

    Using LinearGradientStroke in line graphs


      Hi all,


      First some vital stats. I am using Flex SDK 3.5 and rendering with Flash Player 10.


      I am trying a very simple case of using a linear gradient stroke as the color of the line series in my line graph.  My code looks like this:



      <mx:LineSeries .......>


          <mx:LinearGradientStroke angle="{rotationSlider.value}" weight="15">

             <mx:GradientEntry color="white"/>

             <mx:GradientEntry color="0x00396b"/>






      I used a large weight to really see the effect. This is the result I get:



      Here are my problems:


      1. No matter what the angle value is, the gradient does not change. It does not look right in the first place, the ratio is 0.5 which means it should transition in the middle of the graph. It looks like it is transitioning in the middle of the first line segment and then stopping there. That would be okay if I can rotate it 90 degrees so I get a transition from top to bottom (to give it a shaded look).


      2. In the flex documentation it says angle is deprecated, but I do not see the rotation field in the options.


      3. The legend only shows up as "white". This is probably a hint to me that this stroke type is not supported in line graphs?


      Any help on getting the effect I am trying to achieve?