labels are very small in in Bootstrap modals
loulin opened this issue · 2 comments
loulin commented
The scripts are copied from your example. But when put in modals, the labels are corrupted. See http://plnkr.co/edit/lAjGHx9lk8DgTOALrVMs
kristw commented
This is probably because the chart was created before the modal is materialized. The trick I use to get bounding boxes for labels may not work correctly. Try to explicitly call an update when the modal is shown.
var timeline = new d3KitTimeline(...);
$('#myModal').on('shown.bs.modal', function () {
timeline.visualize();
})
There are two events shown.bs.modal
and show.bs.modal
. Give them a try.
Reference: http://getbootstrap.com/javascript/#modals
Please let me know how it goes.
loulin commented
Thanks very much. I did it with angular ui-bootstrap. timeline.visualize()
works great after the data is ready.