Skip to content

Commit

Permalink
address PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ElijahAhianyo committed Apr 30, 2024
1 parent e46cd60 commit 90693ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dashboard/graphs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Library of customized graphs and tables for the dashboard."""
from typing import Dict, List, Union
from __future__ import annotations

import reflex as rx

Expand Down Expand Up @@ -32,7 +32,7 @@ def stat_card(title: str, stat, delta) -> rx.Component:
)


def table(tabular_data: List[List]):
def table(tabular_data: list[list]):
return rx.table.root(
rx.table.header(
rx.table.row(
Expand Down Expand Up @@ -60,7 +60,7 @@ class Line(rx.Base):
stroke: str


def line_chart(data: Union[rx.Var, List[dict]], data_key: str, lines: List[Line]):
def line_chart(data: rx.Var | list[dict], data_key: str, lines: list[Line]):
return card(
rx.recharts.line_chart(
*[
Expand All @@ -76,7 +76,7 @@ def line_chart(data: Union[rx.Var, List[dict]], data_key: str, lines: List[Line]
)


def pie_chart(data: Union[rx.Var, List[dict]], data_key: str, name_key: str):
def pie_chart(data: rx.Var | list[dict], data_key: str, name_key: str):
return card(
rx.recharts.pie_chart(
rx.recharts.pie(
Expand All @@ -99,7 +99,7 @@ class Area(rx.Base):
fill: str


def area_chart(data: Union[rx.Var, List[Dict]], data_key: str, areas: List[Area]):
def area_chart(data: rx.Var | list[dict], data_key: str, areas: list[Area]):
return card(
rx.recharts.area_chart(
*[
Expand Down

0 comments on commit 90693ce

Please sign in to comment.