This is a migrated thread and some comments may be shown as answers.

Bar Chart Grouping CategoryAxis Values which are identical

5 Answers 92 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Jako
Top achievements
Rank 1
Jako asked on 29 Oct 2014, 12:42 PM
Hello

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

Regards

5 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 31 Oct 2014, 08:52 AM
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!
 
0
Jako
Top achievements
Rank 1
answered on 31 Oct 2014, 09:24 AM
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)
                    )
                ))
0
Iliana Dyankova
Telerik team
answered on 04 Nov 2014, 09:32 AM
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!
 
0
Walid
Top achievements
Rank 1
answered on 29 Sep 2016, 02:47 PM

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

 

0
Iliana Dyankova
Telerik team
answered on 30 Sep 2016, 12:37 PM
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.
 
Tags
Charts
Asked by
Jako
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Jako
Top achievements
Rank 1
Walid
Top achievements
Rank 1
Share this question
or