chartjs / chartjs/chartjs-chart-financial

Type Error from chart.js using candlestick charts

Open
#128 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
809
Forks
199
PR merge metrics
No merged PRs in 30d

Description

Here is the error:
Screenshot 2022-05-28 at 11 46 52

Here is a simple coding example
`




Document




const labels = [
'January',
'February',
'March',
'April',
'May',
'June',
];

const startingDate = luxon.DateTime.fromRFC2822("01 Aug 2021 00:00 GMT")
let date = luxon.DateTime.fromRFC2822('01 Apr 2017 00:00 Z');
// const startingDate = "01 Aug 2021 00:00 GMT"
console.log(startingDate.valueOf())
const data = {

labels: labels,
datasets: [{
label: 'My First dataset',
data: [
{
x: date.valueOf(),
o: 1,
l: 0.5,
h: 2,
c: 1.5
},

],
}]
};

const config = {
type: 'candlestick',
data: data,
options: {}
};



const myChart = new Chart(
document.getElementById('myChart'),
config
);



`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.