Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 14, 2023 15:41
Show Gist options
  • Save parzibyte/29e5b6eef27b493a5051ebcf252e89e2 to your computer and use it in GitHub Desktop.
Save parzibyte/29e5b6eef27b493a5051ebcf252e89e2 to your computer and use it in GitHub Desktop.
this.grafica = new Chart(document.querySelector("#graficaMes"), {
type: "line",
data: {
labels: diasConTotal.map((dato) => {
const fecha = new Date(fechaInicioMes);
fecha.setDate(dato.etiqueta);
return formateadorMes(fecha);
}),
datasets: [
{
label: "Recaudado",
data: diasConTotal.map((dato) => dato.total),
backgroundColor: ConstantesService.BACKGROUND_COLORS,
borderColor: ConstantesService.BORDER_COLORS,
borderWidth: 1,
},
],
},
options: GraficasService.obtenerOpciones(),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment