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.
- {viewx-0.2.0 → viewx-0.2.1}/PKG-INFO +58 -52
- {viewx-0.2.0 → viewx-0.2.1}/README.md +57 -50
- {viewx-0.2.0 → viewx-0.2.1}/setup.py +2 -3
- viewx-0.2.1/tests/test4.py +72 -0
- viewx-0.2.1/viewx/HTML/html_engine.py +633 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/__init__.py +3 -3
- {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/PKG-INFO +58 -52
- {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/SOURCES.txt +0 -1
- {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/requires.txt +0 -1
- viewx-0.2.0/tests/test4.py +0 -150
- viewx-0.2.0/viewx/HTML/html_engine.py +0 -448
- viewx-0.2.0/viewx/app_engine.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/setup.cfg +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/tests/test1.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/tests/test2.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/tests/test3.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/tests/test5.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/tests/test6.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/DashBoard/__init__.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/DashBoard/dashboard_engine.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/__init__.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/bibliometrics.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/datamatrix_engine.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/DataMatrix/visualizer.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/HTML/__init__.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/Report/__init__.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/Report/report_engine.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/__init__.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/charts.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/components.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/Slides/slides_engine.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/__init__.py +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/course_completion.csv +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/iris.csv +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/penguins.csv +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/sp500_companies.csv +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx/datasets/titanic.csv +0 -0
- {viewx-0.2.0 → viewx-0.2.1}/viewx.egg-info/dependency_links.txt +0 -0
- {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.
|
|
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.
|
|
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.
|
|
87
|
+
# 1. Crear datos de ejemplo
|
|
91
88
|
df_ventas = pd.DataFrame({
|
|
92
|
-
'
|
|
93
|
-
'Ventas': [
|
|
94
|
-
'
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
'
|
|
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.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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": "
|
|
117
|
+
"title": "📈 ViewX PRO",
|
|
117
118
|
"items": [
|
|
118
|
-
{"label": "
|
|
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
|
-
#
|
|
126
|
-
#
|
|
127
|
-
|
|
128
|
-
#
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
""
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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.
|
|
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.
|
|
33
|
+
# 1. Crear datos de ejemplo
|
|
36
34
|
df_ventas = pd.DataFrame({
|
|
37
|
-
'
|
|
38
|
-
'Ventas': [
|
|
39
|
-
'
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
'
|
|
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.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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": "
|
|
63
|
+
"title": "📈 ViewX PRO",
|
|
62
64
|
"items": [
|
|
63
|
-
{"label": "
|
|
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
|
-
#
|
|
71
|
-
#
|
|
72
|
-
|
|
73
|
-
#
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
""
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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.
|
|
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")
|