MangoTheCat / radarchart

Implementation of the radar chart from chart.js library
Other
68 stars 25 forks source link

Pass-through options should merge with defaults #39

Open dougmet opened 7 years ago

dougmet commented 7 years ago

As pointed out here: http://stackoverflow.com/questions/40016432/manipulate-chart-js-based-plots-in-r-radarchart

chartJSRadar(skills, scale=list(gridLines=list(color="black")))

should work. You can't add options like scale as passthrough because it tries to match with other arguments and then there won't be a proper list merge.

I propose picking up the major arguments, such as scale, title, legend and tooltips and then using a modifyList call.

allaina commented 5 years ago

Hello, Has this bug been corriged? I have seen that a fork seems to have been done. But using the package R downloaded from the CRAN, I still get this bug. Thank you in advance for your answer!

dougmet commented 5 years ago

Hi. Afraid not, and unfortunately it's time to admit I don't have time to support this package. If it's been fixed in the fork and they want to PR then great. Or if sufficient advancement has been made they may wish to approach about a takeover.

nahuel89p commented 5 years ago

Hi. Afraid not, and unfortunately it's time to admit I don't have time to support this package. If it's been fixed in the fork and they want to PR then great. Or if sufficient advancement has been made they may wish to approach about a takeover.

I

As pointed out here: http://stackoverflow.com/questions/40016432/manipulate-chart-js-based-plots-in-r-radarchart

chartJSRadar(skills, scale=list(gridLines=list(color="black")))

should work. You can't add options like scale as passthrough because it tries to match with other arguments and then there won't be a proper list merge.

I propose picking up the major arguments, such as scale, title, legend and tooltips and then using a modifyList call.

Hi. I found this extremely useful for my webapp. But since my app has a dark theme, I need to switch the grid colors to white. If I understood right I can achieve this with a "modifyList"? I'm sorry I struggling to understand but didn't succeed at the moment. The radarplot works just fine in Shiny; being able to change the colors would be a great hit. Could you provide one more hint as to how to get this done?

nahuel89p commented 5 years ago

This is the argument line so far

chartJSRadar(radardf,c("PrecioM2","Sup. Edif","Robo Viol.","Socioeconómico", "Verdor"), main = "Gráf. de Radar, por deciles", maxScale = 10, scaleStepWidth = 10, scaleStartValue = 0, labelSize = 10, addDots = TRUE, showToolTipLabel = TRUE, showLegend = FALSE, lineAlpha = 1, polyAlpha = 0.5, responsive = TRUE, colMatrix = col2rgb(c("red", "forestgreen", "navyblue")))