views:

314

answers:

1

By default if you take a look at the Silverlight toolkit demo site,

http://silverlight.net/content/samples/sl3/toolkitcontrolsamples/run/default.html

you will see on the LineChart some points wich are relatively big.

As far as i know every point on the Chart is an Ellipse. For that i created the style on xaml file.

  <Style x:Name="ChartLineBar" TargetType="Ellipse">
       <Setter Property="Width" Value="10"/>
       <Setter Property="Height" Value="10"/> 
   </Style>

and bind like this:

series.DataPointStyle = Resources["ChartLineBar"] as Style;

This is not worked,so after that i decided to like that: I basically recreate the structure wich are showing the points.

       <Style x:Name="ChartLineBar" TargetType="chartingToolkit:LineDataPoint">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="chartingToolkit:LineDataPoint">
                    <Grid x:Name="Root">
                        <Ellipse Width="10" Height="10" Visibility="Visible" Opacity="1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

This is not worked too,but i think it should exist a solution for that because,if i use the SilverlightSpy, i can acces all the propertys and if i modify there the point's is decreasing. How can i make smaller points on a silverlight LineChart?

+2  A: 

The July 09 source code shows the default width and height to be 8 so I'm not sure setting them to 10 would make them smaller.

Have you tried it like this:-

<Style x:Name="ChartLineBar" TargetType="chartingToolkit:LineDataPoint">
    <Setter Property="Width" Value="10"/>
    <Setter Property="Height" Value="10"/> 
</Style>

Note that the TargetType is LineDataPoint.

AnthonyWJones
This is working,i tried this solution first,but obviously a made a mistake there.Thanks!
Sad0w1nL1ght