ZingChart: How to set the text angle on scales and other objects

Setting the text angle is simple as a single attribute called fontAngle  (or font-angle  if you use JSON). You should put the attribute in the object you wish to angle the font on. While you could always put fontAngle  in the globals  object but this applies to all text and may cause you more work to manage all text in the chart.  

Example

// snip

 	globals: {
 	  fontAngle: -45
 	},
 	title: {
 	  text: 'Font Angle Demo',
 	  fontAngle:0
 	},
 	plot: {
 	  tooltip: {
 	    fontAngle:0
 	  },
 	  valueBox: {
 	    text: '%kt -> %v',
 	    fontAngle:0
 	  }
 	},
 	scaleX: {
 	  labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
 	  item: {
 	    fontAngle: 35
 	  }
 	}


// snip
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us