in UI/utils.py [0:0]
def plot_data(df, plot_type, x_column_list,
y_column_list=None, z_column_list=None):
# Plot based on plot_type
if plot_type == 'Line Chart' and x_column_list and y_column_list:
plot_line_chart(df, x_column_list, y_column_list)
elif plot_type == 'Bar Chart' and x_column_list and y_column_list:
plot_bar_chart(df, x_column_list, y_column_list)
elif plot_type == 'Histogram' and x_column_list:
plot_histogram(df, x_column_list, y_column_list)
elif plot_type == 'Scatter Plot' and x_column_list and y_column_list:
plot_scatter_plot(df, x_column_list, y_column_list)
elif plot_type == 'Pie Chart' and x_column_list:
plot_pie_chart(df, x_column_list, y_column_list)
elif plot_type == 'Area Chart' and x_column_list and y_column_list:
plot_area_chart(df, x_column_list, y_column_list)
elif plot_type == 'Box Plot' and x_column_list and y_column_list:
plot_box_plot(df, x_column_list, y_column_list)
elif plot_type == 'Heatmap' and x_column_list:
plot_heatmap(df, x_column_list, y_column_list, z_column_list)
elif (plot_type == 'Bubble Chart' and x_column_list and
y_column_list and z_column_list):
plot_bubble_chart(df, x_column_list, y_column_list, z_column_list)
else:
st.write('Please select appropriate columns for the chosen plot type.')