Example Code
from mayil import Mayil
import pandas as pd
import plotly.express as px
my = Mayil()
my.header("Monthly Report")
my.metric("Active Users", "1,234")
my.metric("Conversion Rate", "24.5%")
df = pd.DataFrame({
'Engagement': [85, 92, 78, 95, 89, 70, 88, 91, 76, 85],
'Satisfaction': [90, 85, 75, 88, 92, 72, 83, 89, 78, 86],
'Users': [120, 250, 180, 300, 220, 150, 280, 210, 190, 240]
})
fig = px.scatter(df, x='Engagement', y='Satisfaction',
size='Users', color='Engagement',
title='User Engagement vs. Satisfaction',
color_continuous_scale='viridis')
my.plotly_chart(fig)
my.mention(["team@example.com", "dev@example.com"], color="#4A148C")
my.sticky_note("Important Update", "New features are now available!")
df_table = pd.DataFrame({
'Name': ['John', 'Jane'],
'Score': ['95', '85']
})
my.table(df_table, align='center')