If you have to start from scrach: Start by importing marketplace module AnyChart. Than get a copy of the domainmodel from marketplace module SystemManagement and see Entity_CreateDataJSON_OnlyModuleSystem for getting the data. Then work with the dates.
For some examples see https://mydemoversion8-sandbox.mxapps.io/p/charts, whos .mpk you can fork from here: https://github.com/TimvanSteenbergen/MyDemoVersion8.
Once you have it, please commit a pull-request, since I would love add to this as an example.