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

scale intervals on x-axis of KendoUI Charts

4 Answers 981 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Babar
Top achievements
Rank 1
Babar asked on 15 May 2013, 10:16 AM
I have an array for categoryAxis data as follows:

 
categoryAxis: {
                    categories: ["30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88"],
 
                    title: {
                        text: "Age"
                    }
                },


and I want the chart to display this data with an interval of 5; such as:

30......35......40......45... and so on.

how is this possible?

4 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 15 May 2013, 11:26 AM
Hi Babar,

You can achieve this as set labels.step 5 for the categoryAxis. I.e.: 
$("#chart").kendoChart({
  //....
  categoryAxis: {
     //....
     labels: {
         step: 5
     }
  }
});

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!
0
Babar
Top achievements
Rank 1
answered on 15 May 2013, 11:47 AM
Thanx. It helped :-)
0
RamaKrishna P
Top achievements
Rank 1
answered on 22 Aug 2013, 11:14 AM
Hi Iliana Nikolova, I have struck with scaling part(i.e not steps, scaling ticks on categoryAxis ) merged with each other bcz huge values. I am expecting  ticks along with steps only.
categoryAxis: {
                                                        field: "timestamp",
                                                        //categories:[251, 501, 751, 1001, 1251, 1501],
                                                        labels: {
                                                            step: 250,
                                                            rotation: 0
                                                        },
                                                        //baseUnit: 250,
                                                        majorGridLines: {
                                                            visible: true
                                                        }
                                                    },
0
Iliana Dyankova
Telerik team
answered on 26 Aug 2013, 08:34 AM
Hi RamaKrishna,

I am afraid setting step on the majorTicks / minorTicks is not supported in Kendo UI Chart at this point, however we keep this idea in mind for future releases. Please excuse us for the inconvenience caused.
 

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Babar
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Babar
Top achievements
Rank 1
RamaKrishna P
Top achievements
Rank 1
Share this question
or