Adding space at top of bar chart to allow labels above tallest bar

20 views
Skip to first unread message

yale...@intellifylearning.com

unread,
May 16, 2016, 10:24:41 AM5/16/16
to dc-js user group
Presently bar charts are scaling so highest value scales to top of chart. Want to change position of labels to on top of bar but having difficulty due to tallest bar scaling to top of chart allowing no room for label.

Gordon Woodhull

unread,
May 16, 2016, 10:32:02 AM5/16/16
to dc.js user group
The same problem often comes up with axis ticks and labels. 

dc.js doesn't automatically set the margins, because fitting svg to text is a pretty hard problem.

Instead, you need to set the margins manually with chart.margins():


On May 16, 2016, at 10:24 AM, yale...@intellifylearning.com wrote:

Presently bar charts are scaling so highest value scales to top of chart. Want to change position of labels to on top of bar but having difficulty due to tallest bar scaling to top of chart allowing no room for label.


--
You received this message because you are subscribed to the Google Groups "dc-js user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dc-js-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/c74c63e5-2453-428b-8527-c170b21a8f89%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages