From 5dc992dca8c8b566619eb89f805f4a4a39f7c50c Mon Sep 17 00:00:00 2001 From: Jason Roman Date: Sun, 7 Dec 2014 11:31:09 -0500 Subject: [PATCH] updating example.html to be more consistent with flot plugin passing (plot, data, options) --- example.html | 11 +++++------ jquery.flot.barnumbers.enhanced.js | 2 +- jquery.flot.barnumbers.enhanced.min.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/example.html b/example.html index e48dc26..9df8967 100644 --- a/example.html +++ b/example.html @@ -25,9 +25,8 @@ var dataVertical = [[0, 1], [1, 9], [2, 7], [3, 14], [4, 10], [5, 2]]; var dataHorizontal = [[1, 0], [9, 1], [7, 2], [14, 3], [10, 4], [2, 5]]; - $.plot("#placeholder", [ + $.plot("#placeholder", [dataVertical], { - data: dataVertical, bars: { show: true, barWidth: 0.9, @@ -43,10 +42,10 @@ } } } - ]); - $.plot("#placeholder-horizontal", [ + ); + + $.plot("#placeholder-horizontal", [dataHorizontal], { - data: dataHorizontal, bars: { show: true, barWidth: 0.9, @@ -63,7 +62,7 @@ } } } - ]); + ); }); diff --git a/jquery.flot.barnumbers.enhanced.js b/jquery.flot.barnumbers.enhanced.js index e903ebc..24997a4 100644 --- a/jquery.flot.barnumbers.enhanced.js +++ b/jquery.flot.barnumbers.enhanced.js @@ -207,4 +207,4 @@ version: '1.0' }); -})(jQuery); +})(jQuery); \ No newline at end of file diff --git a/jquery.flot.barnumbers.enhanced.min.js b/jquery.flot.barnumbers.enhanced.min.js index c3bc0cf..7733c77 100644 --- a/jquery.flot.barnumbers.enhanced.min.js +++ b/jquery.flot.barnumbers.enhanced.min.js @@ -1 +1 @@ -!function(a){"use strict";function c(b){a.each(b.getData(),function(c,d){var e,f,g,h,i=d.bars.numbers;if(e=a.isFunction(i.xAlign)?i.xAlign:d.bars.horizontal?function(a){return a/2}:function(a){return a+d.bars.barWidth/2},f=a.isFunction(i.yAlign)?i.yAlign:d.bars.horizontal?function(a){return a+d.bars.barWidth/2}:function(a){return a/2},g=d.bars.horizontal?0:1,!i.show)return!1;var j=d.datapoints.points,k=b.getCanvas().getContext("2d"),l=b.getPlotOffset();k.font=i.font,k.fillStyle=i.fontColor,k.textBaseline="middle",k.textAlign="center";var m={0:"x",1:"y"};for(h=0;h=b.getAxes().xaxis.max*i.threshold?(o*=-1,k.textAlign="end"):k.textAlign="start":i.threshold&&!d.bars.horizontal&&(j[q]=b.getAxes().xaxis.max*i.threshold?(o*=-1,k.textAlign="end"):k.textAlign="start":i.threshold&&!d.bars.horizontal&&(j[q]