From ce094e65f02549e75f0487b2abc6561d19049233 Mon Sep 17 00:00:00 2001 From: hansmaad Date: Wed, 30 Sep 2015 09:33:53 +0200 Subject: [PATCH] Fix onZoom callback in demo. Add css class to readme. Fix bower.json --- README.md | 9 + bower.json | 5 +- demo.html | 8 +- dist/LICENSE | 13 ++ dist/chartist-plugin-zoom.js | 204 +++++++++++++++++ dist/chartist-plugin-zoom.min.js | 2 + dist/chartist-plugin-zoom.min.js.map | 1 + src/scripts/chartist-plugin-zoom.js | 330 ++++++++++++++------------- 8 files changed, 401 insertions(+), 171 deletions(-) create mode 100644 dist/LICENSE create mode 100644 dist/chartist-plugin-zoom.js create mode 100644 dist/chartist-plugin-zoom.min.js create mode 100644 dist/chartist-plugin-zoom.min.js.map diff --git a/README.md b/README.md index 324cf59..9269f5c 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ var defaultOptions = { ## Sample usage in Chartist.js + ```javascript var chart = new Chartist.Line('.ct-chart', { series: [/* */] @@ -27,3 +28,11 @@ var chart = new Chartist.Line('.ct-chart', { ] }); ``` + +```css +/* style the svg rect */ +.ct-zoom-rect { + fill: rgba(200, 100, 100, 0.3); + stroke: red; +} +``` diff --git a/bower.json b/bower.json index 6d71478..065bd52 100644 --- a/bower.json +++ b/bower.json @@ -1,11 +1,10 @@ { - "name": "chartist-zoom-pointlabels", - "version": "0.0.0", + "name": "chartist-plugin-zoom", "main": [ "./dist/chartist-plugin-zoom.min.js" ], "dependencies": { - "chartist": "~0.9.0" + "chartist": "~0.9.4" }, "ignore": [ ".*", diff --git a/demo.html b/demo.html index 1d6fd60..b9b5b5a 100644 --- a/demo.html +++ b/demo.html @@ -14,10 +14,10 @@

Chartist Zoom Plugin

Use left mouse button to drag a zoom box. Reset zoom with right mouse button.

-
+
- +