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

Scatter Plot Point Size

7 Answers 159 Views
Chart
This is a migrated thread and some comments may be shown as answers.
James DAmour
Top achievements
Rank 1
James DAmour asked on 06 May 2010, 02:33 PM
When I try to change the point size on a scatter plot, it doesn't increase in size, it's as if the container is fixed at a size and the point get clipped (so when I draw a circle point of point size 20, i see only a quarter of the circle appear on the graph).

here is my code i'm using to adjust the size:

DataSeries series = new DataSeries();
            ScatterSeriesDefinition l = new ScatterSeriesDefinition();
            l.Appearance.Fill = Brushes.DeepPink;
            l.Appearance.Stroke = Brushes.Black;
            l.PointSize = 20;
            series.Definition = l;

Appreciate your thoughts,
Nelson



7 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 10 May 2010, 01:52 PM
Hello James DAmour,

Indeed, currently there is a problem with changing the size property of the scatter points - the only way to change the point size at the moment, would be by retemplating and updating the Width and Height properties. The issue has been logged and our developers are working on resolving it, so you can expect a fix available in one of the upcoming internal builds, released every Friday.

We are sorry for the inconvenience caused.

Regards,
Nikolay
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
James DAmour
Top achievements
Rank 1
answered on 18 May 2010, 03:29 PM
Thanks Nikolay,

I'll keep my eye out for it.
0
Michael DeMond
Top achievements
Rank 1
answered on 18 May 2010, 09:37 PM
test
0
James DAmour
Top achievements
Rank 1
answered on 04 Jun 2010, 05:38 AM
I guess this was not included in the latest SP2 release.
0
James DAmour
Top achievements
Rank 1
answered on 04 Jun 2010, 02:54 PM
Nikolay,

could you describe to me how to retemplate the point and change its width & height? 

Thank you,
Nelson
0
Accepted
Nikolay
Telerik team
answered on 07 Jun 2010, 01:00 PM
Hello James DAmour,

In order to edit the size of the PointMarks you need to create a style in the following manner :

   <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="10" 
         Height="10"
         Stretch="Fill">
    <Path.Data>
         <PathGeometry x:Name="PART_PointMarkPathGeometry" />
    </Path.Data>
      </Path>
    </Canvas>
  </ControlTemplate>
 </Setter.Value>
</Setter>
</Style>

and in code behind :
Style customStyle = this.Resources["CustomStyle"] as Style;
RadChart1.DefaultSeriesDefinition.PointMarkItemStyle = customStyle;

Hope this would be helpful for you.

Kind regards,
Nikolay
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
James DAmour
Top achievements
Rank 1
answered on 08 Jun 2010, 07:11 AM
Thanks Nikolay - that helps out a lot until the fix comes.

Regards,
Nelson
Tags
Chart
Asked by
James DAmour
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
James DAmour
Top achievements
Rank 1
Michael DeMond
Top achievements
Rank 1
Share this question
or