Welcome to the Xceed Community | Help
Community Search  

Is there an easy way to highlight bands on a chart

Sort Posts: Previous Next
  •  08-09-2008, 4:25 AM Post no. 13973

    Is there an easy way to highlight bands on a chart

    I've got a winforms app and I'm interested in finding a way to shade or highlight an area of the chart.  I'm graphing multiple tasks on the same chart.  I'd like to be able to change the color of a vertical area on the graph between two X-axis values in order to show what time the task includes on the chart.  Is that possible?

     

     

  •  08-12-2008, 1:34 PM Post no. 14029 in reply to 13973

    Re: Is there an easy way to highlight bands on a chart

    You can use axis stripes to accomplish this, and set the "from" and "to" values to the X-axis values of your choice.

    e.g. :

    chart.Axis( StandardAxis.PrimaryX ).Stripes.Add( 2, 3 );

    chart.Axis( StandardAxis.PrimaryX ).Stripes.Add( 5, 6 );


    André
    Software Developer and Tech Support
    Xceed Software Inc.
  •  08-12-2008, 7:28 PM Post no. 14037 in reply to 14029

    Re: Is there an easy way to highlight bands on a chart

    Thank you thank you thank you.  That is exactly what I needed.  I knew there had to be an easy way.  When I was searching for it for some reason the word "stripe" didn't occur to me as a search term. 

    Thank you so much for the help.  It's always a bit tough to get used to a new chart control but so far I'm really starting to like the features on Xceed Chart. Big Smile

    Filed under: , ,
  •  08-13-2008, 12:08 PM Post no. 14049 in reply to 14037

    Re: Is there an easy way to highlight bands on a chart

    Glad we could help!

    I forgot to mention that we have a sample explorer that can be very helpful in finding if the chart offers such or such feature, and then learn how to implement it in code.

    Go to Start Menu -> All Programs -> Xceed Components -> Our components in action! -> Xceed Chart Explorer for .NET.

    You can then look at specific charts or topics, and  you can look at the code by clicking on the "C# Code" tab.  You will find the complete source code of the explorer under -> C:\Program Files\Xceed Components\Xceed Chart for .NET and ASP.NET <version>\Samples under XP, or C:\Xceed Component Samples\Xceed Chart for .NET <version>\Samples under Vista.


    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.