Peter Krauss
Peter Krauss

Reputation: 13920

Translate VEGA-Lite or VEGA chart specification to Grafana

My preferred chart specification language is VEGA-Lite (that can be compiled to VEGA)... But I need to translate later to a fragment into a complete template of Grafana dashboard specification.

It is possible to do automatic or semi-automatic translation? Or maybe there are a good guide, explaining the main "clues for translation".


NOTES

Upvotes: 3

Views: 780

Answers (1)

Jan Garaj
Jan Garaj

Reputation: 28626

Sure, it is possible to write translation/parser.

But:

  • I wouldn't expect that someone already made it -> you will need to code it
  • Grafana functionality is not the same as VEGA-Lite functionality -> you will have undefined cases
  • Grafana dashboard model is not very well documented -> you may need reverse engineering and model can be changed before minor Grafana releases (for example recent Grafana 7.0.0 has schemaVersion 25 -> 25 different dashboard models exists historically = 25 different grammars if you want comprehensive implementation)

Go ahead if you have time and resources. https://grafana.github.io/grafonnet-lib/ can be useful here.

Upvotes: 2

Related Questions