viewx 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {viewx-0.2.0 → viewx-0.2.1}/PKG-INFO +58 -52
  2. {viewx-0.2.0 → viewx-0.2.1}/README.md +57 -50
  3. {viewx-0.2.0 → viewx-0.2.1}/setup.py +2 -3
  4. viewx-0.2.1/tests/test4.py +72 -0
  5. viewx-0.2.1/viewx/HTML/html_engine.py +633 -0
  6. {viewx-0.2.0 → viewx-0.2.1}/viewx/__init__.py +3 -3
  7. {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/PKG-INFO +58 -52
  8. {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/SOURCES.txt +0 -1
  9. {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/requires.txt +0 -1
  10. viewx-0.2.0/tests/test4.py +0 -150
  11. viewx-0.2.0/viewx/HTML/html_engine.py +0 -448
  12. viewx-0.2.0/viewx/app_engine.py +0 -0
  13. {viewx-0.2.0 → viewx-0.2.1}/setup.cfg +0 -0
  14. {viewx-0.2.0 → viewx-0.2.1}/tests/test1.py +0 -0
  15. {viewx-0.2.0 → viewx-0.2.1}/tests/test2.py +0 -0
  16. {viewx-0.2.0 → viewx-0.2.1}/tests/test3.py +0 -0
  17. {viewx-0.2.0 → viewx-0.2.1}/tests/test5.py +0 -0
  18. {viewx-0.2.0 → viewx-0.2.1}/tests/test6.py +0 -0
  19. {viewx-0.2.0 → viewx-0.2.1}/viewx/DashBoard/__init__.py +0 -0
  20. {viewx-0.2.0 → viewx-0.2.1}/viewx/DashBoard/dashboard_engine.py +0 -0
  21. {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/__init__.py +0 -0
  22. {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/bibliometrics.py +0 -0
  23. {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/datamatrix_engine.py +0 -0
  24. {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/visualizer.py +0 -0
  25. {viewx-0.2.0 → viewx-0.2.1}/viewx/HTML/__init__.py +0 -0
  26. {viewx-0.2.0 → viewx-0.2.1}/viewx/Report/__init__.py +0 -0
  27. {viewx-0.2.0 → viewx-0.2.1}/viewx/Report/report_engine.py +0 -0
  28. {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/__init__.py +0 -0
  29. {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/charts.py +0 -0
  30. {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/components.py +0 -0
  31. {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/slides_engine.py +0 -0
  32. {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/__init__.py +0 -0
  33. {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/course_completion.csv +0 -0
  34. {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/iris.csv +0 -0
  35. {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/penguins.csv +0 -0
  36. {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/sp500_companies.csv +0 -0
  37. {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/titanic.csv +0 -0
  38. {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/dependency_links.txt +0 -0
  39. {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viewx
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Librería de visualización adaptable para HTML, Dashboards y PDFs en Python
5
5
  Home-page: https://github.com/GhostAnalyst30/ViewX
6
6
  Author: Emmanuel Ascendra Perez
@@ -26,7 +26,6 @@ Requires-Dist: pylatex>=1.4.2
26
26
  Requires-Dist: seaborn>=0.12.2
27
27
  Requires-Dist: plotly>=6.0.0
28
28
  Requires-Dist: streamlit>=1.32.0
29
- Requires-Dist: statslibx>=0.2.2
30
29
  Provides-Extra: streamlit
31
30
  Requires-Dist: streamlit>=1.32.0; extra == "streamlit"
32
31
  Provides-Extra: dash
@@ -53,7 +52,7 @@ Dynamic: requires-dist
53
52
  Dynamic: requires-python
54
53
  Dynamic: summary
55
54
 
56
- # 📦 ViewX — v2.0
55
+ # 📦 ViewX — v2.1
57
56
 
58
57
  **ViewX** es un paquete moderno de Python diseñado para generar **páginas HTML interactivas**, **dashboards dinámicos** y **visualizaciones inteligentes** que se adaptan automáticamente a los objetos agregados por el usuario.
59
58
 
@@ -83,70 +82,77 @@ pip install viewx
83
82
  ### Crear una página HTML
84
83
  ```python
85
84
  import pandas as pd
86
- import numpy as np
87
- import plotly.express as px
88
85
  from viewx.HTML import HTML
89
86
 
90
- # 1. Datos de ejemplo (Ventas por Categoría y Región)
87
+ # 1. Crear datos de ejemplo
91
88
  df_ventas = pd.DataFrame({
92
- 'Categoría': ['Electrónica', 'Hogar', 'Moda', 'Deportes', 'Juguetes'],
93
- 'Ventas': [12500, 8400, 15200, 6700, 4300],
94
- 'Margen': [0.15, 0.22, 0.18, 0.12, 0.25]
89
+ 'Mes': ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
90
+ 'Ventas': [120, 135, 148, 170, 195, 210, 245, 268, 290, 310, 335, 400],
91
+ 'Beneficio': [30, 35, 42, 51, 58, 63, 73, 80, 87, 93, 100, 120],
92
+ 'Clientes': [45, 48, 52, 58, 65, 72, 80, 88, 95, 102, 110, 125]
93
+ })
94
+
95
+ # Datos para gráfico de barras
96
+ df_productos = pd.DataFrame({
97
+ 'Producto': ['Producto A', 'Producto B', 'Producto C', 'Producto D', 'Producto E'],
98
+ 'Ventas': [450, 320, 280, 190, 150]
95
99
  })
96
100
 
97
- df_mensual = pd.DataFrame({
98
- 'Mes': ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun'],
99
- 'Ingresos': [45000, 48000, 52000, 49000, 55000, 61000]
101
+ # Datos para scatter
102
+ df_clientes = pd.DataFrame({
103
+ 'Edad': [25, 32, 28, 45, 38, 29, 51, 42, 35, 30],
104
+ 'Gasto': [120, 200, 150, 300, 250, 180, 400, 320, 220, 160],
105
+ 'Segmento': ['Joven', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Adulto', 'Joven']
100
106
  })
101
107
 
102
- # 2. Gráficos estilo Power BI
103
- fig_bar = px.bar(df_ventas, x='Categoría', y='Ventas', color='Categoría',
104
- title="Ventas por Categoría", template="plotly_white")
105
- fig_line = px.line(df_mensual, x='Mes', y='Ingresos', markers=True,
106
- title="Evolución de Ingresos", template="plotly_white")
107
- fig_pie = px.pie(df_ventas, values='Ventas', names='Categoría', hole=0.4,
108
- title="Distribución de Ventas")
109
-
110
- # 3. Inicializar Dashboard con Estética Power BI
111
- # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
112
- dash = HTML(
113
- title="Dashboard de Rendimiento Corporativo",
114
- theme="corporate_blue",
108
+ # 2. Configurar el dashboard
109
+ dashboard = HTML(
110
+ title="📊 Dashboard Ejecutivo - Demo",
111
+ theme="corporate_blue", # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
112
+ cols=12, # Grid de 12 columnas
113
+ rows=12, # 12 filas de altura
114
+ gap=16,
115
+ padding=20,
115
116
  navbar={
116
- "title": "BI Analytics",
117
+ "title": "📈 ViewX PRO",
117
118
  "items": [
118
- {"label": "Global", "link": "#"},
119
+ {"label": "Inicio", "link": "#"},
119
120
  {"label": "Ventas", "link": "#"},
121
+ {"label": "Clientes", "link": "#"},
120
122
  {"label": "Reportes", "link": "#"}
121
123
  ]
122
124
  }
123
125
  )
124
126
 
125
- # 4. Añadir Componentes usando el sistema de slot_grid original
126
- # slot_grid = (fila_inicio, columna_inicio, filas_que_ocupa, columnas_que_ocupa)
127
-
128
- # Fila superior: KPIs
129
- dash.add_valuebox("Ingresos Totales", "$310K", icon="💰", slot_grid=(1, 1, 2, 3))
130
- dash.add_valuebox("Crecimiento", "+12.5%", icon="📈", color="#107C10", slot_grid=(1, 4, 2, 3))
131
- dash.add_valuebox("Clientes Activos", "1,452", icon="👥", color="#0078D4", slot_grid=(1, 7, 2, 3))
132
- dash.add_valuebox("Tasa de Conversión", "4.2%", icon="🎯", color="#E63946", slot_grid=(1, 10, 2, 3))
133
-
134
- # Fila central: Gráficos principales
135
- dash.add_plot(fig_line, title="Tendencia Mensual", slot_grid=(3, 1, 5, 8))
136
- dash.add_plot(fig_pie, title="Mix de Productos", slot_grid=(3, 9, 5, 4))
137
-
138
- # Fila inferior: Tabla y Texto
139
- dash.add_table(df_ventas, title="Detalle de Categorías", slot_grid=(8, 1, 5, 7))
140
- dash.add_text("""
141
- <h3>Resumen de Insights</h3>
142
- <p>El segmento de <b>Moda</b> lidera las ventas con un margen saludable del 18%.</p>
143
- <p>Se observa un crecimiento sostenido en los ingresos mensuales, alcanzando un pico en <b>Junio</b>.</p>
144
- <p><i>Recomendación:</i> Aumentar stock en la categoría 'Hogar' debido al incremento de demanda previsto.</p>
145
- """, slot_grid=(8, 8, 5, 5))
146
-
147
- # 5. Generar Dashboard
148
- output = dash.generate("powerbi_dashboard_pro.html")
149
- print(f"Dashboard profesional generado: {output}")
127
+ # 3. Añadir componentes (row, col, height, width)
128
+ # Fila 1: KPIs
129
+ dashboard.add_valuebox("Ventas Totales", "$2.8M", "💰", row=1, col=1, height=2, width=3)
130
+ dashboard.add_valuebox("Beneficio Neto", "$942K", "📈", "#00A86B", row=1, col=4, height=2, width=3)
131
+ dashboard.add_valuebox("Clientes Activos", "1,247", "👥", "#FF6B35", row=1, col=7, height=2, width=3)
132
+ dashboard.add_valuebox("Tasa Conversión", "24.5%", "🎯", "#9B59B6", row=1, col=10, height=2, width=3)
133
+
134
+ # Fila 2-5: Gráfico de líneas (ventas mensuales) - Método sencillo con datos
135
+ dashboard.add_chart(
136
+ data=df_ventas,
137
+ chart_type="line",
138
+ x="Mes",
139
+ y="Ventas",
140
+ title="📈 Evolución de Ventas 2024",
141
+ row=3, col=1, height=10, width=6
142
+ )
143
+
144
+ # Fila 2-5: Gráfico de barras (productos) - Otro ejemplo sencillo
145
+ dashboard.add_chart(
146
+ data=df_productos,
147
+ chart_type="bar",
148
+ x="Producto",
149
+ y="Ventas",
150
+ title="🏷️ Ventas por Producto",
151
+ row=3, col=7, height=10, width=6
152
+ )
153
+
154
+ # 4. Generar el archivo
155
+ dashboard.generate("mi_dashboard.html")
150
156
 
151
157
  ```
152
158
 
@@ -1,4 +1,4 @@
1
- # 📦 ViewX — v2.0
1
+ # 📦 ViewX — v2.1
2
2
 
3
3
  **ViewX** es un paquete moderno de Python diseñado para generar **páginas HTML interactivas**, **dashboards dinámicos** y **visualizaciones inteligentes** que se adaptan automáticamente a los objetos agregados por el usuario.
4
4
 
@@ -28,70 +28,77 @@ pip install viewx
28
28
  ### Crear una página HTML
29
29
  ```python
30
30
  import pandas as pd
31
- import numpy as np
32
- import plotly.express as px
33
31
  from viewx.HTML import HTML
34
32
 
35
- # 1. Datos de ejemplo (Ventas por Categoría y Región)
33
+ # 1. Crear datos de ejemplo
36
34
  df_ventas = pd.DataFrame({
37
- 'Categoría': ['Electrónica', 'Hogar', 'Moda', 'Deportes', 'Juguetes'],
38
- 'Ventas': [12500, 8400, 15200, 6700, 4300],
39
- 'Margen': [0.15, 0.22, 0.18, 0.12, 0.25]
35
+ 'Mes': ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
36
+ 'Ventas': [120, 135, 148, 170, 195, 210, 245, 268, 290, 310, 335, 400],
37
+ 'Beneficio': [30, 35, 42, 51, 58, 63, 73, 80, 87, 93, 100, 120],
38
+ 'Clientes': [45, 48, 52, 58, 65, 72, 80, 88, 95, 102, 110, 125]
39
+ })
40
+
41
+ # Datos para gráfico de barras
42
+ df_productos = pd.DataFrame({
43
+ 'Producto': ['Producto A', 'Producto B', 'Producto C', 'Producto D', 'Producto E'],
44
+ 'Ventas': [450, 320, 280, 190, 150]
40
45
  })
41
46
 
42
- df_mensual = pd.DataFrame({
43
- 'Mes': ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun'],
44
- 'Ingresos': [45000, 48000, 52000, 49000, 55000, 61000]
47
+ # Datos para scatter
48
+ df_clientes = pd.DataFrame({
49
+ 'Edad': [25, 32, 28, 45, 38, 29, 51, 42, 35, 30],
50
+ 'Gasto': [120, 200, 150, 300, 250, 180, 400, 320, 220, 160],
51
+ 'Segmento': ['Joven', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Adulto', 'Joven']
45
52
  })
46
53
 
47
- # 2. Gráficos estilo Power BI
48
- fig_bar = px.bar(df_ventas, x='Categoría', y='Ventas', color='Categoría',
49
- title="Ventas por Categoría", template="plotly_white")
50
- fig_line = px.line(df_mensual, x='Mes', y='Ingresos', markers=True,
51
- title="Evolución de Ingresos", template="plotly_white")
52
- fig_pie = px.pie(df_ventas, values='Ventas', names='Categoría', hole=0.4,
53
- title="Distribución de Ventas")
54
-
55
- # 3. Inicializar Dashboard con Estética Power BI
56
- # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
57
- dash = HTML(
58
- title="Dashboard de Rendimiento Corporativo",
59
- theme="corporate_blue",
54
+ # 2. Configurar el dashboard
55
+ dashboard = HTML(
56
+ title="📊 Dashboard Ejecutivo - Demo",
57
+ theme="corporate_blue", # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
58
+ cols=12, # Grid de 12 columnas
59
+ rows=12, # 12 filas de altura
60
+ gap=16,
61
+ padding=20,
60
62
  navbar={
61
- "title": "BI Analytics",
63
+ "title": "📈 ViewX PRO",
62
64
  "items": [
63
- {"label": "Global", "link": "#"},
65
+ {"label": "Inicio", "link": "#"},
64
66
  {"label": "Ventas", "link": "#"},
67
+ {"label": "Clientes", "link": "#"},
65
68
  {"label": "Reportes", "link": "#"}
66
69
  ]
67
70
  }
68
71
  )
69
72
 
70
- # 4. Añadir Componentes usando el sistema de slot_grid original
71
- # slot_grid = (fila_inicio, columna_inicio, filas_que_ocupa, columnas_que_ocupa)
72
-
73
- # Fila superior: KPIs
74
- dash.add_valuebox("Ingresos Totales", "$310K", icon="💰", slot_grid=(1, 1, 2, 3))
75
- dash.add_valuebox("Crecimiento", "+12.5%", icon="📈", color="#107C10", slot_grid=(1, 4, 2, 3))
76
- dash.add_valuebox("Clientes Activos", "1,452", icon="👥", color="#0078D4", slot_grid=(1, 7, 2, 3))
77
- dash.add_valuebox("Tasa de Conversión", "4.2%", icon="🎯", color="#E63946", slot_grid=(1, 10, 2, 3))
78
-
79
- # Fila central: Gráficos principales
80
- dash.add_plot(fig_line, title="Tendencia Mensual", slot_grid=(3, 1, 5, 8))
81
- dash.add_plot(fig_pie, title="Mix de Productos", slot_grid=(3, 9, 5, 4))
82
-
83
- # Fila inferior: Tabla y Texto
84
- dash.add_table(df_ventas, title="Detalle de Categorías", slot_grid=(8, 1, 5, 7))
85
- dash.add_text("""
86
- <h3>Resumen de Insights</h3>
87
- <p>El segmento de <b>Moda</b> lidera las ventas con un margen saludable del 18%.</p>
88
- <p>Se observa un crecimiento sostenido en los ingresos mensuales, alcanzando un pico en <b>Junio</b>.</p>
89
- <p><i>Recomendación:</i> Aumentar stock en la categoría 'Hogar' debido al incremento de demanda previsto.</p>
90
- """, slot_grid=(8, 8, 5, 5))
91
-
92
- # 5. Generar Dashboard
93
- output = dash.generate("powerbi_dashboard_pro.html")
94
- print(f"Dashboard profesional generado: {output}")
73
+ # 3. Añadir componentes (row, col, height, width)
74
+ # Fila 1: KPIs
75
+ dashboard.add_valuebox("Ventas Totales", "$2.8M", "💰", row=1, col=1, height=2, width=3)
76
+ dashboard.add_valuebox("Beneficio Neto", "$942K", "📈", "#00A86B", row=1, col=4, height=2, width=3)
77
+ dashboard.add_valuebox("Clientes Activos", "1,247", "👥", "#FF6B35", row=1, col=7, height=2, width=3)
78
+ dashboard.add_valuebox("Tasa Conversión", "24.5%", "🎯", "#9B59B6", row=1, col=10, height=2, width=3)
79
+
80
+ # Fila 2-5: Gráfico de líneas (ventas mensuales) - Método sencillo con datos
81
+ dashboard.add_chart(
82
+ data=df_ventas,
83
+ chart_type="line",
84
+ x="Mes",
85
+ y="Ventas",
86
+ title="📈 Evolución de Ventas 2024",
87
+ row=3, col=1, height=10, width=6
88
+ )
89
+
90
+ # Fila 2-5: Gráfico de barras (productos) - Otro ejemplo sencillo
91
+ dashboard.add_chart(
92
+ data=df_productos,
93
+ chart_type="bar",
94
+ x="Producto",
95
+ y="Ventas",
96
+ title="🏷️ Ventas por Producto",
97
+ row=3, col=7, height=10, width=6
98
+ )
99
+
100
+ # 4. Generar el archivo
101
+ dashboard.generate("mi_dashboard.html")
95
102
 
96
103
  ```
97
104
 
@@ -9,7 +9,7 @@ except FileNotFoundError:
9
9
 
10
10
  setup(
11
11
  name="viewx",
12
- version="0.2.0",
12
+ version="0.2.1",
13
13
  author="Emmanuel Ascendra Perez",
14
14
  author_email="ascendraemmanuel@gmail.com",
15
15
  description="Librería de visualización adaptable para HTML, Dashboards y PDFs en Python",
@@ -48,8 +48,7 @@ setup(
48
48
  "pylatex>=1.4.2", # Para PDFs
49
49
  "seaborn>=0.12.2",
50
50
  "plotly>=6.0.0",
51
- "streamlit>=1.32.0",
52
- "statslibx >= 0.2.2"
51
+ "streamlit>=1.32.0"
53
52
  ],
54
53
 
55
54
  # Dependencias opcionales
@@ -0,0 +1,72 @@
1
+ import pandas as pd
2
+ from viewx.HTML import HTML
3
+
4
+ # 1. Crear datos de ejemplo
5
+ df_ventas = pd.DataFrame({
6
+ 'Mes': ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
7
+ 'Ventas': [120, 135, 148, 170, 195, 210, 245, 268, 290, 310, 335, 400],
8
+ 'Beneficio': [30, 35, 42, 51, 58, 63, 73, 80, 87, 93, 100, 120],
9
+ 'Clientes': [45, 48, 52, 58, 65, 72, 80, 88, 95, 102, 110, 125]
10
+ })
11
+
12
+ # Datos para gráfico de barras
13
+ df_productos = pd.DataFrame({
14
+ 'Producto': ['Producto A', 'Producto B', 'Producto C', 'Producto D', 'Producto E'],
15
+ 'Ventas': [450, 320, 280, 190, 150]
16
+ })
17
+
18
+ # Datos para scatter
19
+ df_clientes = pd.DataFrame({
20
+ 'Edad': [25, 32, 28, 45, 38, 29, 51, 42, 35, 30],
21
+ 'Gasto': [120, 200, 150, 300, 250, 180, 400, 320, 220, 160],
22
+ 'Segmento': ['Joven', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Adulto', 'Joven']
23
+ })
24
+
25
+ # 2. Configurar el dashboard
26
+ dashboard = HTML(
27
+ title="📊 Dashboard Ejecutivo - Demo",
28
+ theme="corporate_blue", # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
29
+ cols=12, # Grid de 12 columnas
30
+ rows=12, # 12 filas de altura
31
+ gap=16,
32
+ padding=20,
33
+ navbar={
34
+ "title": "📈 ViewX PRO",
35
+ "items": [
36
+ {"label": "Inicio", "link": "#"},
37
+ {"label": "Ventas", "link": "#"},
38
+ {"label": "Clientes", "link": "#"},
39
+ {"label": "Reportes", "link": "#"}
40
+ ]
41
+ }
42
+ )
43
+
44
+ # 3. Añadir componentes (row, col, height, width)
45
+ # Fila 1: KPIs
46
+ dashboard.add_valuebox("Ventas Totales", "$2.8M", "💰", row=1, col=1, height=2, width=3)
47
+ dashboard.add_valuebox("Beneficio Neto", "$942K", "📈", "#00A86B", row=1, col=4, height=2, width=3)
48
+ dashboard.add_valuebox("Clientes Activos", "1,247", "👥", "#FF6B35", row=1, col=7, height=2, width=3)
49
+ dashboard.add_valuebox("Tasa Conversión", "24.5%", "🎯", "#9B59B6", row=1, col=10, height=2, width=3)
50
+
51
+ # Fila 2-5: Gráfico de líneas (ventas mensuales) - Método sencillo con datos
52
+ dashboard.add_chart(
53
+ data=df_ventas,
54
+ chart_type="line",
55
+ x="Mes",
56
+ y="Ventas",
57
+ title="📈 Evolución de Ventas 2024",
58
+ row=3, col=1, height=10, width=6
59
+ )
60
+
61
+ # Fila 2-5: Gráfico de barras (productos) - Otro ejemplo sencillo
62
+ dashboard.add_chart(
63
+ data=df_productos,
64
+ chart_type="bar",
65
+ x="Producto",
66
+ y="Ventas",
67
+ title="🏷️ Ventas por Producto",
68
+ row=3, col=7, height=10, width=6
69
+ )
70
+
71
+ # 4. Generar el archivo
72
+ dashboard.generate("mi_dashboard.html")