I’m producing bar charts with R Plotly. I have defined a hover text string as a variable in the data frame. When I display the chart, the hover text is inscribed in the bar. This is a new behavior, and not sure is going on.
Would appreciate any suggestions about how to resolve this.
TIA --AB
The image:
The code:
f.SNAPcty_PL$indText ← paste0( f.SNAPctyVAL$county," Year: “,f.SNAPcty_PL$year,” Participation: “,f.SNAPcty_PL$SNAP,”, Percent: “, percent(f.SNAPcty_PL$pct * 100),” Count: ",NumFmt(f.SNAPcty_PL$count))
SNAPPlot ← plot_ly(f.SNAPcty_PL,
x = ~SNAP, y = ~pct, type = ‘bar’,
text = ~indText, hoverinfo = 'text’) %>%
layout( title=grTitle, yaxis = yAxis, xaxis=xAxis,
showlegend = FALSE, hoverlabel = “right”, margin = list(l = 50, r = 50, t = 60, b = 100),
annotations = list(text = outCap,
font = list(size = 12), showarrow = FALSE, xref = ‘paper’, x = 0, yref = ‘paper’, y = -0.4))