Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Different colors in same BarSeries?

Sort Posts: Previous Next
  •  01-28-2008, 2:32 AM Post no. 6580

    Different colors in same BarSeries?

    Hi!

    My customer wants a BarSeries with different colors for different intervals, is this possible? As an example I have a barseries that spans from 1 - 10 on the X-axis, and we want to make the bar for 1 red, 2-4 yellow and 5-10 green. Is this possible with one BarSeries?
  •  01-28-2008, 12:30 PM Post no. 6581 in reply to 6580

    Re: Different colors in same BarSeries?

    Yes, you can set the FillMode to DataPoints, and then tell the series what color to use for what bar.
    <code>
    e.g.:
    bar.Appearance.FillMode = AppearanceFillMode.DataPoints;

    and then :

    bar.Appearance.FillEffects.Add( new FillEffect( Color.Aqua ) );
    or :
    bar.Add( 10, "", new FillEffect( Color.Aqua ) );
    </code>

    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.