Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

108
Vistas
Import Financial chartjs

I'm trying to implement the Financial 'candlestick' chart type from the Chartjs library (I'm using version 2.7.1).

I followed the steps of the example provided in the documentation, but I always get this error "chart.min.js: 10 Uncaught Error: 'candlestick' is not a chart type."

can anyone tell me how this type of extension is implemented?

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

There is only 1 version of chart.js released and this version is for chart.js v3 since you are working with chart.js v2 you are not able to use this chart type so you will need to update to chart.js v3.

Chart.js v3 has some major breaking changes which you can read in the migration guide

Edit:

While using the financial lib with bundlers you will need to import and register everything like so:

import { OhlcElement, OhlcController, CandlestickElement, CandlestickController } from 'chartjs-chart-financial'
import Chart from 'chart.js/auto' // Easy way of importing everything

Chart.register(OhlcElement, OhlcController, CandlestickElement, CandlestickController)
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos