0
votes

Is there a way to add the line break in the client side ? For example, I want the category axis label to be displayed as:

JUN   
2012

But my database (server) returns it as "JUN 2012" and I don't want to add \n there, but want to achieve it from client side.

Any ideas ?

1

1 Answers

0
votes

First Solution Try converting the date strings to objects and use \n in format

Link http://dojo.telerik.com/@harsh/iBaHe

$("#chart").kendoChart({
  categoryAxis: [{
    labels: {
      format: "{0:MMM \n yyyy}"
    },
    categories: [new Date("Jun 2011"), new Date("Jun 2012"), new Date("Jun 2013")]
  }],
  series: [{
    data: [1, 2, 3]
  }]
});