Spaces:
Sleeping
Sleeping
Update task_visualization.py
Browse files- task_visualization.py +2 -1
task_visualization.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
import matplotlib.pyplot as plt
|
|
|
4 |
|
5 |
class TaskVisualizer:
|
6 |
def plot_performance(self):
|
@@ -18,7 +19,7 @@ class TaskVisualizer:
|
|
18 |
st.pyplot(plt)
|
19 |
|
20 |
def plot_category_performance(self, timeframe):
|
21 |
-
task_manager = TaskManager()
|
22 |
report = task_manager.generate_report(timeframe)
|
23 |
if not report.empty:
|
24 |
category_times = report.groupby('Category')['Total Duration'].sum()
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
import matplotlib.pyplot as plt
|
4 |
+
from components.task_operations import TaskManager # Import TaskManager
|
5 |
|
6 |
class TaskVisualizer:
|
7 |
def plot_performance(self):
|
|
|
19 |
st.pyplot(plt)
|
20 |
|
21 |
def plot_category_performance(self, timeframe):
|
22 |
+
task_manager = TaskManager() # Use the imported TaskManager class
|
23 |
report = task_manager.generate_report(timeframe)
|
24 |
if not report.empty:
|
25 |
category_times = report.groupby('Category')['Total Duration'].sum()
|