How to draw gauge chart in R?

后端 未结 4 830
臣服心动
臣服心动 2021-01-30 19:08

How can i draw a following plot in R?

  Red = 30
  Yellow = 40
  Green = 30 

  Needle at 52. 

Pls help me out as i am in great need.

4条回答
  •  感情败类
    2021-01-30 19:22

    Flexdashboard has a simple function for guage chart. For details take a look at https://rdrr.io/cran/flexdashboard/man/gauge.html

    You can plot the chart using a simple call like:

    gauge(42, min = 0, max = 100, symbol = '%', 
    gaugeSectors(success = c(80, 100), warning = c(40, 79), danger = c(0, 39)))
    

提交回复
热议问题