Comment on page
Visualize data
Glean insights from your data, visually.
Create beautiful visualizations using our in-app Plotly support. Plotly support works just as you're used to in Python, displaying your chart straight to the spreadsheet.
Building charts in Quadratic is centered around Python charting libraries, starting with Plotly. Building charts in Plotly is broken down into 3 simple steps:
- 1.Create your chart
- 2.Style your chart
- 3.Display the chart to the sheet
- 4.Resize & adjust
Quadratic does not support
.show()
When displaying your chart use fig
, not fig.show()
. Outlined in examples below.# import library
import plotly.express as px
# create figure
fig = px.line(df, x='col1', y='col2', title="Power generation")
# display figure to the spreadsheet
fig

Sample chart with some extra styling.
# bar chart using plotly express, can create with plotly graph objects as well
import plotly.express as px
# create figure with specified data, assumes DataFrame df with column names col1 and col2
fig = px.bar(df, x=df['col1'], y=df['col2'])
# display figure to spreadsheet
fig

# import Plotly
import plotly.express as px
# create figure
fig = px.histogram(df, x = 'output')
# display to sheet
fig

import plotly.express as px
fig = px.scatter(df, y="col1", x="col2", color="col3")
fig.update_traces(marker_size=10)
fig.update_layout(scattermode="group")
fig

# import library
import plotly.express as px
# assumes 2d array Z
fig = px.imshow(Z, text_auto=True)
# display chart
fig

# some chart styling options to assist getting started
fig.update_layout(
xaxis=dict(
showline=True,
showgrid=False,
showticklabels=True,
linecolor='rgb(204, 204, 204)',
linewidth=2,
ticks='outside',
tickfont=dict(
family='Arial',
size=12,
color='rgb(82, 82, 82)',
),
),
yaxis=dict(
showgrid=False,
zeroline=False,
showline=False,
showticklabels=True,
),
autosize=False,
showlegend=False,
plot_bgcolor='white',
title='Historical power usage by month (1985-2018)'
)
Use Plotly chart controls to pan, zoom, download your plot as a PNG, and reset axes.

Use chart controls
Additionally, you can resize by dragging the edges of the chart.

Last modified 22h ago