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

Dashed Line With Default Color (same as PointMarks color)

3 Answers 60 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 19 Oct 2010, 10:31 PM
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?


3 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 21 Oct 2010, 11:48 AM
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
0
Daniel
Top achievements
Rank 1
answered on 28 Oct 2010, 06:57 PM
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.
0
Sia
Telerik team
answered on 01 Nov 2010, 03:08 PM
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
Tags
Chart
Asked by
Daniel
Top achievements
Rank 1
Answers by
Sia
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or