Ploty continuous color scale in line chart

Hi, I was experimenting with the various options available, but I couldn’t manage to set continuous color scale on a single line of a line chart. Discrete colors worked fine. I would appreciate if someone could point me the right direction regarding how to use x or y (in this case year or life expectancy) or any other values to set continuous color if it is possible. I pasted a basic line chart sample from the documentation:

import as px

df ="country=='Canada'")
fig = px.line(df, x="year", y="lifeExp", title='Life expectancy in Canada')

In addition I also posted the same question on stackoverflow earlier if someone wants to grab the points for answering it.

Hi @Shidra,

this is not currently possible, this features is still waiting for some sponsorship :wink:
see here: