Line chart with 2 colors or 2 chart in same place

Thread is closed for posting
2 posts, 0 answers
  1. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 01 May 2012 Link to this post

    I have a graphic. In this graphic I need to show two moments. One moment, between a year range and other moment in other range. So, each range must be two diferent colors, in same line serie. I think to build two series, but when I put serie = 0, I heve a dot line, but I don't want a dot line, but invisible line. Is posible? Below my code:

    chartSeries1.SetValues(bl.doubleArrayMercado);
    chartSeries2.SetValues(bl.doubleArray2009);
    chartSeries3.SetValues(bl.doubleArray2010);
    for (int i = 0; i < bl.doubleArray2009.Length; i++)
    {
    if (bl.doubleArray2009[i] == 0)
    {
    chartSeries2.Items[i].Empty = 
    true//Here a dot line and no invisible line 

    chartSeries2.Items[i].Visible = 
    false;
    }
    }
    for (int i = 0; i < bl.doubleArray2010.Length; i++)
    {
       if (bl.doubleArray2010[i] == 0)
       {
    chartSeries3.Items[i].Empty = 
    true;//Here a dot line and no invisible line
    chartSeries3.Items[i].Visible = 
    false;
        }




  2. Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 04 May 2012 Link to this post

    Hello,

    You have complete control over the visual style of empty values. Hiding the dot line that appears can be achieved by setting the EmptyValue line color to transparent like this:
    chartSeries2.Appearance.EmptyValue.Line.Color = System.Drawing.Color.Transparent;
    Hope this helps.

    Regards,
    Peshito
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top