How to put category axis labels at bottom when chart have +ve and -ve values.

6 posts, 0 answers
  1. Mohsin
    Mohsin avatar
    28 posts
    Member since:
    Feb 2011

    Posted 12 Jun 2012 Link to this post

    Hi Team,

    I am having problem with Bar chart. My chart has both -ve and +ve values but category axis labels are not at the base line. Please see attached image.

    I need that 1-2009, 1-2007, 1-2008 below -25...in other worrds i need to make the base line -25 if there are -ve values and 0 for +ve values.

    Can any one from the team please tell me how to do that?

    Urgent response will be appreciated.

    Thanks,
    Mohsin
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 12 Jun 2012 Link to this post

    Hi Mohsin,

    At present the such functionality is not supported in Kendo UI DataViz and there is no suitable workaround. We will appreciate if you submit that idea as a feature request at our UserVoice page so the community can evaluate and vote for it. If this suggestion turns out to be popular, we will consider its implementation for a future release. 

    Greetings,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Mohsin
    Mohsin avatar
    28 posts
    Member since:
    Feb 2011

    Posted 06 Aug 2012 Link to this post

    Hi Iliana,

    Can I have an update on this.
    Does the new version contains solution for said problem?

    Thanks,
    Mohsin
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 06 Aug 2012 Link to this post

    Hello Mohsin,

    I am afraid such functionality is not available in Kendo UI DataViz. Unfortunately its implementation is still not scheduled, but if you are interested in what is coming next you may take a look at the official roadmap.
     
    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Ian
    Ian avatar
    73 posts
    Member since:
    Jun 2013

    Posted 23 Aug 2013 Link to this post

    It can be done with Kendo. Here's how I do it in MVC:

                                  Html.Kendo().Chart<AccountPerformance>(Model.Results)
                                                    .Name("chartPCTAvgAnnual_" + chartId)
                                                    .Title("% Return")
                                                    .Legend(legend => legend.Visible(false))
                                                    .Series(series =>
                                                        series.Column(model => model.Metrics.Return)
                                                        .Name(Model.ColumnTitle)
                                                        .Labels(false)
                                                    )

                                                    //Ading an extra axis lets us put the lables on bottom       
                                                    .ValueAxis(axis => axis.Numeric()
                                                           .AxisCrossingValue(0, int.MinValue))
                                                    .CategoryAxis(axis => axis
                                                           .Labels(false))
                                                    .CategoryAxis(axis => axis
                                                            .Categories(model => model.ObservationDescription)
                                                            .Labels(builder => builder.Rotation(45))
                                                            .Line(line => line.Visible(false))
                                                        )                                                    
                                                        
                                                        
                                                     .SeriesDefaults(builder => builder.Column().NegativeColor("#BE2D55").Color("#C0BD7F"))
                                                    .Tooltip(tooltip => tooltip
                                                        .Visible(true)
                                                        .Color("white")
                                                        .Background("black")
                                                        .Format("{0:P2}")
                                                        .Template("#= value #")
                                                    )                                                         
                                                    .Render();
  6. Paul
    Paul avatar
    108 posts
    Member since:
    Jun 2010

    Posted 02 Feb in reply to Ian Link to this post

    This is awesome, thank you!
Back to Top