How do I make smaller dots in Silverlight Toolkit LineChart?

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

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

you will see several points on LineChart that are relatively large.

As far as I know, every point in the Chart is an ellipse. For this, I created a style in the 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;

      

It didn't work, so after that I decided: I am basically recreating a structure that shows 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>

      

That didn't work either, but I think there must be a solution for this, because if I use SilverlightSpy I can access all the properties, and if I change there, that point decreases. How can I make smaller dots on Silverlight LineChart?

+2


source to share


1 answer


The July 09 source code shows the default width and height to be 8, so I'm not sure if setting them to 10 will 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 TargetType is LineDataPoint.

+3


source







All Articles