in community-efforts/prompt_translation/dashboard_template/app.py [0:0]
def kpi_chart_submitted() -> alt.Chart:
"""
This function returns a KPI chart with the total amount of records that have been annotated.
Returns:
An altair chart with the KPI chart.
"""
total = len(target_dataset)
# Assuming you have a DataFrame with user data, create a sample DataFrame
data = pd.DataFrame({"Category": [NUMBER_ANNOTATED], "Value": [total]})
# Create Altair chart
chart = (
alt.Chart(data)
.mark_text(fontSize=100, align="center", baseline="middle", color="steelblue")
.encode(text="Value:N")
.properties(title=NUMBER_ANNOTATED, width=250, height=200)
)
return chart