I am trying to implement a diagram using a jQuery plugin. I have to show labels instead of numbers on the x axis, and these labels can be very long.
I can rotate the labels using CSS so that they do not overlap:
.flot-x-axis div.flot-tick-label { transform: translateX(50%) rotate(20deg); transform-origin: 0 0; -ms-transform: translateX(50%) rotate(20deg); -ms-transform-origin: 0 0; -moz-transform: translateX(50%) rotate(20deg); -moz-transform-origin: 0 0; -webkit-transform: translateX(50%) rotate(20deg); -webkit-transform-origin: 0 0; -o-transform: translateX(50%) rotate(20deg); -o-transform-origin: 0 0; }
However, using this solution, I get an unaesthetic blank space between the Y axis and its labels. See http://jsfiddle.net/QQkfy/2/
This is probably due to the fact that the shortcut is initially (i.e. preliminary CSS modifications) concentrated under the bars. Any ideas how I could overcome this problem?
jquery flot
Giacomo d'antonio
source share