Hello,
i was using this thread for my dotted lines on my RadChart :
http://www.telerik.com/community/forums/silverlight/chart/dashed-dotted-line.aspx
and it's seems that a dotted line isn't working with another theme than the default.
I wanted to use the dotted line with the Windows 7 theme but the Office_BlackTheme is the only one that works.
Am I wrong somewhere or is it a bug that you don't know ?
Regards,
Nicolas Wagener.
i was using this thread for my dotted lines on my RadChart :
http://www.telerik.com/community/forums/silverlight/chart/dashed-dotted-line.aspx
and it's seems that a dotted line isn't working with another theme than the default.
I wanted to use the dotted line with the Windows 7 theme but the Office_BlackTheme is the only one that works.
RadChart rc =
new
RadChart();
ChartArea ca =
new
ChartArea();
DataSeries ds =
new
DataSeries();
DataSeries ds2 =
new
DataSeries();
public
MainPage()
{
InitializeComponent();
Style pathStyle1 =
new
Style(
typeof
(Path));
pathStyle1.Setters.Add(
new
Setter(Shape.StrokeDashArrayProperty,
"1"
));
pathStyle1.Setters.Add(
new
Setter(Shape.StrokeProperty,
new
SolidColorBrush(Colors.Cyan)));
pathStyle1.Setters.Add(
new
Setter(Shape.StrokeThicknessProperty, 3));
Style lineStyle1 =
new
Style(
typeof
(Telerik.Windows.Controls.Charting.LineSeries));
lineStyle1.Setters.Add(
new
Setter(LineSeries.BorderLineStyleProperty, pathStyle1));
Style pathStyle2 =
new
Style(
typeof
(Path));
pathStyle2.Setters.Add(
new
Setter(Shape.StrokeDashArrayProperty,
"1"
));
pathStyle2.Setters.Add(
new
Setter(Shape.StrokeProperty,
new
SolidColorBrush(Colors.Orange)));
pathStyle2.Setters.Add(
new
Setter(Shape.StrokeThicknessProperty, 3));
Style lineStyle2 =
new
Style(
typeof
(Telerik.Windows.Controls.Charting.LineSeries));
lineStyle2.Setters.Add(
new
Setter(LineSeries.BorderLineStyleProperty, pathStyle2));
rc.DefaultView.ChartLegend.Visibility = Visibility.Collapsed;
ds.Definition =
new
LineSeriesDefinition() { SeriesStyle = lineStyle1, ShowItemLabels =
false
, ShowPointMarks =
false
};
ds2.Definition =
new
LineSeriesDefinition() { SeriesStyle = lineStyle2, ShowItemLabels =
false
, ShowPointMarks =
false
};
for
(
int
i = 0; i < 10; i++)
{
ds.Add(
new
DataPoint() { YValue = i * i * 2, XValue = i });
if
(i==2 || i == 4 || i == 6)
ds2.Add(
new
DataPoint() { YValue = (i+100) * i * 2, XValue = i });
}
ca.DataSeries.Add(ds);
ca.DataSeries.Add(ds2);
rc.DefaultView.ChartArea = ca;
LayoutRoot.Children.Add(rc);
//Telerik.Windows.Controls.StyleManager.SetTheme(rc, new Telerik.Windows.Controls.Windows7Theme());
//Telerik.Windows.Controls.StyleManager.SetTheme(rc, new Telerik.Windows.Controls.VistaTheme());
//Telerik.Windows.Controls.StyleManager.SetTheme(rc, new Telerik.Windows.Controls.SummerTheme());
Telerik.Windows.Controls.StyleManager.SetTheme(rc,
new
Telerik.Windows.Controls.Office_BlackTheme());
//Telerik.Windows.Controls.StyleManager.SetTheme(rc, new Telerik.Windows.Controls.Office_BlueTheme());
//Telerik.Windows.Controls.StyleManager.SetTheme(rc, new Telerik.Windows.Controls.Office_SilverTheme());
}
Am I wrong somewhere or is it a bug that you don't know ?
Regards,
Nicolas Wagener.