openbrainsrc / Radian

Plotting with AngularJS
http://openbrainsrc.github.io/Radian/index.html
168 stars 19 forks source link

"Do something about printing" #21

Closed ian-ross closed 5 years ago

ian-ross commented 11 years ago

At the moment, if you have plots with UI elements (e.g. <plot-stack>), there's no way to produce a reasonable plot for printing. Here's one possible approach:

  1. The rendering of the "All" tab in plot stacks that's used in the BayesHive model builder plots is moved into Radian, so that <plot-stack> has a new ALL-TAB attribute.
  2. There's a global Radian option that can be set (via a factory function or something) to say whether you're rendering for printing. (I'd probably make it possible to do this in a couple of ways, either by just saying "yes, printing"/"no, interactive" or by specifying a CSS class for print elements.)
  3. When rendering <plot-stack>: if not in a printing context, proceed as normal; if in a printing context, render only the grid from the "All" tab instead of the whole plot stack.

I think this approach will work OK for <plot-stack>, but this question is going to come back again once we have more interactive elements (it applies now for the "interim" UI stuff, but I'm not really worried about that since it's going to be obsolete soon).