I want have a stack barplot made in ggplot2 and Im applying the ggplotly() command to transform it into a interactive plotly graphic.
The issue now is that I want the plot to display on hover each value depending on the ITEM.
Here is what I mean...
The plot is displaying a cumulative value for each of the items, so for example the green bar legend is displaying the red bar(because it comes before) PLUS the green bar value itself.
I want each legend to display their own value based on the ITEM.
Here is the DF:
> plotlydata
Fecha Item Suma
1 05/16 BAB 20540
2 05/16 BZO 1000
3 05/16 CLZ 1400
4 05/16 CMS 15000
5 07/16 BAB 400
So green bar instead of displaying 21540 (sum of previous 20540 and the own 1000) would display its own value of 1000.
If you get what I mean. Is there any way of doing this?
Dont want plotly to display the cummulative values.