-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Hi folks,
the generated SQL and the table / df output is correct, but for plotly generation the y-axis is always only counting upwards:
for x = 0, y = 0,
for x = 1, y = 1
... and so on
I use this default route
@app.route('/api/v0/generate_plotly_figure', methods=['GET'])
@requires_cache(['df', 'question', 'sql'])
def generate_plotly_figure(id: str, df, question, sql):
try:
code = vn.generate_plotly_code(question=question, sql=sql, df_metadata=f"Running df.dtypes gives:\n {df.dtypes}")
fig = vn.get_plotly_figure(plotly_code=code, df=df, dark_mode=False)
fig_json = fig.to_json()
cache.set(id=id, field='fig_json', value=fig_json)
return jsonify(
{
"type": "plotly_figure",
"id": id,
"fig": fig_json,
})
except Exception as e:
# Print the stack trace
import traceback
traceback.print_exc()
return jsonify({"type": "error", "error": str(e)})
Can anyone help?
Suriayn and COOLMSF
Metadata
Metadata
Assignees
Labels
No labels
