Home Forums WinForms controls Xceed Chart for WinForms Is there an easy way to highlight bands on a chart

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18974 |

    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?

     

     

    Imported from legacy forums. Posted by Steve (had 1430 views)

    User (Old forums)
    Member
    Post count: 23064

    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 );

    Imported from legacy forums. Posted by André (had 259 views)

    User (Old forums)
    Member
    Post count: 23064

    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. [:D]

    Imported from legacy forums. Posted by Steve (had 972 views)

    User (Old forums)
    Member
    Post count: 23064

    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.

    Imported from legacy forums. Posted by André (had 1956 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.