How to Show Overlap Bar graph


https://www.nevron.com/Forum/Topic13072.aspx
Print Topic | Close Window

By shweta jain - 4 Years Ago
Hello,

I want to create overlap bar chart like in this attached snapshot. How can I achieve this?

By Nevron Support - 4 Years Ago
Hi Sweta,
You can achieve this using a second bar series with different bar width percent (the percentage it occupies from the category). For example:

   NBarSeries bar1 = new NBarSeries();
    bar1.FillStyle = new NColorFillStyle(Color.Red);

    bar1.Values.Add(10);
    bar1.Values.Add(20);
    bar1.Values.Add(30);

    chart.Series.Add(bar1);

    NBarSeries bar2 = new NBarSeries();
    bar2.WidthPercent = 50;
    bar2.FillStyle = new NColorFillStyle(Color.Blue);
    bar2.Values.Add(40);
    chart.Series.Add(bar2);

Let us know if you have any questions.