Horizontal Bar chart

2 posts, 0 answers
  1. nixon
    nixon avatar
    7 posts
    Member since:
    Dec 2006

    Posted 08 Apr 2010 Link to this post

    Hi there, we are facing some problems with the horizontal bar chart, we cant get the x-axis (which in this case is the y-axis actually) display the numberformat as we wants. Our data collection contains only integers but the axis displays this as decimals. Please have a look on attached picture.

    Further, do you have any examples in doing this in xaml, it seems that you on telerik is totally code behind oriented, all your examples are done that way which in my opinion is a little bit the opposite than the rest of the community are doing things, declartive.
    Also i would like to give a somewhat negative comment about your examples, first you are mostly only showinng examples for codebehingd. Secondly, i dont think the examples are showing your feateures very well, take for instance the horizontal charts, here you are never showing to your customers how to display strings instead of integers both for x and y axis. At the moment it isnt very much RAD development for us.

    Regards Niclas

     <telerikChart:RadChart x:Name="HorizontalChart" Height="300" Margin="40" 
                                    Style="{StaticResource RadChartStyle1}" ItemsSource="{Binding ManufacturersCollection}">  
                                    <telerikCharting:ChartDefaultView ChartLegendPosition="Right">  
                                            <telerikCharting:ChartLegend x:Name="chartLegend" Header="" Background="White" 
                                                    BorderBrush="{x:Null}" VerticalContentAlignment="Top" Padding="5" 
                                                    HorizontalContentAlignment="Right" HorizontalAlignment="Center" /> 
                                            <telerikCharting:ChartArea Background="White" ItemToolTipDelay="2">  
                                                    <telerikCharting:AxisX /> 
                                                <!-- Transactions Y axis --> 
                                                    <telerikCharting:AxisY MajorGridLinesVisibility="Visible" 
                                                            DefaultLabelFormat="#VAL" StripLinesVisibility="Collapsed" /> 
                                    <telerikCharting:HorizontalBarSeriesDefinition /> 
                                            <telerikCharting:HorizontalBarSeriesDefinition ShowItemLabels="False" 
                                                    ItemToolTipFormat="#DATAITEM.Key: #DATAITEM.Value{#}" 
                                                    LegendDisplayMode="DataPointLabel" /> 
                                            <telerikCharting:ItemMapping DataPointMember="YValue" FieldName="Visits" /> 
                                            <telerikCharting:ItemMapping DataPointMember="LegendLabel" FieldName="Name" /> 
                                            <telerikCharting:ItemMapping DataPointMember="XCategory" FieldName="Name" /> 
  2. Giuseppe
    Giuseppe avatar
    2363 posts

    Posted 13 Apr 2010 Link to this post

    Hi nixon,

    Thank you for your feedback.

    Onto your questions:
    • If you would like to display integer step on the AxisY, you need to set AxisY.AutoRange to false and specify the AxisY.MinValue / MaxValue / Step properties manually (the AxisY does not support this feature automatically).
    • Indeed, currently the chart examples do contain lots of code behind code and we recognize the need to modify them so they become more declarative and xaml-friendly. We hope we will be able to address this task for the Q2 2010 release of the control (around July).
    • You can find a help article on creating categorical charts here (note that categories are supported only for the AxisX, and not for AxisY). The AxisX support for categories is universal (i.e. it does not depends on the specific series type) and that is why we decided not to add examples for each specific series type. Also, categories are featured on a number of examples in the demo application e.g. here, here, here, here, etc.

    Best wishes,
    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.
  3. DevCraft banner
Back to Top