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

PointMarkerStyle

4 Answers 97 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Natália
Top achievements
Rank 1
Natália asked on 11 Aug 2010, 09:21 PM
Hello,

I wonder if I can customize the property PointMarker using SeriesMappings to build the chart.
How can I do this?
Ex: MarkerShape = triangle
fill = red.

Thank you in advance!

4 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 12 Aug 2010, 07:48 AM
Hi Natália,

Here is a sample code snippet that demonstrates the desired customizations:

LineSeriesDefinition definition = new LineSeriesDefinition();
definition.Appearance.PointMark.Shape = MarkerShape.Triangle;
definition.Appearance.PointMark.Fill = new SolidColorBrush(Colors.Yellow);
definition.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Red);

Hope this helps.


Greetings,
Freddie
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
Natália
Top achievements
Rank 1
answered on 12 Aug 2010, 12:46 PM
Thanks for the reply.
I can do in XAML code too?

thanks...
0
Natália
Top achievements
Rank 1
answered on 12 Aug 2010, 08:18 PM
I created the chart using SeriesMappings and did everything in XAML, I wanted to customize the Points, but have not found a way to use MarkerShape in XAML.

thanks
...
 = ]
0
Giuseppe
Telerik team
answered on 13 Aug 2010, 10:02 AM
Hi Natália,

Here is the XAML equivalent (note that you need to upgrade to the latest version 2010.2.812 released yesterday as the previous version has a known issue with setting appearance settings declaratively):

<telerik:RadChart x:Name="RadChart1">
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping>
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:LineSeriesDefinition>
                    <telerik:LineSeriesDefinition.Appearance>
                        <telerik:SeriesAppearanceSettings>
                            <telerik:SeriesAppearanceSettings.PointMark>
                                <telerik:PointMarkAppearanceSettings Fill="Yellow" Stroke="Red" Shape="Triangle" />
                            </telerik:SeriesAppearanceSettings.PointMark>
                        </telerik:SeriesAppearanceSettings>
                    </telerik:LineSeriesDefinition.Appearance>
                </telerik:LineSeriesDefinition>
            </telerik:SeriesMapping.SeriesDefinition>
            <telerik:ItemMapping FieldName="YValue" DataPointMember="YValue" />
        </telerik:SeriesMapping>
    </telerik:RadChart.SeriesMappings>
</telerik:RadChart>

Hope this helps.


Best wishes,
Freddie
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
Natália
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Natália
Top achievements
Rank 1
Share this question
or