datastorm-open / rAmCharts

API for Amcharts
48 stars 16 forks source link

Number formatting for amAngularGauge() #96

Closed ghost closed 3 years ago

ghost commented 4 years ago
library(rAmCharts)
amAngularGauge(10, text = "%")

Is there any way to format the 10% at the bottom like reducing the distance between '10' and '%', styling '%'etc? Any pointer will be highly appreciated.

Thanks,

bthieurmel commented 3 years ago

Hi,

Of course. You just have to get amAngularGauge output and then you can add all amCharts parameters you want using list like this :

library(rAmCharts)
a <- amAngularGauge(10, text = "%")

api()
# see http://docs.amcharts.com/3/javascriptstockchart/GaugeAxis

a@axes[[1]]$bottomText <- "10%"
a@axes[[1]]$bottomTextColor <- "red"

a