chartjs / chartjs-chart-financial

Chart.js module for charting financial securities
MIT License
725 stars 197 forks source link

Not working correctly error getMonth of undefined #13

Closed DepickereSven closed 6 years ago

DepickereSven commented 6 years ago

I created the example. So I want to use my date to check it out. This is my data:

0:{t: 1502881200000, o: 0.00001194, h: 0.0000138, l: 0.00001122, c: 0.0000128}
1:{t: 1502883000000, o: 0.0000128, h: 0.0000143, l: 0.0000128, c: 0.00001383}
2:{t: 1502884800000, o: 0.00001368, h: 0.00001369, l: 0.000013, c: 0.00001319}
3:{t: 1502886600000, o: 0.00001319, h: 0.00001323, l: 0.00001296, c: 0.00001302}

I get this error:

Chart.Financial.js:5077 Uncaught TypeError: Cannot read property 'getMonth' of undefined at parseTime (Chart.Financial.js:5077) at ChartElement.getPixelForTick (Chart.Financial.js:5419) at ChartElement.calculateTickRotation (Chart.bundle.js:11905) at ChartElement.update (Chart.bundle.js:11803) at getMinimumBoxSize (Chart.bundle.js:11062) at Object.helpers.each (Chart.bundle.js:9515) at Object.update (Chart.bundle.js:11076) at Chart.updateLayout (Chart.bundle.js:8577) at Chart.update (Chart.bundle.js:8543) at Chart.construct (Chart.bundle.js:8307)

and then this one:

Chart.bundle.js:10518 Uncaught TypeError: Cannot read property 'skip' of undefined at parseVisibleItems ([SOME_DIR]/assets/charts/Chart.bundle.js:10518:23) at getIntersectItems ([SOME_DIR]/assets/charts/Chart.bundle.js:10534:3) at indexMode ([SOME_DIR]/assets/charts/Chart.bundle.js:10584:35) at Chart.getElementsAtEventForMode ([SOME_DIR]/assets/charts/Chart.bundle.js:8781:12) at Chart.handleEvent [SOME_DIR]/assets/charts/Chart.bundle.js:8994:20) at Chart.eventHandler ([SOME_DIR]/assets/charts/Chart.bundle.js:8952:21) at listener ([SOME_DIR]/assets/charts/Chart.bundle.js:8887:21) at HTMLCanvasElement.proxies.(anonymous function) [SOME_DIR]/assets/charts/Chart.bundle.js:14386:5)

I don't know what I did wrong or of this is a know issue.

benmccann commented 6 years ago

We have published samples now: http://www.chartjs.org/chartjs-chart-financial/

I'm not sure if the samples help you understand what you may have done incorrectly. Unfortunately we don't have the resources to solve individual problems. Unless you can show there's a bug in the code we wouldn't be able to help