How to set certain columns to Bubble Chart dataLabel in highcharts (Rcharts)?

109 views Asked by At

How to set "prd_nm" column to bubble chart's data label? I try to use "plot Options : format" option, but i can't find it.

data <- top30

 colnames(data) <- c('prd_rk', 'prd_nm', 'category', 'strategy', 'plc', 
'sales', 'purchases', 'customers', 'age', 'purchase_rate', 
'repurchase_rate')

hc <- hPlot(sales ~ purchases, data = data, type = "bubble", size = 
"customers", group = "strategy")

hc$plotOptions(series=list(dataLabels=list(enabled=TRUE, formmat= . 
{"y"})))

hc$set(height = 500)

hc$colors(palette)

hc
1

There are 1 answers

1
daniel_s On

You have a little typo there with formmat. Please try to change your code to:

hc$plotOptions(series=list(dataLabels=list(enabled=TRUE, format="{prd_nm}")))