This is a migrated thread and some comments may be shown as answers.

Line chart with 2 colors or 2 chart in same place

1 Answer 22 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 01 May 2012, 01:53 PM
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;
    }




1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 04 May 2012, 09:22 AM
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.
Tags
Chart (Obsolete)
Asked by
Paulo
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or