changes of ui mobile view of dashboard

This commit is contained in:
2026-01-13 15:22:53 +05:30
parent a73d8e5ed1
commit d46c7c0936
2 changed files with 68 additions and 60 deletions

View File

@@ -8,7 +8,7 @@ import base64
dashboard_bp = Blueprint("dashboard", __name__, url_prefix="/dashboard")
# charts
def plot_to_base64():
img = io.BytesIO()
plt.savefig(img, format="png", bbox_inches="tight")
@@ -16,7 +16,7 @@ def plot_to_base64():
img.seek(0)
return base64.b64encode(img.getvalue()).decode()
# bar chart
def bar_chart():
categories = ["Trench", "Manhole", "Pipe Laying", "Restoration"]
values = [120, 80, 150, 60]
@@ -29,7 +29,7 @@ def bar_chart():
return plot_to_base64()
# Pie chart
def pie_chart():
labels = ["Completed", "In Progress", "Pending"]
sizes = [65, 20, 15]
@@ -40,7 +40,7 @@ def pie_chart():
return plot_to_base64()
# Histogram chart
def histogram_chart():
daily_work = [5, 10, 15, 20, 20, 25, 30, 35, 40, 45, 50]
@@ -52,7 +52,7 @@ def histogram_chart():
return plot_to_base64()
# Dashboaed page
@dashboard_bp.route("/")
def dashboard():
if not session.get("user_id"):