From e8a37fd5ec4ad0629e3f3f849c714ada162d0c0a Mon Sep 17 00:00:00 2001 From: Boyi C Date: Tue, 24 Apr 2018 14:08:11 +0800 Subject: [PATCH] Bump version to 0.1.5 Add example to README.md --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7245591..a98c023 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,51 @@ # chartjs-chart-timeline Timeline chart library for Chart.js. +```javascript +"type": "timeline", +"options": { + "colorFunction": function(text, data, dataset, index) { + return Color('black'); + }, + "showText": true, + "textPadding": 4, +}, +"data": { + "labels": [ + "Cool Graph", + "heater1" + ], + "datasets": [ + { + "data": [ + [ + "2018-01-22T16:00:00.000Z", + "2018-01-23T05:40:44.626Z", + "Unknown" + ] + ] + }, + { + "data": [ + [ + "2018-01-22T16:00:00.000Z", + "2018-01-23T04:57:43.736Z", + "On" + ], + [ + "2018-01-23T04:57:43.736Z", + "2018-01-23T04:57:55.437Z", + "Off" + ], + [ + "2018-01-23T04:57:55.437Z", + "2018-01-23T05:40:44.626Z", + "On" + ] + ] + } + ] +}, +``` + Usage: https://github.com/fanthos/chartjs-chart-timeline/wiki diff --git a/package.json b/package.json index 796eede..48398ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chartjs-chart-timeline", - "version": "0.1.4", + "version": "0.1.5", "description": "timeline chart type for chart.js", "main": "timeline.js", "scripts": {