Closed selimrbd closed 8 years ago
HI @SelimRaboudi,
I think you can program this chart handling the right highcharts events with javascript and updating the chart data. But I think this need more highcharts/javascript knowledge. I finded this example http://jsfiddle.net/highcharts/nsuA6/ and modified into this http://jsfiddle.net/tznwoc09/. It can be a start point to work. An alternative solution will be using shiny but maybe you need a standalone chart.
But going further. I think this funcionality is really interesting, for example when you are binning a variable and see rate from other varible in each group and you visualize and get the new categories/grups back to R. It can be treated like a shinygadet http://shiny.rstudio.com/articles/gadgets.html. It sounds interesting.
Anyway I think this can be achieve with highcharter but it will be need a lot of this things https://github.com/jbkunst/shiny-apps/blob/master/highcharter/server.R#L152.
So answer your points.
I think this is not a feature, It need to be coded. Maybe after the new release of highcharter I will have time to work in this idea (chart and gadget). If you can start It would be happy if you show me and update ;)!
Tell me what you think.
Regards,
Hi Joshua,
Thanks for your reply
Yes, the output I'm after is indeed a Shiny Gadget (as a RStudio Addin), where a user could create groups through window dragging, and get the corresponding code immediately. It would be extremely useful to intuitively create groups while preserving reproducibility.
At first I thought you could only pass strings to JS objects through htmlwidgets which I thought would be a limitation for the data exchange required between R and JS (points positions). But then I found out about JS() I think I'll start working towards that. I'll first improve my knowledge in highcharts/htmlwidgets, and then see how this could be done.
Will keep you updated on this issue if I do any progress :)
Regards,
Ok @SelimRaboudi :wink:
Luck with that! I'll close the issue. If I have some news I'll talk to you here.
Regards,
I would like to get back data point indexes (through a window box drawn by the user) into R, do some processing, and update accordingly the highcharter graph. (without redrawing it).
example: I selected "Employed", "Housewife" and "Retired" by drawing a window:
I now want to group these 3 levels into 1, and assign the new level the mean value of the old levels.
Would be glad to contribute to add this feature, if you think it's feasible