Bar Chart Grouping CategoryAxis Values which are identical

6 posts, 0 answers
  1. Jako
    Jako avatar
    107 posts
    Member since:
    Apr 2012

    Posted 29 Oct 2014 Link to this post

    Hello

    Is there any manner in which I can group the value of similar categoryAxis as seen in attachment.

    Regards
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 31 Oct 2014 Link to this post

    Hi Jako,

    Could you please provide a runnable example which demonstrates your current implementation? This way I would be able to provide concrete recommendations and advice you further. Thank you in advance for your cooperation and time. 

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Jako
    Jako avatar
    107 posts
    Member since:
    Apr 2012

    Posted 31 Oct 2014 in reply to Iliana Nikolova Link to this post

    Hello

    Simplest form for runnable. Hope this is suffice.

     @(Html.Kendo().Chart(Model.ChartData)
                        .Name("VALBarChart")
                        .Theme("Silver")
                        .DataSource(ds => ds
                            .Sort(sort => sort.Add(new string[] {'Eastern Cape','Eastern Cape','Free state','Free State','Gauteng','Gauteng','Gauteng',}.Ascending())
                            .Sort(sort => sort.Add(new string [] {'Walmer Park','Vincent Park','Loch Logan','Mimosa Mall','Kollonade','Woodlands Boulevard','Green Stone'}).Ascending())
                        )
                        .ChartArea(chartArea => chartArea
                        .Background("#f2f2f2")
                        )
                        .Series(series =>
                        {
                            series.Column(new double []{6918593.98,3092998.52,5911436.17,4910089.43,5959073.22,7746128.67,5101108.77}).Tooltip(tooltip => tooltip
                                .Visible(true)
                                .Template("#=dataItem.Element#: Previous Year R #= kendo.toString(value,'n2') #"));
                                .Name("Previous Value")
                            series.Column(new double [] {7911276.87,3930888.66,5524456.24,5710436.85,6838388.18,8801236.68,6318801.79}).Tooltip(tooltip => tooltip
                                .Visible(true)
                                .Template("#=dataItem.Element#: R #= kendo.toString(value,'n2') #"))
                                 .Name("Value");
                        })
                        .Legend(legend => legend
                            .Visible(true)
                            .Position(ChartLegendPosition.Top)
                        )
                        .CategoryAxis(axis => axis
                            .Categories(new string [] {'Walmer Park','Vincent Park','Loch Logan','Mimosa Mall','Kollonade','Woodlands Boulevard','Green Stone'}).Labels(labels => labels.Rotation(270))
                         )
                        .ValueAxis(axis => axis.Numeric()
                            .Labels(labels => labels
                                .Format("R {0:n2}")
                                .Skip(2)
                                .Step(2)
                        )
                    ))
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 04 Nov 2014 Link to this post

    Hi Jako,

    The provided code snippet does not work and is not enough in order to determine the exact reason for the illustrated issue. Please provide an isolated runnable example which I can test locally - I will check it right away and do my best to help. Thank you in advance for your understanding.

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Walid
    Walid avatar
    19 posts
    Member since:
    May 2013

    Posted 29 Sep Link to this post

    Hello,
    This is an old post, but I have a similar scenario.
    Here is a jsBin for a runable version.
    I would like to group similar labels on 2nd & 3rd categoricalAxis, is this possible?
    Also it would be great to have majorGridLines visible only on 3rd categoricalAxis change

    Thanks!
    Walid

     

  7. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 30 Sep Link to this post

    Hi Walid,

    This scenario is not supported by Kendo UI Chart. Actually, this idea has been already submitted as a feature request at our Acervate portal - you may cast a vote, leave a comment or monitor the community's interest in it here The more vote the suggestion collects, the higher priority will have when planning for a release.

    Regards,
    Iliana Nikolova
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top
Kendo UI is VS 2017 Ready