descartes icon indicating copy to clipboard operation
descartes copied to clipboard

Reorder dashboard graphs by drag-n-drop

Open obfuscurity opened this issue 12 years ago • 15 comments

Drag-n-drop graphs in a dashboard to change order of appearance.

obfuscurity avatar Jul 10 '12 19:07 obfuscurity

http://gridster.net/ recommended by @gorsuch.

obfuscurity avatar Jul 30 '12 17:07 obfuscurity

yeeeees. drag n' drop would be rad.

jnunemaker avatar May 09 '13 20:05 jnunemaker

:fire:

obfuscurity avatar May 09 '13 20:05 obfuscurity

@jnunemaker The plan was to store the arrangement as some sort of JSON object in dashboards.configuration.

obfuscurity avatar May 09 '13 20:05 obfuscurity

The more I think about it, we might need to come up with a custom solution that just deals with ordering. That, or we'll have to do away with the adjustable column layout. Gridster relies on coordinates within their grid. As soon as we start switching between 1 or 2 or 3 columns, it breaks the coordinate pattern.

@jnunemaker penny for your thoughts?

obfuscurity avatar May 09 '13 21:05 obfuscurity

What if each graph layout had its own ordering? The way I'd layout a 1 column graph is very different from a 2 or 3 column graph since they're ordered horizontally. If I'm using a 2 or 3 column graph, I'd try to line them up so spikes can line up vertically.

descartes - dashboard __ hookshot-9

technoweenie avatar May 09 '13 22:05 technoweenie

I think that's largely a good idea, although I like being able to adjust the layout with a single click (versus having to drag-n-drop everything to try new layouts).

obfuscurity avatar May 09 '13 22:05 obfuscurity

Maybe I haven't read everything thoroughly enough, but this is what I would do.

  • store order of graphs based on dashboard
  • show them in that order

Whatever you pick for columns at the top when looking at a dashboard decides how they are stacked.

Am I missing something? Again, I'm not sure familiar with descartes, but I like the idea of dashboards grouping graphs and graphs grouping metrics. One should be able to order the graphs in a dashboard and also the metrics in a graph.

On May 9, 2013, at 6:27 PM, risk danger olson [email protected] wrote:

What if each graph layout had its own ordering? The way I'd layout a 1 column graph is very different from a 2 or 3 column graph since they're ordered horizontally. If I'm using a 2 or 3 column graph, I'd try to line them up so spikes can line up vertically.

— Reply to this email directly or view it on GitHub.

jnunemaker avatar May 09 '13 23:05 jnunemaker

@jnunemaker No, that's pretty much what I had planned originally. The question imho is whether we should integrate Gridster, which uses coordinates rather than just ordering.

obfuscurity avatar May 10 '13 00:05 obfuscurity

Ah. Gotcha. I think ordering only is fine. It seems easier to me.

On May 9, 2013, at 8:18 PM, Jason Dixon [email protected] wrote:

@jnunemaker No, that's pretty much what I had planned originally. The question imho is whether we should integrate Gridster, which uses coordinates rather than just ordering.

— Reply to this email directly or view it on GitHub.

jnunemaker avatar May 10 '13 00:05 jnunemaker

Yeah, makes sense to me. Dunno if this meets @technoweenie's needs tho.

obfuscurity avatar May 10 '13 00:05 obfuscurity

It's fine. I'm a single column graph guy.

On Thu, May 9, 2013 at 6:37 PM, Jason Dixon [email protected]:

Yeah, makes sense to me. Dunno if this meets @technoweeniehttps://github.com/technoweenie's needs tho.

— Reply to this email directly or view it on GitHubhttps://github.com/obfuscurity/descartes/issues/9#issuecomment-17698325 .

Rick Olson http://github.com/technoweenie

technoweenie avatar May 10 '13 02:05 technoweenie

Cool beans. Ok, it seems the likeliest course is to get rid of the GraphDashboardRelations model and replace it with a serialized object in dashboards.configuration. I'll get on this soonish.

obfuscurity avatar May 10 '13 02:05 obfuscurity

Note to self: the more I think about this, fuck using a serialized object for ordering. It's going to make things like Graph#destroy an awful mess. Instead we'll add GraphDashboardRelation.index and deal with it in that model.

obfuscurity avatar May 10 '13 15:05 obfuscurity

/cc @bleything

obfuscurity avatar Jul 01 '13 21:07 obfuscurity