algenty / grafana-flowcharting

Flowcharting, plugin for Grafana to create complexe visio's draws style like technical architectures, floorplan, diagrams, hierarchical schema based on draw.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamically creating chart

craftzneko opened this issue · comments

Hi, im looking to create a dashboard showing a users hierarchy using flowcharting. I am trying to see if this would be possible. When a user loads a dashboard i can capture the user email and query a sql table to get their direct reports, but how can i dynamically create the csv or xml from that

Do I understand correctly from your question that you want to show the direct reports graphically somehow using this plugin? For this the drawing itself (which is usually static in flowcharting) may need to change on the fly. It is already possible to launch your own editor/converter instead of the specified one (https://embed.diagrams.net) while editing the panel. You would then indeed need to get the result of the query to generate the new drawing, and preferably have the query result (that is usually in JSON format) trigger execution of your editor/converter.

P.s. Once you have the query setup in a panel, you can of course always export the data via inspect / data / Download CSV. But that would not dynamically usable.

There may be other plugins that may be applicable for your dynamic charts:

  • plugins that can can be programmed with e.g. javascript when measurement come in
    • e.g. SVG / HTML panels
  • plugins that can show structure from measurements, e.g.
    • node graph panel
    • topology panel, but that does not seem to work
  • plugins that use static diagrams could be adapted to add dynamic structure
    • e.g. the diagram panel, flowcharting panel

Kind regards,
Dennis

Thanks @bijwaard this may be a bit beyond me creating my own editor. I will look into some of the other options suggested! Cheers