I am trying to format the data labels that appear when I hover over part of a chart I have created using Plotly. The label is currently showing like this. I would like for the label to only show profit.
My code for creating the plot is:
output$monthlyProfits <- renderPlotly({
ggplot(profitTemp, aes(x = Date, y = Profit)) + geom_line(aes(text=Profit),
colour = "Blue")
How do I format the data label so that it will not show the X axis and only show the Y axis (profit)? I have tried with aes(text=Profit)
but the X axis still shows.
Any help would be greatly appreciated.