bernhard Posted April 11, 2021 Share Posted April 11, 2021 Can anybody please help me getting this chart.js work? ? https://jsfiddle.net/baumrock/f96483en/1/ It should look like this example in the docs, but I can't just copy the code of the docs over because I don't have all those util functions on my setup. Maybe someone could explain how I can make those docs examples work on my laptop as well? https://www.chartjs.org/docs/latest/samples/scales/time-max-span.html Link to comment Share on other sites More sharing options...
3fingers Posted April 11, 2021 Share Posted April 11, 2021 Hello @bernhard, playing around a bit with your example I came up with: https://codepen.io/3fingers/pen/dyNdvyx Note I uncommented line 63 on my example, which looks like the culprit for the blank result, so there is something related to time values I didn't figured out (even though I've tried different formats). 1 Link to comment Share on other sites More sharing options...
bernhard Posted April 12, 2021 Author Share Posted April 12, 2021 Thx, unfortunately that does not help. That's now a regular line chart having "stupid" axis that are not aware of the date (having wrong sort order and wrong distance). Also I'd really need some help how to use all the examples in the docs and how I can customize them for my needs... The installation section (https://www.chartjs.org/docs/latest/getting-started/installation.html) does not help me either - I have no idea about all those module packer systems. I've tried to do some research but it did not help.. Maybe someone can give me pointers in the right direction ? thanks! Link to comment Share on other sites More sharing options...
LostKobrakai Posted April 14, 2021 Share Posted April 14, 2021 You can look at the utils here: https://github.com/chartjs/Chart.js/blob/master/docs/scripts/utils.js. Seems like there not really complex, but likely make documentation examples more terse. 1 Link to comment Share on other sites More sharing options...
bernhard Posted April 14, 2021 Author Share Posted April 14, 2021 Thx. But how do I integrate them in my project (for testing and playing around with the chart.js samples)? My javascript level is unfortunately not the best, so I'm overwhelmed by all those new module/import/export stuff and how to use it ? Link to comment Share on other sites More sharing options...
Recommended Posts