Dashed Line With Default Color (same as PointMarks color)

4 posts, 0 answers
  1. Daniel
    Daniel avatar
    8 posts
    Member since:
    Jul 2010

    Posted 19 Oct 2010 Link to this post

    I can currently set a line series to draw dashed with the following code:

    definition.AxisName = "PageViews";
    Style pathStyle1 = new Style( typeof( System.Windows.Shapes.Path ) );
    pathStyle1.Setters.Add( new Setter( Shape.StrokeDashArrayProperty, "1" ) );
    pathStyle1.Setters.Add( new Setter( Shape.StrokeProperty, new SolidColorBrush( Colors.Black ) ) );
    pathStyle1.Setters.Add( new Setter( Shape.StrokeThicknessProperty, 3 ) );
    Style lineStyle1 = new Style( typeof( Telerik.Windows.Controls.Charting.SelfDrawingSeries ) );
    lineStyle1.Setters.Add( new Setter( SelfDrawingSeries.BorderLineStyleProperty, pathStyle1 ) );
    definition.SeriesStyle = lineStyle1;

    The problem is, I want the color of the line to be set by the default theme -- not by Setter( Shape.StrokeProperty, new SolidColorBrush( Colors.Black ))

    Is this possible?


  2. Sia
    Admin
    Sia avatar
    745 posts

    Posted 21 Oct 2010 Link to this post

    Hi Daniel,

    Unfortunately this is not possible at the moment. If you tell us which theme you use, we can send you the needed colors so that you can set them the same color as the default one.

    Greetings,
    Sia
    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
  3. Daniel
    Daniel avatar
    8 posts
    Member since:
    Jul 2010

    Posted 28 Oct 2010 Link to this post

    I don't know, whatever the default theme is. The theme I'm using is whatever you get if you don't specify a theme.
  4. Sia
    Admin
    Sia avatar
    745 posts

    Posted 01 Nov 2010 Link to this post

    Hello Daniel,

    Here are the default colors for "Office Black" theme:

    <telerikChart:RadChart x:Name="RadChart1">
        <telerikChart:RadChart.PaletteBrushes>
                <SolidColorBrush Color="#FF74C0D3" />
                <SolidColorBrush Color="#FFE36375" />
                <SolidColorBrush Color="#FFECB62E" />
                <SolidColorBrush Color="#FF78C179" />
                <SolidColorBrush Color="#FFDD692A" />
                <SolidColorBrush Color="#FFC12A2A" />
                <SolidColorBrush Color="#FF3FC7CC" />
                <SolidColorBrush Color="#FFB4BF20" />
                <SolidColorBrush Color="#FF5A6378" />
                <SolidColorBrush Color="#FFC1C1C1" />
        </telerikChart:RadChart.PaletteBrushes>
    </telerikChart:RadChart>


    All the best,
    Sia
    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