christabor/flask_jsondash

Allow tabbable types for multiple charts in one "widget"

christabor opened this issue · 0 comments

It would really useful to show the same set of data in multiple formats in one single "area" of the dashboard. This could be accomplished using bootstrap tabs, and then putting each chart inside of it.

One way to allow both charts with the current schema (being decoupled), is to have a "links" parameter that will link two or more charts into one "tab".

e.g.

{
  "name": "chart1",
  "width": 200,
  "height": 200,
  "dataSource": "foo/bar.json",
  "guid": "guid1",
  "links": "guid2"
},
{
  "name": "chart2",
  "width": 200,
  "height": 200,
  "dataSource": "foo/bar.json",
  "guid": "guid2"
}

Also, it shouldn't be necessary to have both (or all) charts linking to each other, uni-directional links should work fine.

Potential pitfalls:

  1. Determining which chart data should be used for all of them (e.g. do they share width, height, inputs?