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

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

3 Answers 46 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Sanjay
Top achievements
Rank 1
Sanjay asked on 20 Feb 2012, 11:45 AM
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>

3 Answers, 1 is accepted

Sort by
0
Sanjay
Top achievements
Rank 1
answered on 23 Feb 2012, 10:36 AM
Does anybody have idea how can i solve this clipping problem?
0
Accepted
Tsvetie
Telerik team
answered on 23 Feb 2012, 12:44 PM
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 >>
0
Sanjay
Top achievements
Rank 1
answered on 24 Feb 2012, 12:21 PM
Hi Tsvetie,

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

Thanks and Regards
Sanjay Singh

Tags
Chart
Asked by
Sanjay
Top achievements
Rank 1
Answers by
Sanjay
Top achievements
Rank 1
Tsvetie
Telerik team
Share this question
or