# Grafana 技巧 Value Mapping ## 將接收到的值(value)去映射(mapping)到想要的文字或 emoji😊 1.匯入 data source 後,在 **Edit panel** 右方找到 overrides,點選 **+Add field override**  2.選擇 **field with name**,找到你想做 value mapping 的欄位  3.選擇 **+Add override property**,找到 **Value mappings > value mappings**  4.選擇 **Add value mappings**,在 **Condition** 欄位填入想進行 mapping 的值(有四種輸入格式: **value, range, regex, special**),並在 **Display text** 填入要對應顯示的文字或符號  Condition 這邊我輸入格式以 range 做示範 value: 0~30 -> bad, 31~60 -> normal, 61~100 -> good  5.**Update**後即完成! 檢查 value 是否有依預期的判斷式進行變化  ### 補充: **Set Color** 可以進行顏色的更改 1.在 **+Add override property** 新增 **Cell display mode**,並將預設的 **Auto** 改成 **color text** 指定更改文字顏色(選擇 **color background** 可以更改欄位底色)  2.在 **value mappings** 裡右邊的 **Color** 選擇顏色  3.文字顏色變更完成!  ###### tags: `Grafana` `tips` `value mapping`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up