Hi all,
I develop a datasource plugin and have a specific time formatting criteria. Available out of the box units don’t fit all criteria. There are 2 possible solutions:
- Provide possibility to register a new unit and its formatting function from the plugin. So that I can specify it in the
field.config.unit
property. - Idea mentioned in the following issue: Field.display:DisplayProcessor ignored by displayProcessor.ts or the documentation of Field is wrong. (code or doc bug). · Issue #37237 · grafana/grafana · GitHub.
Specifyingfield.display
function (grafana/packages/grafana-data/src/types/dataFrame.ts at main · grafana/grafana · GitHub) will provide functionality I need and limit it to only my datasource without exposing it to other plugins.
What do you think about that? Is there any other ways to solve my problem?
I’m happy to contribute a fix if we agree on the solution.
Thank you in advance!
Dima