Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ChartView > Sort Horizontal Axis

Not answered Sort Horizontal Axis

Feed from this thread
  • Dfgsdfg avatar

    Posted on Mar 26, 2012 (permalink)

    I just download telerik for WPF.

    I use ChartView and i would like to bind String on Horizontal Axis and sort it on an other binding.

    Is it possible ?

                <chart:RadCartesianChart Name="BarChart" Palette="Metro" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
                    <chart:RadCartesianChart.HorizontalAxis>
                        <chartView:CategoricalAxis Title="HorizontalAxis" LabelFitMode="MultiLine" LabelStyle="{StaticResource AxisLabelStyle}" >
                            <chartView:CategoricalAxis.TitleTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding StepPosition}" Margin="0,6,0,10" Style="{StaticResource AxisTitleStyle}" />
                                </DataTemplate>
                            </chartView:CategoricalAxis.TitleTemplate>
                        </chartView:CategoricalAxis>
                    </chart:RadCartesianChart.HorizontalAxis>
     
                    <chart:RadCartesianChart.VerticalAxis>
                        <chartView:LinearAxis  Title="VerticalAxis" LabelStyle="{StaticResource AxisLabelStyle}" >
                            <chartView:LinearAxis.TitleTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Margin="0,6,0,10" Style="{StaticResource AxisTitleStyle}" />
                                </DataTemplate>
                            </chartView:LinearAxis.TitleTemplate>
                        </chartView:LinearAxis>
                    </chart:RadCartesianChart.VerticalAxis>
     
                    <chartView:BarSeries ItemsSource="{Binding Inventory.View}" ValueBinding="CountBatch" CategoryBinding="StepPosition" 
    StringBinding="Step"
    />                                           </chart:RadCartesianChart>

    Reply

  • Petar Marchev Petar Marchev admin's avatar

    Posted on Mar 29, 2012 (permalink)

    Hello,

    The chart view does not sort categories. If you want to see the categories in some order - you will need to sort the data prior to setting the chart view's items source.

    I do not recognize this StringBinding property of the BarSeries. What would you expect that such a property will do?

    Regards,
    Petar Marchev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ChartView > Sort Horizontal Axis