Graph is not plotting correctly
kishoretankhupp opened this issue · comments
Hello,
Here is my data if i use only for the 1D data then graph plotting correctly as you can see it on screenshort too.
points={[
{'date': new Date('2023-11-20T19:00:00.000Z'), 'value': 131.18},
{'date': new Date('2023-11-20T19:30:00.000Z'), 'value': 131.43},
{'date': new Date('2023-11-20T20:00:00.000Z'), 'value': 124.52},
{'date': new Date('2023-11-20T20:30:00.000Z'), 'value': 131.94},
{'date': new Date('2023-11-20T21:00:00.000Z'), 'value': 139.96},
{'date': new Date('2023-11-20T21:30:00.000Z'), 'value': 131.88},
{'date': new Date('2023-11-20T22:00:00.000Z'), 'value': 128.31},
{'date': new Date('2023-11-20T22:30:00.000Z'), 'value': 127.59},
{'date': new Date('2023-11-20T23:00:00.000Z'), 'value': 100.27},
{'date': new Date('2023-11-20T23:30:00.000Z'), 'value': 141.49
}]
But if i use 2 days data with the some difference to time
points={[
{'date': new Date('2023-11-20T19:00:00.000Z'), 'value': 131.18},
{'date': new Date('2023-11-20T19:30:00.000Z'), 'value': 131.43},
{'date': new Date('2023-11-20T20:00:00.000Z'), 'value': 124.52},
{'date': new Date('2023-11-20T20:30:00.000Z'), 'value': 131.94},
{'date': new Date('2023-11-20T21:00:00.000Z'), 'value': 139.96},
{'date': new Date('2023-11-20T21:30:00.000Z'), 'value': 131.88},
{'date': new Date('2023-11-20T22:00:00.000Z'), 'value': 128.31},
{'date': new Date('2023-11-20T22:30:00.000Z'), 'value': 127.59},
{'date': new Date('2023-11-20T23:00:00.000Z'), 'value': 100.27},
{'date': new Date('2023-11-20T23:30:00.000Z'), 'value': 141.49},
{'date': new Date('2023-11-21T00:00:00.000Z'), 'value': 100.49},
{'date': new Date('2023-11-21T19:00:00.000Z'), 'value': 120.49},
{'date': new Date('2023-11-21T19:30:00.000Z'), 'value': 121.43},
]}
Can you please help that what i am doing the wrong here?
Thanks
+1
Hi guys, is this chart library plotting correctly charts for you (did you check it)? Trying to use it but charts doesn't reflect datasets at all (the chart's line doesn't match dataset). Maybe doing something wrong because it looks like I am the only person with that issue. But It just doesn't work for me.
Take a look here #93
We'll soon merge a PR that adds a disableSmoothing
prop to <LineGraph />
, which let's you disable the smoothing logic that causes these issues.
This will remove any inaccuracies with the dataset. A new NPM version should be out soon!
Closing this issue for now. If something doesn't work, let me know.