Try   HackMD

Grafana 技巧 Float 浮點數對小數點位數做調整

Standard option -> Decimals -> 輸入數字 0(不顯示小數點) or N(顯示到小數點下第N位)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

可以看到所有的欄位都變成了小數點下三位數的浮點數

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

如果想要單獨對某行(column)做小數點位數的調整,請使用 Overrides

Fields with name -> 選擇想要調整該行的欄位名稱 -> Add override property
-> Standard option > Decimals -> 輸入數字 0(不顯示小數點) or N(顯示到小數點下第N位)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

可以發現只有該行單獨被改成不顯示小數點,此方法只要多寫幾個 Overrides 就可以分別對各行做客製化的修改

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

tags: Grafana tips float