Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a proplem with to much data on the independentvalue X axis. I have 100 datapoint in my lines series. The problem is that 100 dates under the chart is to much for the size of my chart.

Is there a way to have the 100 datapoints but only display each 10 or 20 of the dates under the chart?

XML
<toolkit:Chart x:Name="YearDayChart" Title="Chart Title" d:LayoutOverrides="Height" BorderThickness="0" >
                <toolkit:Chart.Axes>
                    <toolkit:LinearAxis Orientation="Y" Interval="20" Maximum="100" ShowGridLines="True" />
                    <toolkit:CategoryAxis Orientation="X" SortOrder="Ascending">
                        <toolkit:CategoryAxis.AxisLabelStyle>
                            <Style TargetType="toolkit:AxisLabel">
                                <Setter Property="RenderTransformOrigin" Value="0.5,0.8" />
                                <Setter Property="RenderTransform">
                                    <Setter.Value>
                                        <CompositeTransform TranslateY="10" Rotation="-90" />
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="VerticalAlignment" Value="Top" />
                                <Setter Property="HorizontalAlignment" Value="Right" />
                                <Setter Property="FontFamily" Value="Arial" />
                                <Setter Property="FontSize" Value="10.667" />
                            </Style>
                        </toolkit:CategoryAxis.AxisLabelStyle>
                    </toolkit:CategoryAxis>
                </toolkit:Chart.Axes>
                <toolkit:LineSeries Title="Cpu" ItemsSource="{Binding}" DependentValuePath="cpu" IndependentValuePath="period" />
                <toolkit:LineSeries Title="Memory" ItemsSource="{Binding}" DependentValuePath="memory" IndependentValuePath="period" />
                <toolkit:LineSeries Title="Paging" ItemsSource="{Binding}" DependentValuePath="paging" IndependentValuePath="period" />
            </toolkit:Chart>
Posted
Updated 23-Sep-11 0:48am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900