BSd3v/Dashboard-Helper

Multiselect for y-axis data breaks certain graphs

Closed this issue · 2 comments

The dropdown to select what column data to put on the y-axis, is set to multi selection. This breaks the graph display because the column names are put inside a list instead of the string name. I have this issue with px.timeline or px.imshow for example. Here is example code generated by the tool:

fig = makeCharts(df,
 {"figure": {"x_start": "start_time",
 "x_end": "end_time",
 "y": ["my_data"]},
 "layout": {},
 "chart": "px.timeline"})

This results in the following error:

ValueError: All arguments should have the same length. The length of column argument `df[x_start]` is 1440, whereas the length of  previously-processed arguments ['y'] is 1

If I take this code snippet and change "y": ["my_data"] to "y": "my_data" then I can run the makeCharts function locally.

Should a possibility for enabling/disabling multiselect be added for the y-axis data?

BSd3v commented

Hello @aGitForEveryone,

Good catch, I dont often use things like timeline, etc.

I will add a checkbox to the y values specifically. :)

BSd3v commented

I adjusted this, there is now a checkbox for multi y columns, this commit: 205a7f0