0

I have several dc.js charts in a dashboard and would like to allow the user to view a selected chart is a modal window that can be resized. Does anyone have suggestions or examples?

Chris Wolcott
  • 302
  • 1
  • 3
  • 9

1 Answers1

1

I don't think this is dc.js related exactly. More a html / javascript solution for showing a modal and providing resize options - then writing extra javascript so the dc.js chart resizes nicely with the modal.

Does it have to be a modal? An easier solution, in my opinion, would be to provide the ability to expand/resize/drag n drop the existing chart div - this can be done using a javascript library like gridster.js

Kevin
  • 136
  • 9
  • Thanks, I was being a little lazy and checking to see if someone already had a reuse function that placed the currently selected chart into a modal so the user could look at the chart in more detail rather than in a crowded dashboard. I have looked at gridster.js a couple months ago but have not had the chance to integrated into a couple of our pages. When I was relooking at it this weekend I also found gridstack which seems to be more active. Will probably play around with some test cases tomorrow. – Chris Wolcott May 21 '17 at 02:07
  • Did you find anything that did the job you needed? I found this question that seems to work for a modal that displays an existing div [here](https://stackoverflow.com/questions/27544575/can-you-copy-an-existing-div-to-a-modal-dialog) I also used jQuery UI 'sortable portlets' for drag and drop functionality - [jQuery UI](https://jqueryui.com/sortable/#portlets) – Kevin May 24 '17 at 21:36