custom scatter point mark image clipping off at the boundaries of chart

4 posts, 1 answers
  1. Sanjay
    Sanjay avatar
    9 posts
    Member since:
    Jul 2011

    Posted 20 Feb 2012 Link to this post

    I have a  scatter series  custom scatter points with image as a point mark. Scatter point are  dispalying properly on chart except while on the boundaries. On the boundaries image of the custom scatter point is cliipping off. How can i solve this clipping problem?
    Refer the attached image.
    <Style x:Key="CustomPointStyle" TargetType="telerikCharting:PointMark">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="telerikCharting:PointMark">
                                    <Canvas >
                                        <Border x:Name="PART_TextContainer">
                                            <Image x:Name="PART_Image"  Width="20" Height="20"
                                                Source="Images/notifications.png" />
                                        </Border>
                                    </Canvas>             
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>              
                    <Style x:Key="CustomScatter" TargetType="telerikCharting:ScatterPoint">
                        <Setter Property="Template" >
                            <Setter.Value>
                                <ControlTemplate TargetType="telerikCharting:ScatterPoint">
                                    <Canvas x:Name="PART_MainContainer">
                                        <telerikCharting:PointMark x:Name="PART_PointMark"
                                                   Canvas.Top="{TemplateBinding StartPointY}"
                                                   PointMarkCanvasLeft="{TemplateBinding PointMarkCanvasLeft}"
                                                   PointMarkCanvasTop="{TemplateBinding PointMarkCanvasTop}"
                                                   ShapeStyle="{TemplateBinding PointMarkShapeStyle}"
                                                   Style="{StaticResource CustomPointStyle}"
                                                   Size="{TemplateBinding PointSize}"/>
      
                                    </Canvas>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
  2. Sanjay
    Sanjay avatar
    9 posts
    Member since:
    Jul 2011

    Posted 23 Feb 2012 Link to this post

    Does anybody have idea how can i solve this clipping problem?
  3. DevCraft banner
  4. Answer
    Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 23 Feb 2012 Link to this post

    Hi Sanjay,

    For the y-axis, you can use the ExtendDirection property. And for the x-axis, you can either use the LayoutMode property, or manually set the axis range. In order to do the latter, just set AutoRange to "false" and specify the MinValue, MaxValue and Step settings.

    All the best,
    Tsvetie
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Sanjay
    Sanjay avatar
    9 posts
    Member since:
    Jul 2011

    Posted 24 Feb 2012 Link to this post

    Hi Tsvetie,

    Thanks for you suggestion, i have used the ExtendDirection and LayoutMode property and it solved my problem.

    Thanks and Regards
    Sanjay Singh

Back to Top