I need to have a message shown if a condition is met. I saw this post that deals with showing a blank graph but couldn’t figure out how to apply for my needs.
The graph’s function:
import plotly.express as px
def update_graph(a, x_axis, y_axis):
df = pd.read_csv(r"C:\Users\user\project\Data.csv")
# in this case a message needs to be shown instead of the graph
if x_axis == y_axis:
return px.bar(df, x=x_axis, y=y_axis)
The Graph object:
If you think that more information is needed, tell me and I’ll provide it.