LineSeries dotted line and Theme

2 posts, 0 answers
  1. Nicolas Wagener
    Nicolas Wagener avatar
    6 posts
    Member since:
    Nov 2009

    Posted 12 Jul 2010 Link to this post

    i was using this thread for my dotted lines on my RadChart :

    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()
                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 });
                rc.DefaultView.ChartArea = ca;
                //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 ?

    Nicolas Wagener.
  2. Sia
    Sia avatar
    755 posts

    Posted 14 Jul 2010 Link to this post

    Hi Nicolas Wagener,

    Unfortunately I confirm that there is a problem with the dashed style when a different theme from the default one is set. Your telerik points are updated. Thank you very much for bringing this to our attention. Our developers will investigate it in detail.

    You can check the status of this issue in our Public Issues Tracking system.

    All the best,
    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
Back to Top