amcharts.rb 3.11.2.14 → 3.11.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +12 -0
- data/README.md +1 -1
- data/amcharts.rb.gemspec +12 -5
- data/lib/amcharts/chart.rb +22 -2
- data/lib/amcharts/settings.rb +2 -2
- data/lib/amcharts/version.rb +1 -1
- data/spec/chart_spec.rb +96 -11
- data/vendor/assets/javascripts/amcharts/amcharts.js +380 -380
- data/vendor/assets/javascripts/amcharts/amstock.js +97 -97
- data/vendor/assets/javascripts/amcharts/changeLog.txt +1070 -1070
- data/vendor/assets/javascripts/amcharts/exporting/amexport.js +854 -854
- data/vendor/assets/javascripts/amcharts/exporting/canvg.js +2841 -2841
- data/vendor/assets/javascripts/amcharts/exporting/rgbcolor.js +288 -288
- data/vendor/assets/javascripts/amcharts/funnel.js +16 -16
- data/vendor/assets/javascripts/amcharts/gauge.js +19 -19
- data/vendor/assets/javascripts/amcharts/lang/de.js +12 -12
- data/vendor/assets/javascripts/amcharts/licence.txt +15 -15
- data/vendor/assets/javascripts/amcharts/pie.js +9 -9
- data/vendor/assets/javascripts/amcharts/radar.js +9 -9
- data/vendor/assets/javascripts/amcharts/serial.js +56 -56
- data/vendor/assets/javascripts/amcharts/themes/black.js +205 -205
- data/vendor/assets/javascripts/amcharts/themes/chalk.js +216 -216
- data/vendor/assets/javascripts/amcharts/themes/dark.js +204 -204
- data/vendor/assets/javascripts/amcharts/themes/light.js +198 -198
- data/vendor/assets/javascripts/amcharts/themes/patterns.js +258 -258
- data/vendor/assets/javascripts/amcharts/thirdPartySoftwareList.txt +33 -33
- data/vendor/assets/javascripts/amcharts/xy.js +16 -16
- metadata +69 -49
@@ -1,34 +1,34 @@
|
|
1
|
-
*********************************************************************************
|
2
|
-
Third party software used:
|
3
|
-
|
4
|
-
Jason S. Kerchner base class (http://livingmachines.net)
|
5
|
-
Licensed under BSD license: http://livingmachines.net/license/
|
6
|
-
|
7
|
-
David Knape & Patrick Mineault Bezier curves drawing logic.
|
8
|
-
|
9
|
-
Code optimization made using Closure Compiling service:
|
10
|
-
http://closure-compiler.appspot.com/home
|
11
|
-
|
12
|
-
Libraries used for exporting charts as image/pdf/svg:
|
13
|
-
|
14
|
-
canvg.js - Javascript SVG parser and renderer on Canvas
|
15
|
-
MIT Licensed
|
16
|
-
Gabe Lerner (gabelerner@gmail.com)
|
17
|
-
http://code.google.com/p/canvg/
|
18
|
-
|
19
|
-
rgbcolor.js
|
20
|
-
A class to parse color values
|
21
|
-
author Stoyan Stefanov, sstoo@gmail.com
|
22
|
-
http://www.phpied.com/rgb-color-parser-in-javascript/
|
23
|
-
license Use it if you like it
|
24
|
-
|
25
|
-
FileSaver.js
|
26
|
-
A saveAs() FileSaver implementation.
|
27
|
-
By Eli Grey, http://eligrey.com
|
28
|
-
License: X11/MIT
|
29
|
-
|
30
|
-
jsPDF.js
|
31
|
-
By James Hall
|
32
|
-
License: MIT
|
33
|
-
|
1
|
+
*********************************************************************************
|
2
|
+
Third party software used:
|
3
|
+
|
4
|
+
Jason S. Kerchner base class (http://livingmachines.net)
|
5
|
+
Licensed under BSD license: http://livingmachines.net/license/
|
6
|
+
|
7
|
+
David Knape & Patrick Mineault Bezier curves drawing logic.
|
8
|
+
|
9
|
+
Code optimization made using Closure Compiling service:
|
10
|
+
http://closure-compiler.appspot.com/home
|
11
|
+
|
12
|
+
Libraries used for exporting charts as image/pdf/svg:
|
13
|
+
|
14
|
+
canvg.js - Javascript SVG parser and renderer on Canvas
|
15
|
+
MIT Licensed
|
16
|
+
Gabe Lerner (gabelerner@gmail.com)
|
17
|
+
http://code.google.com/p/canvg/
|
18
|
+
|
19
|
+
rgbcolor.js
|
20
|
+
A class to parse color values
|
21
|
+
author Stoyan Stefanov, sstoo@gmail.com
|
22
|
+
http://www.phpied.com/rgb-color-parser-in-javascript/
|
23
|
+
license Use it if you like it
|
24
|
+
|
25
|
+
FileSaver.js
|
26
|
+
A saveAs() FileSaver implementation.
|
27
|
+
By Eli Grey, http://eligrey.com
|
28
|
+
License: X11/MIT
|
29
|
+
|
30
|
+
jsPDF.js
|
31
|
+
By James Hall
|
32
|
+
License: MIT
|
33
|
+
|
34
34
|
*********************************************************************************
|
@@ -1,17 +1,17 @@
|
|
1
|
-
AmCharts.AmXYChart=AmCharts.Class({inherits:AmCharts.AmRectangularChart,construct:function(a){this.type="xy";AmCharts.AmXYChart.base.construct.call(this,a);this.cname="AmXYChart";this.theme=a;this.createEvents("zoomed");this.maxZoomFactor=20;AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmXYChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.updateScrollbar=!0;this.drawChart();this.autoMargins&&!this.marginsUpdated&&
|
2
|
-
(this.marginsUpdated=!0,this.measureMargins());var a=this.marginLeftReal,c=this.marginTopReal,b=this.plotAreaWidth,d=this.plotAreaHeight;this.graphsSet.clipRect(a,c,b,d);this.bulletSet.clipRect(a,c,b,d);this.trendLinesSet.clipRect(a,c,b,d)},prepareForExport:function(){var a=this.bulletSet;a.clipPath&&this.container.remove(a.clipPath)},createValueAxes:function(){var a=[],c=[];this.xAxes=a;this.yAxes=c;var b=this.valueAxes,d,e;for(e=0;e<b.length;e++){d=b[e];var f=d.position;if("top"==f||"bottom"==f)d.rotate=
|
3
|
-
!0;d.setOrientation(d.rotate);f=d.orientation;"V"==f&&c.push(d);"H"==f&&a.push(d)}0===c.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!1,d.setOrientation(!1),b.push(d),c.push(d));0===a.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!0,d.setOrientation(!0),b.push(d),a.push(d));for(e=0;e<b.length;e++)this.processValueAxis(b[e],e);a=this.graphs;for(e=0;e<a.length;e++)this.processGraph(a[e],e)},drawChart:function(){AmCharts.AmXYChart.base.drawChart.call(this);AmCharts.ifArray(this.chartData)?
|
4
|
-
(this.chartScrollbar&&this.updateScrollbars(),this.zoomObjects(this.valueAxes),this.zoomChart()):this.cleanChart();if(this.hideXScrollbar){var a=this.scrollbarH;a&&(this.removeListener(a,"zoomed",this.handleHSBZoom),a.destroy());this.scrollbarH=null}if(this.hideYScrollbar){if(a=this.scrollbarV)this.removeListener(a,"zoomed",this.handleVSBZoom),a.destroy();this.scrollbarV=null}if(!this.autoMargins||this.marginsUpdated)this.dispDUpd(),this.chartCreated=!0,this.zoomScrollbars()},cleanChart:function(){AmCharts.callMethod("destroy",
|
5
|
-
[this.valueAxes,this.graphs,this.scrollbarV,this.scrollbarH,this.chartCursor])},zoomChart:function(){this.toggleZoomOutButton();this.zoomObjects(this.valueAxes);this.zoomObjects(this.graphs);this.zoomTrendLines();this.dispatchAxisZoom()},toggleZoomOutButton:function(){1==this.heightMultiplier&&1==this.widthMultiplier?this.showZB(!1):this.showZB(!0)},dispatchAxisZoom:function(){var a=this.valueAxes,c;for(c=0;c<a.length;c++){var b=a[c];if(!isNaN(b.min)&&!isNaN(b.max)){var d,e;"V"==b.orientation?(d=
|
6
|
-
b.coordinateToValue(-this.verticalPosition),e=b.coordinateToValue(-this.verticalPosition+this.plotAreaHeight)):(d=b.coordinateToValue(-this.horizontalPosition),e=b.coordinateToValue(-this.horizontalPosition+this.plotAreaWidth));if(!isNaN(d)&&!isNaN(e)){if(d>e){var f=e;e=d;d=f}b.dispatchZoomEvent(d,e)}}}},zoomObjects:function(a){var c=a.length,b;for(b=0;b<c;b++){var d=a[b];d.minTemp=d.min;d.maxTemp=d.max;this.updateObjectSize(d);d.zoom(0,this.chartData.length-1)}d.minTemp=NaN;d.maxTemp=NaN},updateData:function(){this.parseData();
|
7
|
-
var a=this.chartData,c=a.length-1,b=this.graphs,d=this.dataProvider,e=-Infinity,f=Infinity,k,g;for(k=0;k<b.length;k++)if(g=b[k],g.data=a,g.zoom(0,c),g=g.valueField){var m;for(m=0;m<d.length;m++){var h=Number(d[m][g]);h>e&&(e=h);h<f&&(f=h)}}for(k=0;k<b.length;k++)g=b[k],g.maxValue=e,g.minValue=f;if(a=this.chartCursor)a.updateData(),a.type="crosshair",a.valueBalloonsEnabled=!1},zoomOut:function(){this.verticalPosition=this.horizontalPosition=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomChart();
|
8
|
-
this.zoomScrollbars()},processValueAxis:function(a){a.chart=this;a.minMaxField="H"==a.orientation?"x":"y";a.min=NaN;a.max=NaN;this.listenTo(a,"axisSelfZoomed",this.handleAxisSelfZoom)},processGraph:function(a){AmCharts.isString(a.xAxis)&&(a.xAxis=this.getValueAxisById(a.xAxis));AmCharts.isString(a.yAxis)&&(a.yAxis=this.getValueAxisById(a.yAxis));a.xAxis||(a.xAxis=this.xAxes[0]);a.yAxis||(a.yAxis=this.yAxes[0]);a.valueAxis=a.yAxis},parseData:function(){AmCharts.AmXYChart.base.parseData.call(this);
|
9
|
-
this.chartData=[];var a=this.dataProvider,c=this.valueAxes,b=this.graphs,d;if(a)for(d=0;d<a.length;d++){var e={axes:{},x:{},y:{}},f=a[d],k;for(k=0;k<c.length;k++){var g=c[k].id;e.axes[g]={};e.axes[g].graphs={};var m;for(m=0;m<b.length;m++){var h=b[m],q=h.id;if(h.xAxis.id==g||h.yAxis.id==g){var n={};n.serialDataItem=e;n.index=d;var p={},l=Number(f[h.valueField]);isNaN(l)||(p.value=l);l=Number(f[h.xField]);isNaN(l)||(p.x=l);l=Number(f[h.yField]);isNaN(l)||(p.y=l);l=Number(f[h.errorField]);isNaN(l)||
|
10
|
-
(p.error=l);n.values=p;this.processFields(h,n,f);n.serialDataItem=e;n.graph=h;e.axes[g].graphs[q]=n}}}this.chartData[d]=e}},formatString:function(a,c,b){var d=c.graph.numberFormatter;d||(d=this.nf);a=AmCharts.formatValue(a,c.values,["value","x","y"],d);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,c.dataContext));return a=AmCharts.AmXYChart.base.formatString.call(this,a,c,b)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar,this.scrollbarH,this.scrollbarV]);
|
11
|
-
if(a){this.chartScrollbar=a;this.scrollbarHeight=a.scrollbarHeight;var c="backgroundColor backgroundAlpha selectedBackgroundColor selectedBackgroundAlpha scrollDuration resizeEnabled hideResizeGrips scrollbarHeight updateOnReleaseOnly".split(" ");if(!this.hideYScrollbar){var b=new AmCharts.SimpleChartScrollbar(this.theme);b.skipEvent=!0;b.chart=this;this.listenTo(b,"zoomed",this.handleVSBZoom);AmCharts.copyProperties(a,b,c);b.rotate=!0;this.scrollbarV=b}this.hideXScrollbar||(b=new AmCharts.SimpleChartScrollbar(this.theme),
|
12
|
-
b.skipEvent=!0,b.chart=this,this.listenTo(b,"zoomed",this.handleHSBZoom),AmCharts.copyProperties(a,b,c),b.rotate=!1,this.scrollbarH=b)}},updateTrendLines:function(){var a=this.trendLines,c;for(c=0;c<a.length;c++){var b=a[c],b=AmCharts.processObject(b,AmCharts.TrendLine,this.theme);a[c]=b;b.chart=this;var d=b.valueAxis;AmCharts.isString(d)&&(b.valueAxis=this.getValueAxisById(d));d=b.valueAxisX;AmCharts.isString(d)&&(b.valueAxisX=this.getValueAxisById(d));b.valueAxis||(b.valueAxis=this.yAxes[0]);b.valueAxisX||
|
13
|
-
(b.valueAxisX=this.xAxes[0])}},updateMargins:function(){AmCharts.AmXYChart.base.updateMargins.call(this);var a=this.scrollbarV;a&&(this.getScrollbarPosition(a,!0,this.yAxes[0].position),this.adjustMargins(a,!0));if(a=this.scrollbarH)this.getScrollbarPosition(a,!1,this.xAxes[0].position),this.adjustMargins(a,!1)},updateScrollbars:function(){AmCharts.AmXYChart.base.updateScrollbars.call(this);var a=this.scrollbarV;a&&(this.updateChartScrollbar(a,!0),a.draw());if(a=this.scrollbarH)this.updateChartScrollbar(a,
|
14
|
-
!1),a.draw()},zoomScrollbars:function(){var a=this.scrollbarH;a&&a.relativeZoom(this.widthMultiplier,-this.horizontalPosition/this.widthMultiplier);(a=this.scrollbarV)&&a.relativeZoom(this.heightMultiplier,-this.verticalPosition/this.heightMultiplier)},fitMultiplier:function(a){a>this.maxZoomFactor&&(a=this.maxZoomFactor);return a},fitH:function(a,c){var b=-(this.plotAreaWidth*c-this.plotAreaWidth);a<b&&(a=b);this.horizontalPosition=a},fitV:function(a,c){var b=-(this.plotAreaHeight*c-this.plotAreaHeight);
|
15
|
-
a<b&&(a=b);this.verticalPosition=a},handleHSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);this.fitH(-a.position*c,c);this.widthMultiplier=c;this.zoomChart()},handleVSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);this.fitV(-a.position*c,c);this.heightMultiplier=c;this.zoomChart()},handleAxisSelfZoom:function(a){if("H"==a.valueAxis.orientation){var c=this.fitMultiplier(a.multiplier);this.fitH(-a.position*c,c);this.widthMultiplier=c}else c=this.fitMultiplier(a.multiplier),this.fitV(-a.position*
|
16
|
-
c,c),this.heightMultiplier=c;this.zoomChart();a=this.graphs;for(c=0;c<a.length;c++)a[c].setAnimationPlayed();this.zoomScrollbars()},handleCursorZoom:function(a){var c=this.widthMultiplier*this.plotAreaWidth/a.selectionWidth,b=this.heightMultiplier*this.plotAreaHeight/a.selectionHeight,c=this.fitMultiplier(c),b=this.fitMultiplier(b),d=(this.verticalPosition-a.selectionY)*b/this.heightMultiplier;this.fitH((this.horizontalPosition-a.selectionX)*c/this.widthMultiplier,c);this.fitV(d,b);this.widthMultiplier=
|
1
|
+
AmCharts.AmXYChart=AmCharts.Class({inherits:AmCharts.AmRectangularChart,construct:function(a){this.type="xy";AmCharts.AmXYChart.base.construct.call(this,a);this.cname="AmXYChart";this.theme=a;this.createEvents("zoomed");this.maxZoomFactor=20;AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmXYChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.updateScrollbar=!0;this.drawChart();this.autoMargins&&!this.marginsUpdated&&
|
2
|
+
(this.marginsUpdated=!0,this.measureMargins());var a=this.marginLeftReal,c=this.marginTopReal,b=this.plotAreaWidth,d=this.plotAreaHeight;this.graphsSet.clipRect(a,c,b,d);this.bulletSet.clipRect(a,c,b,d);this.trendLinesSet.clipRect(a,c,b,d)},prepareForExport:function(){var a=this.bulletSet;a.clipPath&&this.container.remove(a.clipPath)},createValueAxes:function(){var a=[],c=[];this.xAxes=a;this.yAxes=c;var b=this.valueAxes,d,e;for(e=0;e<b.length;e++){d=b[e];var f=d.position;if("top"==f||"bottom"==f)d.rotate=
|
3
|
+
!0;d.setOrientation(d.rotate);f=d.orientation;"V"==f&&c.push(d);"H"==f&&a.push(d)}0===c.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!1,d.setOrientation(!1),b.push(d),c.push(d));0===a.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!0,d.setOrientation(!0),b.push(d),a.push(d));for(e=0;e<b.length;e++)this.processValueAxis(b[e],e);a=this.graphs;for(e=0;e<a.length;e++)this.processGraph(a[e],e)},drawChart:function(){AmCharts.AmXYChart.base.drawChart.call(this);AmCharts.ifArray(this.chartData)?
|
4
|
+
(this.chartScrollbar&&this.updateScrollbars(),this.zoomObjects(this.valueAxes),this.zoomChart()):this.cleanChart();if(this.hideXScrollbar){var a=this.scrollbarH;a&&(this.removeListener(a,"zoomed",this.handleHSBZoom),a.destroy());this.scrollbarH=null}if(this.hideYScrollbar){if(a=this.scrollbarV)this.removeListener(a,"zoomed",this.handleVSBZoom),a.destroy();this.scrollbarV=null}if(!this.autoMargins||this.marginsUpdated)this.dispDUpd(),this.chartCreated=!0,this.zoomScrollbars()},cleanChart:function(){AmCharts.callMethod("destroy",
|
5
|
+
[this.valueAxes,this.graphs,this.scrollbarV,this.scrollbarH,this.chartCursor])},zoomChart:function(){this.toggleZoomOutButton();this.zoomObjects(this.valueAxes);this.zoomObjects(this.graphs);this.zoomTrendLines();this.dispatchAxisZoom()},toggleZoomOutButton:function(){1==this.heightMultiplier&&1==this.widthMultiplier?this.showZB(!1):this.showZB(!0)},dispatchAxisZoom:function(){var a=this.valueAxes,c;for(c=0;c<a.length;c++){var b=a[c];if(!isNaN(b.min)&&!isNaN(b.max)){var d,e;"V"==b.orientation?(d=
|
6
|
+
b.coordinateToValue(-this.verticalPosition),e=b.coordinateToValue(-this.verticalPosition+this.plotAreaHeight)):(d=b.coordinateToValue(-this.horizontalPosition),e=b.coordinateToValue(-this.horizontalPosition+this.plotAreaWidth));if(!isNaN(d)&&!isNaN(e)){if(d>e){var f=e;e=d;d=f}b.dispatchZoomEvent(d,e)}}}},zoomObjects:function(a){var c=a.length,b;for(b=0;b<c;b++){var d=a[b];d.minTemp=d.min;d.maxTemp=d.max;this.updateObjectSize(d);d.zoom(0,this.chartData.length-1)}d.minTemp=NaN;d.maxTemp=NaN},updateData:function(){this.parseData();
|
7
|
+
var a=this.chartData,c=a.length-1,b=this.graphs,d=this.dataProvider,e=-Infinity,f=Infinity,k,g;for(k=0;k<b.length;k++)if(g=b[k],g.data=a,g.zoom(0,c),g=g.valueField){var m;for(m=0;m<d.length;m++){var h=Number(d[m][g]);h>e&&(e=h);h<f&&(f=h)}}for(k=0;k<b.length;k++)g=b[k],g.maxValue=e,g.minValue=f;if(a=this.chartCursor)a.updateData(),a.type="crosshair",a.valueBalloonsEnabled=!1},zoomOut:function(){this.verticalPosition=this.horizontalPosition=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomChart();
|
8
|
+
this.zoomScrollbars()},processValueAxis:function(a){a.chart=this;a.minMaxField="H"==a.orientation?"x":"y";a.min=NaN;a.max=NaN;this.listenTo(a,"axisSelfZoomed",this.handleAxisSelfZoom)},processGraph:function(a){AmCharts.isString(a.xAxis)&&(a.xAxis=this.getValueAxisById(a.xAxis));AmCharts.isString(a.yAxis)&&(a.yAxis=this.getValueAxisById(a.yAxis));a.xAxis||(a.xAxis=this.xAxes[0]);a.yAxis||(a.yAxis=this.yAxes[0]);a.valueAxis=a.yAxis},parseData:function(){AmCharts.AmXYChart.base.parseData.call(this);
|
9
|
+
this.chartData=[];var a=this.dataProvider,c=this.valueAxes,b=this.graphs,d;if(a)for(d=0;d<a.length;d++){var e={axes:{},x:{},y:{}},f=a[d],k;for(k=0;k<c.length;k++){var g=c[k].id;e.axes[g]={};e.axes[g].graphs={};var m;for(m=0;m<b.length;m++){var h=b[m],q=h.id;if(h.xAxis.id==g||h.yAxis.id==g){var n={};n.serialDataItem=e;n.index=d;var p={},l=Number(f[h.valueField]);isNaN(l)||(p.value=l);l=Number(f[h.xField]);isNaN(l)||(p.x=l);l=Number(f[h.yField]);isNaN(l)||(p.y=l);l=Number(f[h.errorField]);isNaN(l)||
|
10
|
+
(p.error=l);n.values=p;this.processFields(h,n,f);n.serialDataItem=e;n.graph=h;e.axes[g].graphs[q]=n}}}this.chartData[d]=e}},formatString:function(a,c,b){var d=c.graph.numberFormatter;d||(d=this.nf);a=AmCharts.formatValue(a,c.values,["value","x","y"],d);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,c.dataContext));return a=AmCharts.AmXYChart.base.formatString.call(this,a,c,b)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar,this.scrollbarH,this.scrollbarV]);
|
11
|
+
if(a){this.chartScrollbar=a;this.scrollbarHeight=a.scrollbarHeight;var c="backgroundColor backgroundAlpha selectedBackgroundColor selectedBackgroundAlpha scrollDuration resizeEnabled hideResizeGrips scrollbarHeight updateOnReleaseOnly".split(" ");if(!this.hideYScrollbar){var b=new AmCharts.SimpleChartScrollbar(this.theme);b.skipEvent=!0;b.chart=this;this.listenTo(b,"zoomed",this.handleVSBZoom);AmCharts.copyProperties(a,b,c);b.rotate=!0;this.scrollbarV=b}this.hideXScrollbar||(b=new AmCharts.SimpleChartScrollbar(this.theme),
|
12
|
+
b.skipEvent=!0,b.chart=this,this.listenTo(b,"zoomed",this.handleHSBZoom),AmCharts.copyProperties(a,b,c),b.rotate=!1,this.scrollbarH=b)}},updateTrendLines:function(){var a=this.trendLines,c;for(c=0;c<a.length;c++){var b=a[c],b=AmCharts.processObject(b,AmCharts.TrendLine,this.theme);a[c]=b;b.chart=this;var d=b.valueAxis;AmCharts.isString(d)&&(b.valueAxis=this.getValueAxisById(d));d=b.valueAxisX;AmCharts.isString(d)&&(b.valueAxisX=this.getValueAxisById(d));b.valueAxis||(b.valueAxis=this.yAxes[0]);b.valueAxisX||
|
13
|
+
(b.valueAxisX=this.xAxes[0])}},updateMargins:function(){AmCharts.AmXYChart.base.updateMargins.call(this);var a=this.scrollbarV;a&&(this.getScrollbarPosition(a,!0,this.yAxes[0].position),this.adjustMargins(a,!0));if(a=this.scrollbarH)this.getScrollbarPosition(a,!1,this.xAxes[0].position),this.adjustMargins(a,!1)},updateScrollbars:function(){AmCharts.AmXYChart.base.updateScrollbars.call(this);var a=this.scrollbarV;a&&(this.updateChartScrollbar(a,!0),a.draw());if(a=this.scrollbarH)this.updateChartScrollbar(a,
|
14
|
+
!1),a.draw()},zoomScrollbars:function(){var a=this.scrollbarH;a&&a.relativeZoom(this.widthMultiplier,-this.horizontalPosition/this.widthMultiplier);(a=this.scrollbarV)&&a.relativeZoom(this.heightMultiplier,-this.verticalPosition/this.heightMultiplier)},fitMultiplier:function(a){a>this.maxZoomFactor&&(a=this.maxZoomFactor);return a},fitH:function(a,c){var b=-(this.plotAreaWidth*c-this.plotAreaWidth);a<b&&(a=b);this.horizontalPosition=a},fitV:function(a,c){var b=-(this.plotAreaHeight*c-this.plotAreaHeight);
|
15
|
+
a<b&&(a=b);this.verticalPosition=a},handleHSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);this.fitH(-a.position*c,c);this.widthMultiplier=c;this.zoomChart()},handleVSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);this.fitV(-a.position*c,c);this.heightMultiplier=c;this.zoomChart()},handleAxisSelfZoom:function(a){if("H"==a.valueAxis.orientation){var c=this.fitMultiplier(a.multiplier);this.fitH(-a.position*c,c);this.widthMultiplier=c}else c=this.fitMultiplier(a.multiplier),this.fitV(-a.position*
|
16
|
+
c,c),this.heightMultiplier=c;this.zoomChart();a=this.graphs;for(c=0;c<a.length;c++)a[c].setAnimationPlayed();this.zoomScrollbars()},handleCursorZoom:function(a){var c=this.widthMultiplier*this.plotAreaWidth/a.selectionWidth,b=this.heightMultiplier*this.plotAreaHeight/a.selectionHeight,c=this.fitMultiplier(c),b=this.fitMultiplier(b),d=(this.verticalPosition-a.selectionY)*b/this.heightMultiplier;this.fitH((this.horizontalPosition-a.selectionX)*c/this.widthMultiplier,c);this.fitV(d,b);this.widthMultiplier=
|
17
17
|
c;this.heightMultiplier=b;this.zoomChart();this.zoomScrollbars()},removeChartScrollbar:function(){AmCharts.callMethod("destroy",[this.scrollbarH,this.scrollbarV]);this.scrollbarV=this.scrollbarH=null},handleReleaseOutside:function(a){AmCharts.AmXYChart.base.handleReleaseOutside.call(this,a);AmCharts.callMethod("handleReleaseOutside",[this.scrollbarH,this.scrollbarV])}});
|
metadata
CHANGED
@@ -1,127 +1,147 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amcharts.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.11.2.
|
4
|
+
version: 3.11.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Vandersluis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
type: :runtime
|
15
|
-
prerelease: false
|
16
14
|
name: rails
|
17
15
|
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 3.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
type: :runtime
|
29
|
-
prerelease: false
|
30
28
|
name: collection_of
|
31
29
|
requirement: !ruby/object:Gem::Requirement
|
32
30
|
requirements:
|
33
|
-
- -
|
31
|
+
- - ">="
|
34
32
|
- !ruby/object:Gem::Version
|
35
33
|
version: 1.0.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.0.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
|
43
|
-
prerelease: false
|
44
|
-
name: bundler
|
42
|
+
name: rake
|
45
43
|
requirement: !ruby/object:Gem::Requirement
|
46
44
|
requirements:
|
47
|
-
- -
|
45
|
+
- - ">"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 11.0.1
|
48
|
+
- - "<"
|
48
49
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
50
|
+
version: '12'
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- -
|
55
|
+
- - ">"
|
53
56
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
57
|
+
version: 11.0.1
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '12'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
|
57
|
-
prerelease: false
|
58
|
-
name: rake
|
62
|
+
name: pry
|
59
63
|
requirement: !ruby/object:Gem::Requirement
|
60
64
|
requirements:
|
61
|
-
- -
|
65
|
+
- - ">="
|
62
66
|
- !ruby/object:Gem::Version
|
63
67
|
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- -
|
72
|
+
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
|
-
|
71
|
-
prerelease: false
|
72
|
-
name: thor
|
76
|
+
name: rspec
|
73
77
|
requirement: !ruby/object:Gem::Requirement
|
74
78
|
requirements:
|
75
|
-
- -
|
79
|
+
- - '='
|
76
80
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
81
|
+
version: 2.14.1
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
|
-
- -
|
86
|
+
- - '='
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
88
|
+
version: 2.14.1
|
83
89
|
- !ruby/object:Gem::Dependency
|
90
|
+
name: nokogiri
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.6.8
|
84
96
|
type: :development
|
85
97
|
prerelease: false
|
86
|
-
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.6.8
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: thor
|
87
105
|
requirement: !ruby/object:Gem::Requirement
|
88
106
|
requirements:
|
89
|
-
- -
|
107
|
+
- - ">="
|
90
108
|
- !ruby/object:Gem::Version
|
91
109
|
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
92
112
|
version_requirements: !ruby/object:Gem::Requirement
|
93
113
|
requirements:
|
94
|
-
- -
|
114
|
+
- - ">="
|
95
115
|
- !ruby/object:Gem::Version
|
96
116
|
version: '0'
|
97
117
|
- !ruby/object:Gem::Dependency
|
98
|
-
|
99
|
-
prerelease: false
|
100
|
-
name: rubyzip
|
118
|
+
name: mechanize
|
101
119
|
requirement: !ruby/object:Gem::Requirement
|
102
120
|
requirements:
|
103
121
|
- - '='
|
104
122
|
- !ruby/object:Gem::Version
|
105
|
-
version:
|
123
|
+
version: 2.7.4
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
106
126
|
version_requirements: !ruby/object:Gem::Requirement
|
107
127
|
requirements:
|
108
128
|
- - '='
|
109
129
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
130
|
+
version: 2.7.4
|
111
131
|
- !ruby/object:Gem::Dependency
|
112
|
-
|
113
|
-
prerelease: false
|
114
|
-
name: pry
|
132
|
+
name: rubyzip
|
115
133
|
requirement: !ruby/object:Gem::Requirement
|
116
134
|
requirements:
|
117
|
-
- -
|
135
|
+
- - '='
|
118
136
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
137
|
+
version: 1.1.0
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
120
140
|
version_requirements: !ruby/object:Gem::Requirement
|
121
141
|
requirements:
|
122
|
-
- -
|
142
|
+
- - '='
|
123
143
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
144
|
+
version: 1.1.0
|
125
145
|
description: Ruby wrapper for Amcharts
|
126
146
|
email:
|
127
147
|
- dvandersluis@selfmgmt.com
|
@@ -129,7 +149,8 @@ executables: []
|
|
129
149
|
extensions: []
|
130
150
|
extra_rdoc_files: []
|
131
151
|
files:
|
132
|
-
- .gitignore
|
152
|
+
- ".gitignore"
|
153
|
+
- ".travis.yml"
|
133
154
|
- Gemfile
|
134
155
|
- LICENSE.txt
|
135
156
|
- README.md
|
@@ -317,17 +338,17 @@ require_paths:
|
|
317
338
|
- lib
|
318
339
|
required_ruby_version: !ruby/object:Gem::Requirement
|
319
340
|
requirements:
|
320
|
-
- -
|
341
|
+
- - ">="
|
321
342
|
- !ruby/object:Gem::Version
|
322
343
|
version: '0'
|
323
344
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
324
345
|
requirements:
|
325
|
-
- -
|
346
|
+
- - ">="
|
326
347
|
- !ruby/object:Gem::Version
|
327
348
|
version: '0'
|
328
349
|
requirements: []
|
329
350
|
rubyforge_project:
|
330
|
-
rubygems_version: 2.
|
351
|
+
rubygems_version: 2.6.8
|
331
352
|
signing_key:
|
332
353
|
specification_version: 4
|
333
354
|
summary: Wrapper for Amcharts 3 Javascript charts
|
@@ -336,4 +357,3 @@ test_files:
|
|
336
357
|
- spec/chart_builder/function_spec.rb
|
337
358
|
- spec/chart_builder/literal_spec.rb
|
338
359
|
- spec/chart_spec.rb
|
339
|
-
has_rdoc:
|