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

3 posts, 0 answers
  1. Geoff Hardy
    Geoff Hardy avatar
    58 posts
    Member since:
    Feb 2010

    Posted 17 May 2010 Link to this post

    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. Sia
    Admin
    Sia avatar
    755 posts

    Posted 20 May 2010 Link to this post

    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.
  3. Sia
    Admin
    Sia avatar
    755 posts

    Posted 20 May 2010 Link to this post

    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.
Back to Top