Next
Update
Prev
Default

You can create vertical text for axis labels using the JavaScript function which adds the carriage return ( \n ) to each character.

This sample chart is to show how to create vertical English text for the X-axis label. The name of the JavaScript function ( "labelFunc" ) is set to the value of the labelJsFunction attribute in the <CategoryAxis> element tag.

...
<Line2DChart ...  >
  <horizontalAxis>
    <CategoryAxis ... labelJsFunction="labelFunc" > 
  </horizontalAxis>
...
</Line2DChart>
...


function labelFunc(id, value)()
{
  var str = value;
  var len = str.length;
  var filterStr="";

  for( var i=0; i < len ; i++)
  {
    filterStr += str.substring(i,i+1) + "\n";
  }
  
  return filterStr;
}

© 2017 KoolChart. All rights reserved.