Bar width & Average line

Thread is closed for posting
4 posts, 0 answers
  1. Ajith Nair
    Ajith Nair avatar
    11 posts
    Member since:
    Oct 2012

    Posted 01 Apr 2011 Link to this post

    Hi All,

    I have 2 queries regarding the chart.

    1)  In my application I have a bar chart. Is there any way to decrease the bar width.(or the scale width)

    2) I have a line chart with hours in the Y-Axis and Date in the x-Axis. Is there any way to draw a vertical line so that I can display the average hours of that chart.

    Thanks in advance
  2. Giuseppe
    Giuseppe avatar
    2363 posts

    Posted 06 Apr 2011 Link to this post

    Hi Ajith Nair,

    Onto your questions:

    • You can control the bar width through the ChartSeries.Appearance.BarWidthPercent property (value 0 - 100).
    • The control does not provide built-in support for custom gridlines, but you can use the MarkedZones feature to achieve similar effect (you will need to set really small width for the marked zone to look like gridline):
    ChartSeries series = new ChartSeries();
    series.Type = ChartSeriesType.Line;
    ChartMarkedZone markedZone = new ChartMarkedZone();
    markedZone.ValueStartX = 2;
    markedZone.ValueEndX = 2;
    markedZone.ValueStartY = 0;
    markedZone.ValueStartY = 30;
    markedZone.Appearance.Border.Width = 1;
    markedZone.Appearance.Border.Color = Color.Red;

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Alfonsina
    Alfonsina avatar
    13 posts
    Member since:
    May 2012

    Posted 05 Jul 2012 Link to this post

    Hello Telerik Team,

    I would like to know how can I set the border color of the item of a Serie, for example, in a Bar Serie.

    I send a picture and you know what I mean.

    Thank you very much,

    Kind regards,


  4. Evgenia
    Evgenia avatar
    1437 posts

    Posted 09 Jul 2012 Link to this post

    Hi Alfonsina,

     You can either set Border for the whole serie or for an item of it. Here's how to set Border for all items of your first serie:

    RadChart1.Series[0].Appearance.Border.Color = Color.Yellow;
    RadChart1.Series[0].Appearance.Border.Width = 3;

    To provide color for a single item (the second bar in this case) you should do the following:

    RadChart1.Series[0].Items[1].Appearance.Border.Color = Color.Red;
    RadChart1.Series[0].Items[1].Appearance.Border.Width = 3;

    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top