Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

227
Vistas
ReactChart2 - Line is not a registered Element

I can't seem to fix this error which is only happening after I've deployed and it's driving me crazy. I've tried everything from all other stack overflow suggestions with no luck. I get no errors on local, however when I deploy to Heroku I get the error "Error: "line" is not a registered controller." Any ideas?

import React, { useState } from 'react';
import {
    Chart as ChartJS,
    CategoryScale,
    LinearScale,
    BarElement,
    Title,
    Tooltip,
    Legend,
    PointElement,
    LineElement,
} from 'chart.js';
ChartJS.register(
    CategoryScale,
    LinearScale,
    BarElement,
    PointElement,
    LineElement,
    Title,
    Tooltip,
    Legend,
);
import { Chart } from 'react-chartjs-2';
const staticData = [
        {
            type: 'line',
            label: 'Macleay Island Avg',
            backgroundColor: '#38A169',
            borderColor: '#38A169',
            order: 1
        },
        {
            type: 'bar',
            label: 'Macleay Island Total',
            backgroundColor: '#C6F6D5',
            order: 3

        },
        {
            type: 'line',
            label: 'Russell Island Avg',
            backgroundColor: '#F56565',
            borderColor: '#F56565',
            order: 2
        },
        {
            type: 'bar',
            label: 'Russell Island Total',
            backgroundColor: '#FED7D7',
            borderColor: 'rgb(14, 142, 205)',
            order: 4
        }
    ]
return (
        <>
            <Chart type='bar' data={graphData} />
        </>
    )
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You need to import and register the LineController

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda