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

How do you change the size of the PointMarks in a RadChart?

2 Answers 133 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Geoff Hardy
Top achievements
Rank 1
Geoff Hardy asked on 17 May 2010, 04:41 PM
We would like to change the size of the PointMarks in the RadChart. Is there a simple way to do this?
We have tried the following:

seriesDefinition.PointMarkItemStyle = (Style) Resources["pointMarkItemStyle"]; 

With either of the following styles, this did not work:

    <Style TargetType="Charting:PointMark" x:Key="pointMarkItemStyle"
        <Setter Property="Size" Value="40"/> 
    </Style> 

    <Style TargetType="Charting:PointMark" x:Key="pointMarkItemStyle"
        <Setter Property="Width" Value="40"/> 
        <Setter Property="Height" Value="40"/> 
    </Style> 

2 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 20 May 2010, 01:07 PM
Hello Geoff Hardy,

Unfortunately I confirm that there is an issue with changing the size of the PointMarks. It is logged in our Public Issue Tracking system and you can check its status there.

At the present time you can change the size of your PointMarks as follows:
<Window x:Class="WpfApplication2Branch.Window1"
    Title="Window1"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
    xmlns:TelerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:chart="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting">
    <Window.Resources>
        <Style x:Name="CustomStyle" TargetType="chart:PointMark">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="chart:PointMark">
                        <Canvas>
                            <Path x:Name="PART_PointMarkPath"
                                  Canvas.Left="{TemplateBinding PointMarkCanvasLeft}"
                                  Canvas.Top="{TemplateBinding PointMarkCanvasTop}"
                                  Style="{TemplateBinding ShapeStyle}"
                                  Width="90"
                                  Height="90"
                                  Stretch="Fill">
                                <Path.Data>
                                    <PathGeometry x:Name="PART_PointMarkPathGeometry" />
                                </Path.Data>
                            </Path>
                        </Canvas>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>      
        <telerik:RadChart x:Name="RadChart1" />
    </Grid>
</Window>

Code behind:
series1.Definition.PointMarkItemStyle = this.Resources["CustomStyle"] as Style;
RadChart1.DefaultView.ChartArea.DataSeries.Add(series1);

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
Sia
Telerik team
answered on 20 May 2010, 01:20 PM
Hi again,

Please follow this link in PITS. It is logged for Silverlight but as we use single code-base you can refer to this issue no matter that it is not for WPF.

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.
Tags
Chart
Asked by
Geoff Hardy
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or