Date Index plotting error; Falcon + SQL + Chart Studio

Hi,

I´m having an issue that appears only when I graph a chart with plotly. See:

Yet when using matplotlib these weird lines do not appear:

The chart in plotly uses data from an sql db, while the matplotlib chart uses the same data before putting it on the db. Could that have anything to do with it?
I suspect its the date-axis (also the index) that is causing the trouble, checked for duplicates but none where found…any ideas?

Thanks!

That looks strange. Is this happening across all browsers? There’s a bug with svg graphics in Firefox 64, and while this doesn’t look like it, might help to at least cross it off the list.

Unfortunately it didn’t…
I feel like it has something to do with the date time index

When plotting only the x-axis (Date) I get this:

it seems that this only happens through the chart editor / after having scheduled a SQL Query & wanting to graph from the grid

Before that it seems fine using poorly as well:

Further Error seems to be only with line Charts:


VS

Also tried introducing a new column with dates as strings, but error persists…

Is there any way to schedule SQL queries / plot the queried grid programmatically using python or am I confined to using Falcon & the chart editor manually?
Thanks!

No one has an idea :frowning:?

Hi @friedrichz,

My first guess is that some of the points are not in the order that you expect. For the lines to be smooth, you’ll want the points to be ordered by the x-axis value (date in your example).

Does your SQL query include an “ORDER BY” clause? Without this, SQL engines generally don’t guarantee that they will return the data in the same order that they were inserted.

Hope that helps!
-Jon

Does your SQL query include an “ORDER BY” clause? Without this, SQL engines generally don’t guarantee that they will return the data in the same order that they were inserted.

You´re absolutely right, this did the trick. Thank you very much!

1 Like