Spaces:
Running
Running
fschwartzer
commited on
Commit
•
eeaecf1
1
Parent(s):
6c49f96
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,8 @@ import pandas as pd
|
|
3 |
import numpy as np
|
4 |
from datetime import datetime, timedelta
|
5 |
import matplotlib.pyplot as plt
|
6 |
-
import plotly.express as px
|
|
|
7 |
|
8 |
st.set_page_config(layout="wide")
|
9 |
|
@@ -151,11 +152,12 @@ with tab1:
|
|
151 |
labels = table_data['Conta']
|
152 |
sizes = [(i / total_sum) * 100 for i in table_data['Próximos 12 meses']]
|
153 |
|
154 |
-
fig1, ax1 = plt.subplots()
|
155 |
-
ax1.pie(sizes, labels=labels, autopct='%1.1f%%',)
|
156 |
-
ax1.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
|
157 |
-
|
158 |
-
st.pyplot(fig1)
|
|
|
159 |
|
160 |
with tab2:
|
161 |
|
|
|
3 |
import numpy as np
|
4 |
from datetime import datetime, timedelta
|
5 |
import matplotlib.pyplot as plt
|
6 |
+
import plotly.express as px
|
7 |
+
import plotly.graph_objects as go
|
8 |
|
9 |
st.set_page_config(layout="wide")
|
10 |
|
|
|
152 |
labels = table_data['Conta']
|
153 |
sizes = [(i / total_sum) * 100 for i in table_data['Próximos 12 meses']]
|
154 |
|
155 |
+
#fig1, ax1 = plt.subplots()
|
156 |
+
#ax1.pie(sizes, labels=labels, autopct='%1.1f%%',)
|
157 |
+
#ax1.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
|
158 |
+
fig = go.Figure(data=[go.Pie(labels=labels, values=sizes)])
|
159 |
+
#st.pyplot(fig1)
|
160 |
+
st.plotly_chart(fig, theme=None, use_container_width=True)
|
161 |
|
162 |
with tab2:
|
163 |
|