Spaces:
Running
Running
update app.py
Browse files
app.py
CHANGED
@@ -823,30 +823,30 @@ if st.button(f"Calculate {custom_formula}"):
|
|
823 |
st.warning("No data available for plotting.")
|
824 |
st.stop()
|
825 |
|
826 |
-
# Line Chart
|
827 |
-
try:
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
except Exception as e:
|
837 |
-
|
838 |
-
|
839 |
-
# Bar Chart
|
840 |
-
try:
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
except Exception as e:
|
849 |
-
|
850 |
|
851 |
# Advanced Plot (Plotly)
|
852 |
try:
|
|
|
823 |
st.warning("No data available for plotting.")
|
824 |
st.stop()
|
825 |
|
826 |
+
# # Line Chart
|
827 |
+
# try:
|
828 |
+
# st.subheader("Line Chart")
|
829 |
+
# if x_column == 'Location Name':
|
830 |
+
# st.line_chart(result_df.set_index(x_column)[y_column])
|
831 |
+
# else:
|
832 |
+
# # Convert to datetime for better sorting
|
833 |
+
# result_df[x_column] = pd.to_datetime(result_df[x_column], errors='ignore')
|
834 |
+
# result_df = result_df.sort_values(x_column)
|
835 |
+
# st.line_chart(result_df.set_index(x_column)[y_column])
|
836 |
+
# except Exception as e:
|
837 |
+
# st.error(f"Error creating line chart: {str(e)}")
|
838 |
+
|
839 |
+
# # Bar Chart
|
840 |
+
# try:
|
841 |
+
# st.subheader("Bar Chart")
|
842 |
+
# if x_column == 'Location Name':
|
843 |
+
# st.bar_chart(result_df.set_index(x_column)[y_column])
|
844 |
+
# else:
|
845 |
+
# result_df[x_column] = pd.to_datetime(result_df[x_column], errors='ignore')
|
846 |
+
# result_df = result_df.sort_values(x_column)
|
847 |
+
# st.bar_chart(result_df.set_index(x_column)[y_column])
|
848 |
+
# except Exception as e:
|
849 |
+
# st.error(f"Error creating bar chart: {str(e)}")
|
850 |
|
851 |
# Advanced Plot (Plotly)
|
852 |
try:
|