FVANCOP / ChartNew.js

MIT License
420 stars 143 forks source link

Help needed. #491

Closed jordanamos closed 7 years ago

jordanamos commented 7 years ago

Hi, I am having trouble making a graph to look like this: https://gyazo.com/6275ce0de9713ce6f44544013dc27311 or similar. I am given a list of names and a "startdate" and a "finishdate" for each. What is the best way to represent this, is it possible? any help would be appreciated, i have been through the documentation for many hours however i cannot for the life of me find a starting point.

Thanks in advance

FVANCOP commented 7 years ago

Hi,

I first thought that it was not possible... But with little changes, I could achieve an interesting result :

canvas

The changes necessary to achieve this result are not yet available in the official version (will be soon available; I still have to test it).

If you don't want to wait that this version becomes the official version, you can download the annotate.js branch at https://github.com/FVANCOP/ChartNew.js/tree/annotate.js . In this branch, the new "Samples/attendance_chart.html" produces the chart that you found here before (This branch will disappear in a couple of day).

In the code of the sample, you can change several parameters :

See also the options if you prefer to have the date on the top of the chart (but in that case, you can not rotate the labels to 45 degrees).

FVANCOP commented 7 years ago

The branch has been merged; So you have now to download the official version !