I want to create line charts with plotly, my X axis is a year, y a value. Sometimes, the data is incomplete, i.e., some curves will have years missing or will start in different years than others.
It appears this can lead to zig-zag lines where I would expect the lines to be connected in the order the data is provided.
Here's a simple example:
#!/usr/bin/python3
import plotly.express
curve_a = {2010: 20, 2011: 21, 2012: 22, 2014: 22, 2015: 23}
curve_b = {2009: 18, 2010: 21, 2011: 22, 2012: 23, 2013: 21, 2014: 21, 2015: 20}
dat = {"A": curve_a, "B": curve_b}
fig = plotly.express.line(dat, markers=True)
fig.show()
As you can see, the red line starts at 2010, and jumps to 2009 and 2013 at the end.
I can workaround this by adding a fake line at the bottom that spans the whole range and is used as the first in the dataset, but that's, of course, not a very good solution.
Any help appreciated.

