I tried to make an area chart of cummulative corona virus cases in USA. But, there is no tooltip in the area chart.
If i change the area chart into line chart, the tooltip appear like it should be.
How can i make the tooltip appear on area chart?
This in the code:
import pandas as pd
import numpy as np
import pandas_bokeh
df = pd.read_excel('D:/Coding Practice/data/data_corona_usa.xlsx')
df = df.iloc[::-1].reset_index()
df['Cummulative Cases'] = df['cases'].cumsum()
df['date'] = df['dateRep'].dt.strftime('%D')
pandas_bokeh.output_notebook()
df.plot_bokeh(
kind='area',
x= 'dateRep',
y='Cummulative Cases',
xlabel = 'Date',
ylabel = 'Cummulative Cases',
hovertool_string= r'''<h1> Date: @{date} </h1>
<h2> Cummulative Cases: @{Cummulative Cases} </h2>''',
title='US Corona Cases (cummulative)',
hovertool=True,
fontsize_title=18,
logy=True,
stacked=False,
legend='top_left'
I believe that you meant mostly the hover tool, the area chart does not support it just yet, I am using the 1.3.4 bokeh version, there is a fresh one 2. something, maybe try to update your bokeh and you won't have this issue.
here is an area chart I have done, which the hovertool doesn't work either, despite everything done as supposed.
data