meln5674 / grafana-mongodb-community-plugin

Open Source Grafana Plugin for querying MongoDB
GNU Affero General Public License v3.0
130 stars 17 forks source link

How to remove the Label Fields name and Value Fields name in tooltip and legend #10

Closed auntieyi closed 1 year ago

auntieyi commented 1 year ago

Hi,

My options as below:

Label Fields: productName
Value Fields: price

The tooltip and legend are showing the Label Fields name and Value Fields name like this:

productName=AAAA price 123
productName=BBBB price 345

How can make it showing as following?

AAAA 123
BBBB 345
meln5674 commented 1 year ago

I think the Legend Format will do what you're looking for, try setting

Legend Format: {{ .Labels.productName }}
auntieyi commented 1 year ago

I works with v0.2.0+rc3, thank you!