javascript - Bar chart with longer names -


i have quite simple bar chart. http://jsfiddle.net/6m2t6/3/ problem should have quite long names of lpu in app , overlap each other can see in fiddle.

data = '[{"lpu":"some long name (very long) #1","amount":"1"},{"lpu":"some long name (very long) #2","amount":"0"},{"lpu":"some long name (very long) #3","amount":"0"},{"lpu":"some long name (very long)","amount":"1"}]'; 

what best way prevent overlaping , have possibility view full name?

you should rotate labels on x axis.

this great blog post on that: http://www.d3noob.org/2013/01/how-to-rotate-text-labels-for-x-axis-of.html

also remember put more space on bottom of chart leave room labels

hope helps.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -