I am planning to use plotly and plot value from a number to .k, for example, the value showed on the chart is like 8247294, and I want it to show like 8.25M
I tried something like this:
x = [x for x in range(1,len(table))] #date
y = table['revenue'].values.tolist()
fig = go.Figure(go.Scatter(x=x, y=y,text=y,mode="lines+markers+text",
line=dict(color='firebrick', width=4)))
fig.update_layout(width=900,height=650)
fig.update_layout(
tickformat='k')
It is not working.So what's the correct way of doing it?

text: it is displayed as-is. An upcoming version of Plotly.py will support this, however, as it is being implemented in the underlying Plotly.js library this week.