Closed zacko83 closed 4 years ago
I'm afraid I don't have much time to look at reports and it's not clear the issue is in this library. Please either file this bug with ng2-charts or reproduce it without the angular code. If you look at the demo for this library it does skip weekends, so that shouldn't be an issue. It sounds like perhaps the ng2-charts wrapper is doing something weird, but I'm not going to learn angular and spend time figuring out what's going on here
You're absolutely right. I just repeated my tests with plain JS and it worked as expected. I will open the issue on ng2-charts.
Thanks for the help.
Trying to plot a financial chart with data from the S&P, I ran into a strange problem. The chart itself is plotted correctly. However on the x-axis only about half of the labels and the according grid lines are drawn:
I first used the sample code of the Angular 2 Charts Demo, which works perfectly. What makes the difference is the data used. Therefore I also added the data as JSON here.
Please note, there isn't a data point for each day. There are of course no quotes on weekends or holidays. When I fake the timestamp to be continuous, the x-axis labels and grid lines are drawn correctly. Also, taking a subset of the unaltered data, works just fine.
The code is pretty straight forward:
HTML:
The angular component:
The data used as JSON: