I have been working in flexdashboards using rbokeh to draw some dynamic graphs. Because this is a bar chart mapped to categorical data in the variable
Classification
, I am unable to manually create a legend, which is fine because rbokeh does it automatically.
However, I am having some issues with the legend and labeling:
It is placed horribly, I would like to tell r to place in the upper left hand corner to get it away from bars with content.
I would like to drop the red ab_line into the legend and label it (using standard
legend =
will not work because of the mapped variables in the base chartThis graph needs to be 508 compliant for translation, the flexdashboard is, as well as the bokeh tools on the left hand margin and the keys in the pop ups, but the values and labels remain in English. Does anyone have a way of making the charts responsive to google translate? I am fine if that involves editing the extruded page....I will just need more guidance in doing it there.
figure(title=" Confirmed & Probable Cases by Year",width= 1400, height =350)%>% ly_bar(x=Year, y= count, position='stack', data=probConf, width=.9,hover=TRUE, legend=TRUE, color=Classification) %>% x_axis(label ='Year')%>% y_axis(label ='Cases')%>% ly_abline(v=17.5, legend=NULL, color = "red", width =1, alpha=.5)%>% [![enter image description here][1]][1]set_palette(discrete_color = pal_color(c("#ee9f00", "#ffcc66")))