Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

97
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.