Open trotter12 opened 9 years ago
Hi,
PFB my code:
lmfit = lm( as.matrix(Data[1])~as.matrix(Data[2]) ) dat = fortify(lmfit, data = Data)
names(dat) = gsub('.', '_', names(dat))
p1 <- rPlot(OAS~OASD, data = dat, type = 'point') p1$layer(y = '_fitted', copy_layer = T, type = 'line', color = list(const = 'red'), tooltip = "function(item){#! return item.Cusip} !#") p1
Despite changing the value in the function for tooltip, I am still getting teh default x and y values. How can I change the text of the tooltip?
Thanks
I am not an expert, but it seems you have the first #! not in the beginning of the JavaScript code.
#!
I think it should be:
tooltip = "#! function(item) { return item.Cusip; } !#"
Hope that helped.
Hi,
PFB my code:
lmfit = lm( as.matrix(Data[1])~as.matrix(Data[2]) ) dat = fortify(lmfit, data = Data)
names(dat) = gsub('.', '_', names(dat))
p1 <- rPlot(OAS~OASD, data = dat, type = 'point') p1$layer(y = '_fitted', copy_layer = T, type = 'line', color = list(const = 'red'), tooltip = "function(item){#! return item.Cusip} !#") p1
Despite changing the value in the function for tooltip, I am still getting teh default x and y values. How can I change the text of the tooltip?
Thanks