amcharts.rb 3.2.0.2 → 3.4.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +8 -8
  2. data/lib/amcharts.rb +1 -1
  3. data/lib/amcharts/version.rb +1 -1
  4. data/lib/tasks/amcharts.thor +27 -10
  5. data/vendor/assets/images/amcharts/dragIconBlack.gif +0 -0
  6. data/vendor/assets/images/amcharts/dragIconHBlack.gif +0 -0
  7. data/vendor/assets/images/amcharts/export.png +0 -0
  8. data/vendor/assets/images/amcharts/exportWhite.png +0 -0
  9. data/vendor/assets/images/amcharts/lensWhite.png +0 -0
  10. data/vendor/assets/images/amcharts/patterns/black/pattern1.png +0 -0
  11. data/vendor/assets/images/amcharts/patterns/black/pattern2.png +0 -0
  12. data/vendor/assets/images/amcharts/patterns/black/pattern3.png +0 -0
  13. data/vendor/assets/javascripts/amcharts/amcharts.js +337 -321
  14. data/vendor/assets/javascripts/amcharts/amstock.js +88 -85
  15. data/vendor/assets/javascripts/amcharts/changeLog.txt +265 -168
  16. data/vendor/assets/javascripts/amcharts/exporting/amexport.js +73 -72
  17. data/vendor/assets/javascripts/amcharts/exporting/filesaver.js +3 -2
  18. data/vendor/assets/javascripts/amcharts/funnel.js +7 -7
  19. data/vendor/assets/javascripts/amcharts/gauge.js +18 -16
  20. data/vendor/assets/javascripts/amcharts/pie.js +10 -9
  21. data/vendor/assets/javascripts/amcharts/radar.js +5 -5
  22. data/vendor/assets/javascripts/amcharts/serial.js +52 -49
  23. data/vendor/assets/javascripts/amcharts/themes/black.js +206 -0
  24. data/vendor/assets/javascripts/amcharts/themes/chalk.js +216 -0
  25. data/vendor/assets/javascripts/amcharts/themes/dark.js +205 -0
  26. data/vendor/assets/javascripts/amcharts/themes/light.js +197 -0
  27. data/vendor/assets/javascripts/amcharts/themes/patterns.js +259 -0
  28. data/vendor/assets/javascripts/amcharts/xy.js +17 -17
  29. data/vendor/assets/stylesheets/amcharts/style.css +20 -12
  30. metadata +12 -2
@@ -1,51 +1,54 @@
1
1
  AmCharts.AmExport = AmCharts.Class({
2
2
  construct: function(chart, cfg) {
3
- var _this = this;
4
- _this.DEBUG = false;
5
- _this.chart = chart;
6
- _this.canvas = null;
7
- _this.svgs = [];
8
- _this.cfg = {
9
- menuTop: 'auto',
10
- menuLeft: 'auto',
11
- menuRight: '0px',
12
- menuBottom: '0px',
13
- menuItems: [{
14
- textAlign: 'center',
15
- icon: _this.chart.pathToImages + 'export.png',
16
- iconTitle: 'Save chart as an image',
17
- format: 'png'
3
+ var _this = this;
4
+ _this.DEBUG = false;
5
+ _this.chart = chart;
6
+ _this.canvas = null;
7
+ _this.svgs = [];
8
+ _this.cfg = {
9
+ menuTop : 'auto',
10
+ menuLeft : 'auto',
11
+ menuRight : '0px',
12
+ menuBottom : '0px',
13
+ menuItems : [{
14
+ textAlign : 'center',
15
+ icon : _this.chart.pathToImages + 'export.png',
16
+ iconTitle : 'Save chart as an image',
17
+ format : 'png'
18
18
  }],
19
- menuItemStyle: {
20
- backgroundColor: 'transparent',
21
- rollOverBackgroundColor: '#EFEFEF',
22
- color: '#000000',
23
- rollOverColor: '#CC0000',
24
- paddingTop: '6px',
25
- paddingRight: '6px',
26
- paddingBottom: '6px',
27
- paddingLeft: '6px',
28
- marginTop: '0px',
29
- marginRight: '0px',
30
- marginBottom: '0px',
31
- marginLeft: '0px',
32
- textAlign: 'left',
33
- textDecoration: 'none',
34
- fontFamily: _this.chart.fontFamily,
35
- fontSize: _this.chart.fontSize + 'px'
19
+ menuItemStyle : {
20
+ backgroundColor : 'transparent',
21
+ rollOverBackgroundColor : '#EFEFEF',
22
+ color : '#000000',
23
+ rollOverColor : '#CC0000',
24
+ paddingTop : '6px',
25
+ paddingRight : '6px',
26
+ paddingBottom : '6px',
27
+ paddingLeft : '6px',
28
+ marginTop : '0px',
29
+ marginRight : '0px',
30
+ marginBottom : '0px',
31
+ marginLeft : '0px',
32
+ textAlign : 'left',
33
+ textDecoration : 'none',
34
+ fontFamily : _this.chart.fontFamily,
35
+ fontSize : _this.chart.fontSize + 'px'
36
36
  },
37
- menuItemOutput: {
38
- backgroundColor: '#FFFFFF',
39
- fileName: 'amChart',
40
- format: 'png',
41
- output: 'dataurlnewwindow',
42
- render: 'browser',
43
- dpi: 90,
44
- onclick: function(instance, config, event) {
37
+ menuItemOutput : {
38
+ backgroundColor : '#FFFFFF',
39
+ fileName : 'amChart',
40
+ format : 'png',
41
+ output : 'dataurlnewwindow',
42
+ render : 'browser',
43
+ dpi : 90,
44
+ onclick : function(instance, config, event) {
45
+ event.preventDefault();
46
+ // Polify SVG; needs to wait
47
+ instance.polifySVG();
45
48
  instance.output(config);
46
49
  }
47
50
  },
48
- removeImagery: true
51
+ removeImagery: false
49
52
  };
50
53
  _this.processing = {
51
54
  buffer: [],
@@ -106,17 +109,11 @@ AmCharts.AmExport = AmCharts.Class({
106
109
 
107
110
 
108
111
  if (!AmCharts.isIE || (AmCharts.isIE && AmCharts.IEversion > 9)) {
109
- window.clearTimeout(_this.processing.timer);
110
- _this.processing.timer = setTimeout(function() {
111
- // Polify SVG; needs to wait
112
- _this.polifySVG();
113
-
114
- // Build Buttons
115
- _this.generateButtons();
116
- if (_this.DEBUG == 10) {
117
- _this.log('SETUP END');
118
- } // DEBUG
119
- }, 1000);
112
+ // Build Buttons
113
+ _this.generateButtons();
114
+ if (_this.DEBUG == 10) {
115
+ _this.log('SETUP END');
116
+ } // DEBUG
120
117
  } else {
121
118
  if (_this.DEBUG == 10) {
122
119
  _this.log('< IE10 NOT SUPPORTED');
@@ -348,19 +345,19 @@ AmCharts.AmExport = AmCharts.Class({
348
345
 
349
346
  for (var i = 0; i < items.length; i++) {
350
347
 
351
- if (_this.cfg.removeImagery) {
348
+ if ( _this.cfg.removeImagery ) {
352
349
  items[i].parentNode.removeChild(items[i]);
353
350
 
354
351
  } else {
355
- var image = document.createElement('img');
356
- var canvas = document.createElement('canvas');
357
- var ctx = canvas.getContext('2d');
352
+ var image = document.createElement('img');
353
+ var canvas = document.createElement('canvas');
354
+ var ctx = canvas.getContext('2d');
358
355
 
359
- canvas.width = items[i].getAttribute('width');
360
- canvas.height = items[i].getAttribute('height');
361
- image.src = items[i].getAttribute('xlink:href');
362
- image.width = items[i].getAttribute('width');
363
- image.height = items[i].getAttribute('height');
356
+ canvas.width = items[i].getAttribute('width');
357
+ canvas.height = items[i].getAttribute('height');
358
+ image.src = items[i].getAttribute('xlink:href');
359
+ image.width = items[i].getAttribute('width');
360
+ image.height = items[i].getAttribute('height');
364
361
 
365
362
  try {
366
363
  ctx.drawImage(image, 0, 0, image.width, image.height);
@@ -385,19 +382,18 @@ AmCharts.AmExport = AmCharts.Class({
385
382
  for (var i = 0; i < svgs.length; i++) {
386
383
  var parent = svgs[i].parentNode;
387
384
 
388
- // Put some attrs to it
389
- /*
385
+ // Put some attrs to it; fixed 20/03/14 xmlns is required to produce a valid svg file
390
386
  if ( !AmCharts.isIE ) {
391
387
  svgs[i].setAttribute('xmlns','http://www.w3.org/2000/svg');
392
- svgs[i].setAttribute('xmlns:xlink','http://www.w3.org/1999/xlink');
388
+ //svgs[i].setAttribute('xmlns:xlink','http://www.w3.org/1999/xlink');
393
389
  }
394
- svgs[i].setAttribute('width',parent.style.width);
395
- svgs[i].setAttribute('height',parent.style.height);
396
- */
390
+ //svgs[i].setAttribute('width',parent.style.width);
391
+ //svgs[i].setAttribute('height',parent.style.height);
397
392
 
393
+ // DEBUG
398
394
  if (_this.DEBUG == 10) {
399
395
  _this.log('POLIFIED', svgs[i]);
400
- } // DEBUG
396
+ }
401
397
 
402
398
  // Force link adaption
403
399
  recursiveChange(svgs[i], 'pattern');
@@ -442,9 +438,14 @@ AmCharts.AmExport = AmCharts.Class({
442
438
  svgY = Number(parent.style.top.slice(0, -2));
443
439
  tmp = AmCharts.extend({}, offset);
444
440
 
445
- // Overtake parent position if givwn
446
- offset.x = svgX ? svgX : offset.x;
447
- offset.y = svgY ? svgY : offset.y;
441
+ // Overtake parent position if given; fixed 20/03/14 distinguish between relativ and others
442
+ if ( parent.style.position == 'relative' ) {
443
+ offset.x = svgX? svgX : offset.x;
444
+ offset.y = svgY? svgY : offset.y;
445
+ } else {
446
+ offset.x = svgX;
447
+ offset.y = svgY;
448
+ }
448
449
 
449
450
  _this.processing.buffer.push([svgs[i], AmCharts.extend({}, offset)]);
450
451
 
@@ -657,7 +658,7 @@ AmCharts.AmExport = AmCharts.Class({
657
658
  }
658
659
 
659
660
  // Style wrapper; Push into chart div
660
- div.setAttribute('style', 'position: absolute;top:' + _this.cfg.menuTop + ';right:' + _this.cfg.menuRight + ';bottom:' + _this.cfg.menuBottom + ';left:' + _this.cfg.menuLeft + ';box-shadow:0px 0px 1px 0px rgba(0,0,0,0);');
661
+ div.setAttribute('style', 'width:39px; height:28px; position: absolute;top:' + _this.cfg.menuTop + ';right:' + _this.cfg.menuRight + ';bottom:' + _this.cfg.menuBottom + ';left:' + _this.cfg.menuLeft + ';box-shadow:0px 0px 1px 0px rgba(0,0,0,0);');
661
662
  div.appendChild(createList(_this.cfg.menuItems));
662
663
  //_this.chart.div.style.position = 'relative';
663
664
  _this.chart.containerDiv.appendChild(div);
@@ -12,7 +12,7 @@
12
12
  plusplus: true */
13
13
 
14
14
  /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
15
-
15
+ if(AmCharts.isModern){ /// added by AmCharts to avoid old IE problems if this file is included
16
16
  var saveAs = saveAs
17
17
  || (typeof navigator !== 'undefined' && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
18
18
  || (function(view) {
@@ -229,4 +229,5 @@ var saveAs = saveAs
229
229
  // while `this` is nsIContentFrameMessageManager
230
230
  // with an attribute `content` that corresponds to the window
231
231
 
232
- if (typeof module !== 'undefined') module.exports = saveAs;
232
+ if (typeof module !== 'undefined') module.exports = saveAs;
233
+ }/// added by AmCharts to avoid old IE problems if this file is included
@@ -1,7 +1,7 @@
1
- AmCharts.AmFunnelChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(r){this.chartType="funnel";AmCharts.AmFunnelChart.base.construct.call(this,r);this.startX=this.startY=0;this.baseWidth="100%";this.neckHeight=this.neckWidth=0;this.rotate=!1;this.valueRepresents="height";this.pullDistance=30;this.labelPosition="center";this.labelText="[[title]]: [[value]]";this.balloonText="[[title]]: [[value]]\n[[description]]";AmCharts.applyTheme(this,r,"AmFunnelChart")},drawChart:function(){AmCharts.AmFunnelChart.base.drawChart.call(this);
2
- var r=this.chartData;if(AmCharts.ifArray(r))if(0<this.realWidth&&0<this.realHeight){var s=this.container,A=this.startDuration,k=this.rotate,v=this.updateWidth();this.realWidth=v;var f=this.updateHeight();this.realHeight=f;var n=AmCharts.toCoordinate,B=n(this.marginLeft,v),u=n(this.marginRight,v),a=n(this.marginTop,f)+this.getTitleHeight(),n=n(this.marginBottom,f),u=v-B-u,w=AmCharts.toCoordinate(this.baseWidth,u),p=AmCharts.toCoordinate(this.neckWidth,u),C=f-n-a,x=AmCharts.toCoordinate(this.neckHeight,
3
- C),t=a+C-x;k&&(a=f-n,t=a-C+x);this.firstSliceY=a;AmCharts.VML&&(this.startAlpha=1);for(var g=u/2+B,D=(C-x)/((w-p)/2),y=w/2,w=(C-x)*(w+p)/2+p*x,x=a,F=0,E=0;E<r.length;E++){var c=r[E];if(!0!==c.hidden){var l=[],h=[],b;if("height"==this.valueRepresents)b=C*c.percents/100;else{var m=-w*c.percents/100/2,z=y,d=-1/(2*D);b=Math.pow(z,2)-4*d*m;0>b&&(b=0);b=(Math.sqrt(b)-z)/(2*d);if(!k&&a>=t||k&&a<=t)b=2*-m/p;else if(!k&&a+b>t||k&&a-b<t)d=k?Math.round(b+(a-b-t)):Math.round(b-(a+b-t)),b=d/D,b=d+2*(-m-(z-b/2)*
4
- d)/p}m=y-b/D;z=!1;!k&&a+b>t||k&&a-b<t?(m=p/2,l.push(g-y,g+y,g+m,g+m,g-m,g-m),k?(d=b+(a-b-t),h.push(a,a,a-d,a-b,a-b,a-d,a)):(d=b-(a+b-t),h.push(a,a,a+d,a+b,a+b,a+d,a)),z=!0):(l.push(g-y,g+y,g+m,g-m),k?h.push(a,a,a-b,a-b):h.push(a,a,a+b,a+b));s.set();d=s.set();l=AmCharts.polygon(s,l,h,c.color,c.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);d.push(l);this.graphsSet.push(d);c.wedge=d;c.index=E;if(h=this.gradientRatio){var q=[],e;for(e=0;e<h.length;e++)q.push(AmCharts.adjustLuminosity(c.color,
5
- h[e]));0<q.length&&l.gradient("linearGradient",q);c.pattern&&l.pattern(c.pattern)}0<A&&(l=this.startAlpha,this.chartCreated&&(l=c.alpha),d.setAttr("opacity",l));this.addEventListeners(d,c);this.labelsEnabled&&this.labelText&&c.percents>=this.hideLabelsPercent&&(h=this.formatString(this.labelText,c),q=c.labelColor,q||(q=this.color),l=this.labelPosition,e="left","center"==l&&(e="middle"),"left"==l&&(e="right"),h=AmCharts.text(s,h,q,this.fontFamily,this.fontSize,e),d.push(h),q=g,k?(e=a-b/2,c.ty0=e):
6
- (e=a+b/2,c.ty0=e,e<x+F+5&&(e=x+F+5),e>f-n&&(e=f-n)),"right"==l&&(q=u+10+B,c.tx0=g+(y-b/2/D),z&&(c.tx0=g+m)),"left"==l&&(c.tx0=g-(y-b/2/D),z&&(c.tx0=g-m),q=B),c.label=h,c.labelX=q,c.labelY=e,c.labelHeight=h.getBBox().height,h.translate(q,e),(0===c.alpha||0<A&&!this.chartCreated)&&d.hide(),a=k?a-b:a+b,y=m,F=h.getBBox().height,x=e);c.startX=AmCharts.toCoordinate(this.startX,v);c.startY=AmCharts.toCoordinate(this.startY,f);c.pullX=AmCharts.toCoordinate(this.pullDistance,v);c.pullY=0;c.balloonX=g;c.balloonY=
7
- c.ty0}}this.arrangeLabels();this.initialStart();(r=this.legend)&&r.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},arrangeLabels:function(){var r=this.rotate,s;s=r?0:this.realHeight;for(var A=0,k=this.chartData,v=k.length,f,n=0;n<v;n++){f=k[v-n-1];var B=f.label,u=f.labelY,a=f.labelX,w=f.labelHeight,p=u;r?s+A+5>u&&(p=s+A+5):u+w+5>s&&(p=s-5-w);s=p;A=w;B.translate(a,p);f.labelY=p;f.tx=a;f.ty=p;f.tx2=a}"center"!=this.labelPosition&&this.drawTicks()}});
1
+ AmCharts.AmFunnelChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(s){this.type="funnel";AmCharts.AmFunnelChart.base.construct.call(this,s);this.cname="AmFunnelChart";this.startX=this.startY=0;this.baseWidth="100%";this.neckHeight=this.neckWidth=0;this.rotate=!1;this.valueRepresents="height";this.pullDistance=30;this.labelPosition="center";this.labelText="[[title]]: [[value]]";this.balloonText="[[title]]: [[value]]\n[[description]]";AmCharts.applyTheme(this,s,this.cname)},drawChart:function(){AmCharts.AmFunnelChart.base.drawChart.call(this);
2
+ var s=this.chartData;if(AmCharts.ifArray(s))if(0<this.realWidth&&0<this.realHeight){var t=this.container,B=this.startDuration,k=this.rotate,w=this.updateWidth();this.realWidth=w;var f=this.updateHeight();this.realHeight=f;var m=AmCharts.toCoordinate,A=m(this.marginLeft,w),v=m(this.marginRight,w),a=m(this.marginTop,f)+this.getTitleHeight(),m=m(this.marginBottom,f),v=w-A-v,x=AmCharts.toCoordinate(this.baseWidth,v),n=AmCharts.toCoordinate(this.neckWidth,v),C=f-m-a,y=AmCharts.toCoordinate(this.neckHeight,
3
+ C),p=a+C-y;k&&(a=f-m,p=a-C+y);this.firstSliceY=a;AmCharts.VML&&(this.startAlpha=1);for(var g=v/2+A,D=(C-y)/((x-n)/2),z=x/2,x=(C-y)*(x+n)/2+n*y,y=a,F=0,E=0;E<s.length;E++){var c=s[E],d;if(!0!==c.hidden){var q=[],h=[],b;if("height"==this.valueRepresents)b=C*c.percents/100;else{var l=-x*c.percents/100/2,u=z;d=-1/(2*D);b=Math.pow(u,2)-4*d*l;0>b&&(b=0);b=(Math.sqrt(b)-u)/(2*d);if(!k&&a>=p||k&&a<=p)b=2*-l/n;else if(!k&&a+b>p||k&&a-b<p)d=k?Math.round(b+(a-b-p)):Math.round(b-(a+b-p)),b=d/D,b=d+2*(-l-(u-b/
4
+ 2)*d)/n}l=z-b/D;d=!1;!k&&a+b>p||k&&a-b<p?(l=n/2,q.push(g-z,g+z,g+l,g+l,g-l,g-l),k?(d=b+(a-b-p),a<p&&(d=0),h.push(a,a,a-d,a-b,a-b,a-d,a)):(d=b-(a+b-p),a>p&&(d=0),h.push(a,a,a+d,a+b,a+b,a+d,a)),d=!0):(q.push(g-z,g+z,g+l,g-l),k?h.push(a,a,a-b,a-b):h.push(a,a,a+b,a+b));t.set();u=t.set();q=AmCharts.polygon(t,q,h,c.color,c.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);u.push(q);this.graphsSet.push(u);c.wedge=u;c.index=E;if(h=this.gradientRatio){var r=[],e;for(e=0;e<h.length;e++)r.push(AmCharts.adjustLuminosity(c.color,
5
+ h[e]));0<r.length&&q.gradient("linearGradient",r);c.pattern&&q.pattern(c.pattern)}0<B&&(this.chartCreated||u.setAttr("opacity",this.startAlpha));this.addEventListeners(u,c);c.ty0=a-b/2;this.labelsEnabled&&this.labelText&&c.percents>=this.hideLabelsPercent&&(h=this.formatString(this.labelText,c),r=c.labelColor,r||(r=this.color),q=this.labelPosition,e="left","center"==q&&(e="middle"),"left"==q&&(e="right"),h=AmCharts.text(t,h,r,this.fontFamily,this.fontSize,e),u.push(h),r=g,k?(e=a-b/2,c.ty0=e):(e=a+
6
+ b/2,c.ty0=e,e<y+F+5&&(e=y+F+5),e>f-m&&(e=f-m)),"right"==q&&(r=v+10+A,c.tx0=g+(z-b/2/D),d&&(c.tx0=g+l)),"left"==q&&(c.tx0=g-(z-b/2/D),d&&(c.tx0=g-l),r=A),c.label=h,c.labelX=r,c.labelY=e,c.labelHeight=h.getBBox().height,h.translate(r,e),F=h.getBBox().height,y=e);(0===c.alpha||0<B&&!this.chartCreated)&&u.hide();a=k?a-b:a+b;z=l;c.startX=AmCharts.toCoordinate(this.startX,w);c.startY=AmCharts.toCoordinate(this.startY,f);c.pullX=AmCharts.toCoordinate(this.pullDistance,w);c.pullY=0;c.balloonX=g;c.balloonY=
7
+ c.ty0}}this.arrangeLabels();this.initialStart();(s=this.legend)&&s.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},arrangeLabels:function(){var s=this.rotate,t;t=s?0:this.realHeight;for(var B=0,k=this.chartData,w=k.length,f,m=0;m<w;m++){f=k[w-m-1];var A=f.label,v=f.labelY,a=f.labelX,x=f.labelHeight,n=v;s?t+B+5>v&&(n=t+B+5):v+x+5>t&&(n=t-5-x);t=n;B=x;A&&A.translate(a,n);f.labelY=n;f.tx=a;f.ty=n;f.tx2=a}"center"!=this.labelPosition&&this.drawTicks()}});
@@ -1,17 +1,19 @@
1
- AmCharts.GaugeAxis=AmCharts.Class({construct:function(a){this.radius="95%";this.startAngle=-120;this.endAngle=120;this.startValue=0;this.endValue=200;this.valueInterval=20;this.minorTickInterval=5;this.tickLength=10;this.minorTickLength=5;this.tickColor="#555555";this.labelFrequency=this.tickThickness=this.tickAlpha=1;this.inside=!0;this.labelOffset=15;this.showLastLabel=this.showFirstLabel=!0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridInside=!0;this.topText="";this.topTextYOffset=
2
- 0;this.topTextBold=!0;this.bottomText="";this.bottomTextYOffset=0;this.bottomTextBold=!0;this.centerY=this.centerX="0%";this.bandOutlineAlpha=this.bandOutlineThickness=0;this.bandOutlineColor="#000000";this.bandAlpha=1;AmCharts.applyTheme(this,a,"GaugeAxis")},value2angle:function(a){return this.startAngle+this.singleValueAngle*a},setTopText:function(a){this.topText=a;var b=this.chart;if(this.axisCreated){this.topTF&&this.topTF.remove();var d=this.topTextFontSize;d||(d=b.fontSize);var c=this.topTextColor;
3
- c||(c=b.color);b=this.chart;a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,this.topTextBold);a.translate(this.centerXReal,this.centerYReal-this.radiusReal/2+this.topTextYOffset);this.chart.graphsSet.push(a);this.topTF=a}},setBottomText:function(a){this.bottomText=a;var b=this.chart;if(this.axisCreated){this.bottomTF&&this.bottomTF.remove();var d=this.bottomTextFontSize;d||(d=b.fontSize);var c=this.bottomTextColor;c||(c=b.color);b=this.chart;a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,
4
- this.bottomTextBold);a.translate(this.centerXReal,this.centerYReal+this.radiusReal/2+this.bottomTextYOffset);this.bottomTF=a;this.chart.graphsSet.push(a)}},draw:function(){var a=this.chart,b=a.graphsSet,d=this.startValue,c=this.valueInterval,m=this.startAngle,g=this.endAngle,h=this.tickLength,k=(this.endValue-d)/c+1,f=(g-m)/(k-1),n=f/c;this.singleValueAngle=n;var e=a.container,p=this.tickColor,u=this.tickAlpha,B=this.tickThickness,C=c/this.minorTickInterval,D=f/C,E=this.minorTickLength,F=this.labelFrequency,
5
- q=this.radiusReal;this.inside||(q-=15);var w=a.centerX+AmCharts.toCoordinate(this.centerX,a.realWidth),x=a.centerY+AmCharts.toCoordinate(this.centerY,a.realHeight);this.centerXReal=w;this.centerYReal=x;var G={fill:this.axisColor,"fill-opacity":this.axisAlpha,"stroke-width":0,"stroke-opacity":0},l,z;this.gridInside?z=l=q:(l=q-h,z=l+E);var r=this.axisThickness/2,g=AmCharts.wedge(e,w,x,m,g-m,l+r,l+r,l-r,0,G);b.push(g);g=AmCharts.doNothing;AmCharts.isModern||(g=Math.round);G=AmCharts.getDecimals(c);for(l=
6
- 0;l<k;l++){var s=d+l*c,r=m+l*f,v=g(w+q*Math.sin(r/180*Math.PI)),t=g(x-q*Math.cos(r/180*Math.PI)),A=g(w+(q-h)*Math.sin(r/180*Math.PI)),y=g(x-(q-h)*Math.cos(r/180*Math.PI)),v=AmCharts.line(e,[v,A],[t,y],p,u,B,0,!1,!1,!0);b.push(v);t=this.labelOffset;this.inside||(t=-t-h);v=w+(q-h-t)*Math.sin(r/180*Math.PI);t=x-(q-h-t)*Math.cos(r/180*Math.PI);A=this.fontSize;isNaN(A)&&(A=a.fontSize);0<F&&l/F==Math.round(l/F)&&(this.showLastLabel||l!=k-1)&&(this.showFirstLabel||0!==l)&&(s=AmCharts.formatNumber(s,a.numberFormatter,
7
- G),s=AmCharts.text(e,s,a.color,a.fontFamily,A),s.translate(v,t),b.push(s));if(l<k-1)for(s=1;s<C;s++)y=r+D*s,v=g(w+z*Math.sin(y/180*Math.PI)),t=g(x-z*Math.cos(y/180*Math.PI)),A=g(w+(z-E)*Math.sin(y/180*Math.PI)),y=g(x-(z-E)*Math.cos(y/180*Math.PI)),v=AmCharts.line(e,[v,A],[t,y],p,u,B,0,!1,!1,!0),b.push(v)}if(b=this.bands)for(d=0;d<b.length;d++)if(c=b[d])p=c.startValue,u=c.endValue,h=AmCharts.toCoordinate(c.radius,q),isNaN(h)&&(h=z),k=AmCharts.toCoordinate(c.innerRadius,q),isNaN(k)&&(k=h-E),f=m+n*p,
8
- u=n*(u-p),B=c.outlineColor,void 0==B&&(B=this.bandOutlineColor),C=c.outlineThickness,isNaN(C)&&(C=this.bandOutlineThickness),D=c.outlineAlpha,isNaN(D)&&(D=this.bandOutlineAlpha),p=c.alpha,isNaN(p)&&(p=this.bandAlpha),c=AmCharts.wedge(e,w,x,f,u,h,h,k,0,{fill:c.color,stroke:B,"stroke-width":C,"stroke-opacity":D}),c.setAttr("opacity",p),a.gridSet.push(c);this.axisCreated=!0;this.setTopText(this.topText);this.setBottomText(this.bottomText);a=a.graphsSet.getBBox();this.width=a.width;this.height=a.height}});AmCharts.GaugeArrow=AmCharts.Class({construct:function(a){this.color="#000000";this.nailAlpha=this.alpha=1;this.startWidth=this.nailRadius=8;this.borderAlpha=1;this.radius="90%";this.nailBorderAlpha=this.innerRadius=0;this.nailBorderThickness=1;this.frame=0;AmCharts.applyTheme(this,a,"GaugeArrow")},setValue:function(a){var b=this.chart;b?b.setValue(this,a):this.previousValue=this.value=a}});AmCharts.GaugeBand=AmCharts.Class({construct:function(){}});AmCharts.AmAngularGauge=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(a){this.theme=a;this.chartType="gauge";AmCharts.AmAngularGauge.base.construct.call(this,a);this.minRadius=this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=10;this.faceColor="#FAFAFA";this.faceAlpha=0;this.faceBorderWidth=1;this.faceBorderColor="#555555";this.faceBorderAlpha=0;this.arrows=[];this.axes=[];this.startDuration=1;this.startEffect=">";this.adjustSize=!0;this.extraHeight=this.extraWidth=
9
- 0;this.clockWiseOnly=!1;AmCharts.applyTheme(this,a,"AmAngularGauge")},addAxis:function(a){this.axes.push(a)},formatString:function(a,b){return a=AmCharts.formatValue(a,b,["value"],this.numberFormatter,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers)},initChart:function(){AmCharts.AmAngularGauge.base.initChart.call(this);var a;0===this.axes.length&&(a=new AmCharts.GaugeAxis(this.theme),this.addAxis(a));var b;for(b=0;b<this.axes.length;b++)a=this.axes[b],a=AmCharts.processObject(a,
1
+ AmCharts.GaugeAxis=AmCharts.Class({construct:function(a){this.cname="GaugeAxis";this.radius="95%";this.startAngle=-120;this.endAngle=120;this.startValue=0;this.endValue=200;this.gridCount=5;this.tickLength=10;this.minorTickLength=5;this.tickColor="#555555";this.labelFrequency=this.tickThickness=this.tickAlpha=1;this.inside=!0;this.labelOffset=10;this.showLastLabel=this.showFirstLabel=!0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridInside=!0;this.topTextYOffset=0;this.topTextBold=
2
+ !0;this.bottomTextYOffset=0;this.bottomTextBold=!0;this.centerY=this.centerX="0%";this.bandOutlineAlpha=this.bandOutlineThickness=0;this.bandOutlineColor="#000000";this.bandAlpha=1;AmCharts.applyTheme(this,a,"GaugeAxis")},value2angle:function(a){return this.startAngle+this.singleValueAngle*a},setTopText:function(a){if(void 0!==a){this.topText=a;var b=this.chart;if(this.axisCreated){this.topTF&&this.topTF.remove();var d=this.topTextFontSize;d||(d=b.fontSize);var c=this.topTextColor;c||(c=b.color);
3
+ a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,this.topTextBold);a.translate(this.centerXReal,this.centerYReal-this.radiusReal/2+this.topTextYOffset);this.chart.graphsSet.push(a);this.topTF=a}}},setBottomText:function(a){if(void 0!==a){this.bottomText=a;var b=this.chart;if(this.axisCreated){this.bottomTF&&this.bottomTF.remove();var d=this.bottomTextFontSize;d||(d=b.fontSize);var c=this.bottomTextColor;c||(c=b.color);a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,this.bottomTextBold);
4
+ a.translate(this.centerXReal,this.centerYReal+this.radiusReal/2+this.bottomTextYOffset);this.bottomTF=a;this.chart.graphsSet.push(a)}}},draw:function(){var a=this.chart,b=a.graphsSet,d=this.startValue,c=this.endValue,e=this.valueInterval;isNaN(e)&&(e=(c-d)/this.gridCount);var m=this.minorTickInterval;isNaN(m)&&(m=e/5);var p=this.startAngle,h=this.endAngle,f=this.tickLength,k=(c-d)/e+1,g=(h-p)/(k-1);this.singleValueAngle=c=g/e;var l=a.container,r=this.tickColor,v=this.tickAlpha,C=this.tickThickness,
5
+ D=e/m,F=g/D,m=this.minorTickLength,G=this.labelFrequency,t=this.radiusReal;this.inside||(t-=15);var y=a.centerX+AmCharts.toCoordinate(this.centerX,a.realWidth),z=a.centerY+AmCharts.toCoordinate(this.centerY,a.realHeight);this.centerXReal=y;this.centerYReal=z;var H={fill:this.axisColor,"fill-opacity":this.axisAlpha,"stroke-width":0,"stroke-opacity":0},n,A;this.gridInside?A=n=t:(n=t-f,A=n+m);var s=this.axisThickness/2,h=AmCharts.wedge(l,y,z,p,h-p,n+s,n+s,n-s,0,H);b.push(h);h=AmCharts.doNothing;AmCharts.isModern||
6
+ (h=Math.round);H=AmCharts.getDecimals(e);for(n=0;n<k;n++){var q=d+n*e,s=p+n*g,w=h(y+t*Math.sin(s/180*Math.PI)),B=h(z-t*Math.cos(s/180*Math.PI)),x=h(y+(t-f)*Math.sin(s/180*Math.PI)),u=h(z-(t-f)*Math.cos(s/180*Math.PI)),w=AmCharts.line(l,[w,x],[B,u],r,v,C,0,!1,!1,!0);b.push(w);w=-1;x=this.labelOffset;this.inside||(x=-x-f,w=1);var B=Math.sin(s/180*Math.PI),u=Math.cos(s/180*Math.PI),B=y+(t-f-x)*B,x=z-(t-f-x)*u,E=this.fontSize;isNaN(E)&&(E=a.fontSize);var u=Math.sin((s-90)/180*Math.PI),J=Math.cos((s-90)/
7
+ 180*Math.PI);if(0<G&&n/G==Math.round(n/G)&&(this.showLastLabel||n!=k-1)&&(this.showFirstLabel||0!==n)){var q=AmCharts.formatNumber(q,a.nf,H),I=this.unit;I&&(q="left"==this.unitPosition?I+q:q+I);q=AmCharts.text(l,q,a.color,a.fontFamily,E);E=q.getBBox();q.translate(B+w*E.width/2*J,x+w*E.height/2*u);b.push(q)}if(n<k-1)for(q=1;q<D;q++)u=s+F*q,w=h(y+A*Math.sin(u/180*Math.PI)),B=h(z-A*Math.cos(u/180*Math.PI)),x=h(y+(A-m)*Math.sin(u/180*Math.PI)),u=h(z-(A-m)*Math.cos(u/180*Math.PI)),w=AmCharts.line(l,[w,
8
+ x],[B,u],r,v,C,0,!1,!1,!0),b.push(w)}if(b=this.bands)for(d=0;d<b.length;d++)if(e=b[d])r=e.startValue,v=e.endValue,f=AmCharts.toCoordinate(e.radius,t),isNaN(f)&&(f=A),k=AmCharts.toCoordinate(e.innerRadius,t),isNaN(k)&&(k=f-m),g=p+c*r,v=c*(v-r),C=e.outlineColor,void 0==C&&(C=this.bandOutlineColor),D=e.outlineThickness,isNaN(D)&&(D=this.bandOutlineThickness),F=e.outlineAlpha,isNaN(F)&&(F=this.bandOutlineAlpha),r=e.alpha,isNaN(r)&&(r=this.bandAlpha),e=AmCharts.wedge(l,y,z,g,v,f,f,k,0,{fill:e.color,stroke:C,
9
+ "stroke-width":D,"stroke-opacity":F}),e.setAttr("opacity",r),a.gridSet.push(e);this.axisCreated=!0;this.setTopText(this.topText);this.setBottomText(this.bottomText);a=a.graphsSet.getBBox();this.width=a.width;this.height=a.height}});AmCharts.GaugeArrow=AmCharts.Class({construct:function(a){this.cname="GaugeArrow";this.color="#000000";this.nailAlpha=this.alpha=1;this.startWidth=this.nailRadius=8;this.endWidth=0;this.borderAlpha=1;this.radius="90%";this.nailBorderAlpha=this.innerRadius=0;this.nailBorderThickness=1;this.frame=0;AmCharts.applyTheme(this,a,"GaugeArrow")},setValue:function(a){var b=this.chart;b?b.setValue(this,a):this.previousValue=this.value=a}});
10
+ AmCharts.GaugeBand=AmCharts.Class({construct:function(){this.cname="GaugeBand"}});AmCharts.AmAngularGauge=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(a){this.cname="AmAngularGauge";AmCharts.AmAngularGauge.base.construct.call(this,a);this.theme=a;this.type="gauge";this.minRadius=this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=10;this.faceColor="#FAFAFA";this.faceAlpha=0;this.faceBorderWidth=1;this.faceBorderColor="#555555";this.faceBorderAlpha=0;this.arrows=[];this.axes=[];this.startDuration=1;this.startEffect="easeOutSine";this.adjustSize=!0;
11
+ this.extraHeight=this.extraWidth=0;AmCharts.applyTheme(this,a,this.cname)},addAxis:function(a){this.axes.push(a)},formatString:function(a,b){return a=AmCharts.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers)},initChart:function(){AmCharts.AmAngularGauge.base.initChart.call(this);var a;0===this.axes.length&&(a=new AmCharts.GaugeAxis(this.theme),this.addAxis(a));var b;for(b=0;b<this.axes.length;b++)a=this.axes[b],a=AmCharts.processObject(a,
10
12
  AmCharts.GaugeAxis,this.theme),a.chart=this,this.axes[b]=a;var d=this.arrows;for(b=0;b<d.length;b++){a=d[b];a=AmCharts.processObject(a,AmCharts.GaugeArrow,this.theme);a.chart=this;d[b]=a;var c=a.axis;AmCharts.isString(c)&&(a.axis=AmCharts.getObjById(this.axes,c));a.axis||(a.axis=this.axes[0]);isNaN(a.value)&&a.setValue(a.axis.startValue);isNaN(a.previousValue)&&(a.previousValue=a.axis.startValue)}this.setLegendData(d);this.drawChart();this.totalFrames=1E3*this.startDuration/AmCharts.updateRate},drawChart:function(){AmCharts.AmAngularGauge.base.drawChart.call(this);
11
- var a=this.container,b=this.updateWidth();this.realWidth=b;var d=this.updateHeight();this.realHeight=d;var c=AmCharts.toCoordinate,m=c(this.marginLeft,b),g=c(this.marginRight,b),h=c(this.marginTop,d)+this.getTitleHeight(),k=c(this.marginBottom,d),f=c(this.radius,b,d),c=b-m-g,n=d-h-k+this.extraHeight;f||(f=Math.min(c,n)/2);f<this.minRadius&&(f=this.minRadius);this.radiusReal=f;this.centerX=(b-m-g)/2+m;this.centerY=(d-h-k)/2+h+this.extraHeight/2;isNaN(this.gaugeX)||(this.centerX=this.gaugeX);isNaN(this.gaugeY)||
12
- (this.centerY=this.gaugeY);var b=this.faceAlpha,d=this.faceBorderAlpha,e;if(0<b||0<d)e=AmCharts.circle(a,f,this.faceColor,b,this.faceBorderWidth,this.faceBorderColor,d,!1),e.translate(this.centerX,this.centerY),e.toBack();for(b=f=a=0;b<this.axes.length;b++)d=this.axes[b],d.radiusReal=AmCharts.toCoordinate(d.radius,this.radiusReal),d.draw(),d.width>a&&(a=d.width),d.height>f&&(f=d.height);(b=this.legend)&&b.invalidateSize();if(this.adjustSize&&!this.chartCreated){e&&(e=e.getBBox(),e.width>a&&(a=e.width),
13
- e.height>f&&(f=e.height));e=0;if(n>f||c>a)e=Math.min(n-f,c-a);0<e&&(this.extraHeight=n-f,this.chartCreated=!0,this.validateNow())}this.dispDUpd();this.chartCreated=!0},validateSize:function(){this.extraHeight=this.extraWidth=0;this.chartCreated=!1;AmCharts.AmAngularGauge.base.validateSize.call(this)},addArrow:function(a){this.arrows.push(a)},removeArrow:function(a){AmCharts.removeFromArray(this.arrows,a);this.validateNow()},removeAxis:function(a){AmCharts.removeFromArray(this.axes,a);this.validateNow()},
14
- drawArrow:function(a,b){a.set&&a.set.remove();var d=this.container;a.set=d.set();if(!a.hidden){var c=a.axis,m=c.radiusReal,g=c.centerXReal,h=c.centerYReal,k=a.startWidth,f=AmCharts.toCoordinate(a.innerRadius,c.radiusReal),n=AmCharts.toCoordinate(a.radius,c.radiusReal);c.inside||(n-=15);var e=a.nailColor;e||(e=a.color);var p=a.nailColor;p||(p=a.color);e=AmCharts.circle(d,a.nailRadius,e,a.nailAlpha,a.nailBorderThickness,e,a.nailBorderAlpha);a.set.push(e);e.translate(g,h);isNaN(n)&&(n=m-c.tickLength);
15
- var c=Math.sin(b/180*Math.PI),m=Math.cos(b/180*Math.PI),e=Math.sin((b+90)/180*Math.PI),u=Math.cos((b+90)/180*Math.PI),d=AmCharts.polygon(d,[g-k/2*e+f*c,g+n*c,g+k/2*e+f*c],[h+k/2*u-f*m,h-n*m,h-k/2*u-f*m],a.color,a.alpha,1,p,a.borderAlpha,void 0,!0);a.set.push(d);this.graphsSet.push(a.set)}},setValue:function(a,b){a.axis&&(a.axis.value2angle(b),a.frame=0,a.previousValue=a.value);a.value=b;var d=this.legend;d&&d.updateValues()},handleLegendEvent:function(a){var b=a.type;a=a.dataItem;if(!this.legend.data&&
16
- a)switch(b){case "hideItem":this.hideArrow(a);break;case "showItem":this.showArrow(a)}},hideArrow:function(a){a.set.hide();a.hidden=!0},showArrow:function(a){a.set.show();a.hidden=!1},updateAnimations:function(){AmCharts.AmAngularGauge.base.updateAnimations.call(this);for(var a=this.arrows.length,b,d=0;d<a;d++){b=this.arrows[d];var c;b.frame>=this.totalFrames?c=b.value:(b.frame++,b.clockWiseOnly&&b.value<b.previousValue&&(c=b.axis,b.previousValue-=c.endValue-c.startValue),c=AmCharts.getEffect(this.startEffect),
17
- c=AmCharts[c](0,b.frame,b.previousValue,b.value-b.previousValue,this.totalFrames),isNaN(c)&&(c=b.value));c=b.axis.value2angle(c);this.drawArrow(b,c)}}});
13
+ var a=this.container,b=this.updateWidth();this.realWidth=b;var d=this.updateHeight();this.realHeight=d;var c=AmCharts.toCoordinate,e=c(this.marginLeft,b),m=c(this.marginRight,b),p=c(this.marginTop,d)+this.getTitleHeight(),h=c(this.marginBottom,d),f=c(this.radius,b,d),c=b-e-m,k=d-p-h+this.extraHeight;f||(f=Math.min(c,k)/2);f<this.minRadius&&(f=this.minRadius);this.radiusReal=f;this.centerX=(b-e-m)/2+e;this.centerY=(d-p-h)/2+p+this.extraHeight/2;isNaN(this.gaugeX)||(this.centerX=this.gaugeX);isNaN(this.gaugeY)||
14
+ (this.centerY=this.gaugeY);var b=this.faceAlpha,d=this.faceBorderAlpha,g;if(0<b||0<d)g=AmCharts.circle(a,f,this.faceColor,b,this.faceBorderWidth,this.faceBorderColor,d,!1),g.translate(this.centerX,this.centerY),g.toBack(),(a=this.facePattern)&&g.pattern(a);for(b=f=a=0;b<this.axes.length;b++)d=this.axes[b],d.radiusReal=AmCharts.toCoordinate(d.radius,this.radiusReal),d.draw(),d.width>a&&(a=d.width),d.height>f&&(f=d.height);(b=this.legend)&&b.invalidateSize();if(this.adjustSize&&!this.chartCreated){g&&
15
+ (g=g.getBBox(),g.width>a&&(a=g.width),g.height>f&&(f=g.height));g=0;if(k>f||c>a)g=Math.min(k-f,c-a);0<g&&(this.extraHeight=k-f,this.chartCreated=!0,this.validateNow())}this.dispDUpd();this.chartCreated=!0},validateSize:function(){this.extraHeight=this.extraWidth=0;this.chartCreated=!1;AmCharts.AmAngularGauge.base.validateSize.call(this)},addArrow:function(a){this.arrows.push(a)},removeArrow:function(a){AmCharts.removeFromArray(this.arrows,a);this.validateNow()},removeAxis:function(a){AmCharts.removeFromArray(this.axes,
16
+ a);this.validateNow()},drawArrow:function(a,b){a.set&&a.set.remove();var d=this.container;a.set=d.set();if(!a.hidden){var c=a.axis,e=c.radiusReal,m=c.centerXReal,p=c.centerYReal,h=a.startWidth,f=a.endWidth,k=AmCharts.toCoordinate(a.innerRadius,c.radiusReal),g=AmCharts.toCoordinate(a.radius,c.radiusReal);c.inside||(g-=15);var l=a.nailColor;l||(l=a.color);var r=a.nailColor;r||(r=a.color);l=AmCharts.circle(d,a.nailRadius,l,a.nailAlpha,a.nailBorderThickness,l,a.nailBorderAlpha);a.set.push(l);l.translate(m,
17
+ p);isNaN(g)&&(g=e-c.tickLength);var c=Math.sin(b/180*Math.PI),e=Math.cos(b/180*Math.PI),l=Math.sin((b+90)/180*Math.PI),v=Math.cos((b+90)/180*Math.PI),d=AmCharts.polygon(d,[m-h/2*l+k*c,m+g*c-f/2*l,m+g*c+f/2*l,m+h/2*l+k*c],[p+h/2*v-k*e,p-g*e+f/2*v,p-g*e-f/2*v,p-h/2*v-k*e],a.color,a.alpha,1,r,a.borderAlpha,void 0,!0);a.set.push(d);this.graphsSet.push(a.set)}},setValue:function(a,b){a.axis&&(a.axis.value2angle(b),a.frame=0,a.previousValue=a.value);a.value=b;var d=this.legend;d&&d.updateValues()},handleLegendEvent:function(a){var b=
18
+ a.type;a=a.dataItem;if(!this.legend.data&&a)switch(b){case "hideItem":this.hideArrow(a);break;case "showItem":this.showArrow(a)}},hideArrow:function(a){a.set.hide();a.hidden=!0},showArrow:function(a){a.set.show();a.hidden=!1},updateAnimations:function(){AmCharts.AmAngularGauge.base.updateAnimations.call(this);for(var a=this.arrows.length,b,d=0;d<a;d++){b=this.arrows[d];var c;b.frame>=this.totalFrames?c=b.value:(b.frame++,b.clockWiseOnly&&b.value<b.previousValue&&(c=b.axis,b.previousValue-=c.endValue-
19
+ c.startValue),c=AmCharts.getEffect(this.startEffect),c=AmCharts[c](0,b.frame,b.previousValue,b.value-b.previousValue,this.totalFrames),isNaN(c)&&(c=b.value));c=b.axis.value2angle(c);this.drawArrow(b,c)}}});
@@ -1,9 +1,10 @@
1
- AmCharts.AmPieChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(e){this.className="AmPieChart";this.chartType="pie";AmCharts.AmPieChart.base.construct.call(this,e);this.pieBrightnessStep=30;this.minRadius=10;this.depth3D=0;this.startAngle=90;this.angle=this.innerRadius=0;this.startRadius="500%";this.pullOutRadius="20%";this.labelRadius=30;this.labelText="[[title]]: [[percents]]%";this.balloonText="[[title]]: [[percents]]% ([[value]])\n[[description]]";this.previousScale=1;AmCharts.applyTheme(this,
2
- e,"AmPieChart")},drawChart:function(){AmCharts.AmPieChart.base.drawChart.call(this);var e=this.chartData;if(AmCharts.ifArray(e)){if(0<this.realWidth&&0<this.realHeight){AmCharts.VML&&(this.startAlpha=1);var g=this.startDuration,c=this.container,a=this.updateWidth();this.realWidth=a;var h=this.updateHeight();this.realHeight=h;var d=AmCharts.toCoordinate,k=d(this.marginLeft,a),b=d(this.marginRight,a),q=d(this.marginTop,h)+this.getTitleHeight(),l=d(this.marginBottom,h),v,w,f,s=AmCharts.toNumber(this.labelRadius),
3
- r=this.measureMaxLabel();this.labelText&&this.labelsEnabled||(s=r=0);v=void 0===this.pieX?(a-k-b)/2+k:d(this.pieX,this.realWidth);w=void 0===this.pieY?(h-q-l)/2+q:d(this.pieY,h);f=d(this.radius,a,h);f||(a=0<=s?a-k-b-2*r:a-k-b,h=h-q-l,f=Math.min(a,h),h<a&&(f/=1-this.angle/90,f>a&&(f=a)),h=AmCharts.toCoordinate(this.pullOutRadius,f),f=(0<=s?f-1.8*(s+h):f-1.8*h)/2);f<this.minRadius&&(f=this.minRadius);h=d(this.pullOutRadius,f);q=AmCharts.toCoordinate(this.startRadius,f);d=d(this.innerRadius,f);d>=f&&
4
- (d=f-1);l=AmCharts.fitToBounds(this.startAngle,0,360);0<this.depth3D&&(l=270<=l?270:90);l-=90;a=f-f*this.angle/90;for(k=0;k<e.length;k++)if(b=e[k],!0!==b.hidden&&0<b.percents){var p=360*b.percents/100,r=Math.sin((l+p/2)/180*Math.PI),x=-Math.cos((l+p/2)/180*Math.PI)*(a/f),n=this.outlineColor;n||(n=b.color);n={fill:b.color,stroke:n,"stroke-width":this.outlineThickness,"stroke-opacity":this.outlineAlpha,"fill-opacity":this.alpha};b.url&&(n.cursor="pointer");n=AmCharts.wedge(c,v,w,l,p,f,a,d,this.depth3D,
5
- n,this.gradientRatio,b.pattern);this.addEventListeners(n,b);b.startAngle=l;e[k].wedge=n;b.ix=r;b.iy=x;b.wedge=n;b.index=k;if(this.labelsEnabled&&this.labelText&&b.percents>=this.hideLabelsPercent){var m=l+p/2,p=s;isNaN(b.labelRadius)||(p=b.labelRadius);var A=v+r*(f+p),t=w+x*(f+p),y,u=0;if(0<=p){var z;90>=m&&0<=m?(z=0,y="start",u=8):90<=m&&180>m?(z=1,y="start",u=8):180<=m&&270>m?(z=2,y="end",u=-8):270<=m&&360>m&&(z=3,y="end",u=-8);b.labelQuarter=z}else y="middle";var m=this.formatString(this.labelText,
6
- b),B=b.labelColor;B||(B=this.color);m=AmCharts.text(c,m,B,this.fontFamily,this.fontSize,y);m.translate(A+1.5*u,t);b.tx=A+1.5*u;b.ty=t;t=d+(f-d)/2;b.pulled&&(t+=this.pullOutRadiusReal);b.balloonX=r*t+v;b.balloonY=x*t+w;0<=p?n.push(m):this.freeLabelsSet.push(m);b.label=m;b.tx=A;b.tx2=A+u;b.tx0=v+r*f;b.ty0=w+x*f}b.startX=Math.round(r*q);b.startY=Math.round(x*q);b.pullX=Math.round(r*h);b.pullY=Math.round(x*h);this.graphsSet.push(n);(0===b.alpha||0<g&&!this.chartCreated)&&n.hide();l+=360*b.percents/100}0<
7
- s&&!this.labelRadiusField&&this.arrangeLabels();this.pieXReal=v;this.pieYReal=w;this.radiusReal=f;this.innerRadiusReal=d;0<s&&this.drawTicks();this.initialStart();this.setDepths()}(e=this.legend)&&e.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},setDepths:function(){var e=this.chartData,g;for(g=0;g<e.length;g++){var c=e[g],a=c.wedge,c=c.startAngle;0<=c&&180>c?a.toFront():180<=c&&a.toBack()}},arrangeLabels:function(){var e=this.chartData,g=e.length,c,a;for(a=g-1;0<=a;a--)c=
8
- e[a],0!==c.labelQuarter||c.hidden||this.checkOverlapping(a,c,0,!0,0);for(a=0;a<g;a++)c=e[a],1!=c.labelQuarter||c.hidden||this.checkOverlapping(a,c,1,!1,0);for(a=g-1;0<=a;a--)c=e[a],2!=c.labelQuarter||c.hidden||this.checkOverlapping(a,c,2,!0,0);for(a=0;a<g;a++)c=e[a],3!=c.labelQuarter||c.hidden||this.checkOverlapping(a,c,3,!1,0)},checkOverlapping:function(e,g,c,a,h){var d,k,b=this.chartData,q=b.length,l=g.label;if(l){if(!0===a)for(k=e+1;k<q;k++)b[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,
9
- b[k],c))&&(k=q);else for(k=e-1;0<=k;k--)b[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,b[k],c))&&(k=0);!0===d&&100>h&&(d=g.ty+3*g.iy,g.ty=d,l.translate(g.tx2,d),this.checkOverlapping(e,g,c,a,h+1))}},checkOverlappingReal:function(e,g,c){var a=!1,h=e.label,d=g.label;e.labelQuarter!=c||e.hidden||g.hidden||!d||(h=h.getBBox(),c={},c.width=h.width,c.height=h.height,c.y=e.ty,c.x=e.tx,e=d.getBBox(),d={},d.width=e.width,d.height=e.height,d.y=g.ty,d.x=g.tx,AmCharts.hitTest(c,d)&&(a=!0));return a}});
1
+ AmCharts.AmPieChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(e){this.type="pie";AmCharts.AmPieChart.base.construct.call(this,e);this.cname="AmPieChart";this.pieBrightnessStep=30;this.minRadius=10;this.depth3D=0;this.startAngle=90;this.angle=this.innerRadius=0;this.startRadius="500%";this.pullOutRadius="20%";this.labelRadius=20;this.labelText="[[title]]: [[percents]]%";this.balloonText="[[title]]: [[percents]]% ([[value]])\n[[description]]";this.previousScale=1;AmCharts.applyTheme(this,
2
+ e,this.cname)},drawChart:function(){AmCharts.AmPieChart.base.drawChart.call(this);var e=this.chartData;if(AmCharts.ifArray(e)){if(0<this.realWidth&&0<this.realHeight){AmCharts.VML&&(this.startAlpha=1);var g=this.startDuration,c=this.container,b=this.updateWidth();this.realWidth=b;var h=this.updateHeight();this.realHeight=h;var d=AmCharts.toCoordinate,k=d(this.marginLeft,b),a=d(this.marginRight,b),q=d(this.marginTop,h)+this.getTitleHeight(),l=d(this.marginBottom,h),v,w,f,s=AmCharts.toNumber(this.labelRadius),
3
+ r=this.measureMaxLabel();this.labelText&&this.labelsEnabled||(s=r=0);v=void 0===this.pieX?(b-k-a)/2+k:d(this.pieX,this.realWidth);w=void 0===this.pieY?(h-q-l)/2+q:d(this.pieY,h);f=d(this.radius,b,h);f||(b=0<=s?b-k-a-2*r:b-k-a,h=h-q-l,f=Math.min(b,h),h<b&&(f/=1-this.angle/90,f>b&&(f=b)),h=AmCharts.toCoordinate(this.pullOutRadius,f),f=(0<=s?f-1.8*(s+h):f-1.8*h)/2);f<this.minRadius&&(f=this.minRadius);h=d(this.pullOutRadius,f);q=AmCharts.toCoordinate(this.startRadius,f);d=d(this.innerRadius,f);d>=f&&
4
+ (d=f-1);l=AmCharts.fitToBounds(this.startAngle,0,360);0<this.depth3D&&(l=270<=l?270:90);l-=90;b=f-f*this.angle/90;for(k=0;k<e.length;k++)if(a=e[k],!0!==a.hidden&&0<a.percents){var m=360*a.percents/100,r=Math.sin((l+m/2)/180*Math.PI),x=-Math.cos((l+m/2)/180*Math.PI)*(b/f),p=this.outlineColor;p||(p=a.color);var t=this.alpha;isNaN(a.alpha)||(t=a.alpha);p={fill:a.color,stroke:p,"stroke-width":this.outlineThickness,"stroke-opacity":this.outlineAlpha,"fill-opacity":t};a.url&&(p.cursor="pointer");p=AmCharts.wedge(c,
5
+ v,w,l,m,f,b,d,this.depth3D,p,this.gradientRatio,a.pattern);this.addEventListeners(p,a);a.startAngle=l;e[k].wedge=p;0<g&&(this.chartCreated||p.setAttr("opacity",this.startAlpha));a.ix=r;a.iy=x;a.wedge=p;a.index=k;if(this.labelsEnabled&&this.labelText&&a.percents>=this.hideLabelsPercent){var n=l+m/2,m=s;isNaN(a.labelRadius)||(m=a.labelRadius);var t=v+r*(f+m),B=w+x*(f+m),y,u=0;if(0<=m){var z;90>=n&&0<=n?(z=0,y="start",u=8):90<=n&&180>n?(z=1,y="start",u=8):180<=n&&270>n?(z=2,y="end",u=-8):270<=n&&360>
6
+ n&&(z=3,y="end",u=-8);a.labelQuarter=z}else y="middle";var n=this.formatString(this.labelText,a),A=a.labelColor;A||(A=this.color);n=AmCharts.text(c,n,A,this.fontFamily,this.fontSize,y);n.translate(t+1.5*u,B);a.tx=t+1.5*u;a.ty=B;0<=m?p.push(n):this.freeLabelsSet.push(n);a.label=n;a.tx=t;a.tx2=t+u;a.tx0=v+r*f;a.ty0=w+x*f}m=d+(f-d)/2;a.pulled&&(m+=this.pullOutRadiusReal);a.balloonX=r*m+v;a.balloonY=x*m+w;a.startX=Math.round(r*q);a.startY=Math.round(x*q);a.pullX=Math.round(r*h);a.pullY=Math.round(x*h);
7
+ this.graphsSet.push(p);(0===a.alpha||0<g&&!this.chartCreated)&&p.hide();l+=360*a.percents/100}0<s&&!this.labelRadiusField&&this.arrangeLabels();this.pieXReal=v;this.pieYReal=w;this.radiusReal=f;this.innerRadiusReal=d;0<s&&this.drawTicks();this.initialStart();this.setDepths()}(e=this.legend)&&e.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},setDepths:function(){var e=this.chartData,g;for(g=0;g<e.length;g++){var c=e[g],b=c.wedge,c=c.startAngle;0<=c&&180>c?b.toFront():
8
+ 180<=c&&b.toBack()}},arrangeLabels:function(){var e=this.chartData,g=e.length,c,b;for(b=g-1;0<=b;b--)c=e[b],0!==c.labelQuarter||c.hidden||this.checkOverlapping(b,c,0,!0,0);for(b=0;b<g;b++)c=e[b],1!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,1,!1,0);for(b=g-1;0<=b;b--)c=e[b],2!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,2,!0,0);for(b=0;b<g;b++)c=e[b],3!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,3,!1,0)},checkOverlapping:function(e,g,c,b,h){var d,k,a=this.chartData,q=a.length,
9
+ l=g.label;if(l){if(!0===b)for(k=e+1;k<q;k++)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,a[k],c))&&(k=q);else for(k=e-1;0<=k;k--)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,a[k],c))&&(k=0);!0===d&&100>h&&(d=g.ty+3*g.iy,g.ty=d,l.translate(g.tx2,d),this.checkOverlapping(e,g,c,b,h+1))}},checkOverlappingReal:function(e,g,c){var b=!1,h=e.label,d=g.label;e.labelQuarter!=c||e.hidden||g.hidden||!d||(h=h.getBBox(),c={},c.width=h.width,c.height=h.height,c.y=e.ty,c.x=e.tx,e=d.getBBox(),d={},
10
+ d.width=e.width,d.height=e.height,d.y=g.ty,d.x=g.tx,AmCharts.hitTest(c,d)&&(b=!0));return b}});
@@ -1,8 +1,8 @@
1
- AmCharts.AmRadarChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(a){this.chartType="radar";AmCharts.AmRadarChart.base.construct.call(this,a);this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=0;this.radius="35%";AmCharts.applyTheme(this,a,"AmRadarChart")},initChart:function(){AmCharts.AmRadarChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.drawChart()},updateData:function(){this.parseData();
2
- var a=this.graphs,b;for(b=0;b<a.length;b++)a[b].data=this.chartData},updateGraphs:function(){var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.index=b;c.width=this.realRadius;c.height=this.realRadius;c.x=this.marginLeftReal;c.y=this.marginTopReal;c.chartType=this.chartType}},parseData:function(){AmCharts.AmRadarChart.base.parseData.call(this);this.parseSerialData()},updateValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b];c.axisRenderer=AmCharts.RadAxis;c.guideFillRenderer=
3
- AmCharts.RadarFill;c.axisItemRenderer=AmCharts.RadItem;c.autoGridCount=!1;c.x=this.marginLeftReal;c.y=this.marginTopReal;c.width=this.realRadius;c.height=this.realRadius}},drawChart:function(){AmCharts.AmRadarChart.base.drawChart.call(this);var a=this.updateWidth(),b=this.updateHeight(),c=this.marginTop+this.getTitleHeight(),d=this.marginLeft,b=b-c-this.marginBottom;this.marginLeftReal=d+(a-d-this.marginRight)/2;this.marginTopReal=c+b/2;this.realRadius=AmCharts.toCoordinate(this.radius,a,b);this.updateValueAxes();
4
- this.updateGraphs();a=this.chartData;if(AmCharts.ifArray(a)){if(0<this.realWidth&&0<this.realHeight){a=a.length-1;d=this.valueAxes;for(c=0;c<d.length;c++)d[c].zoom(0,a);d=this.graphs;for(c=0;c<d.length;c++)d[c].zoom(0,a);(a=this.legend)&&a.invalidateSize()}}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},formatString:function(a,b){var c=b.graph;-1!=a.indexOf("[[category]]")&&(a=a.replace(/\[\[category\]\]/g,String(b.serialDataItem.category)));c=c.numberFormatter;c||(c=this.numberFormatter);
5
- a=AmCharts.formatValue(a,b.values,["value"],c,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,b.dataContext));return a=AmCharts.AmRadarChart.base.formatString.call(this,a,b)},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,this.graphs])}});AmCharts.RadAxis=AmCharts.Class({construct:function(a){var b=a.chart,c=a.axisThickness,d=a.axisColor,m=a.axisAlpha,n=a.x,e=a.y;this.set=b.container.set();b.axesSet.push(this.set);var f=a.axisTitleOffset,k=a.radarCategoriesEnabled,l=a.chart.fontFamily,h=a.fontSize;void 0===h&&(h=a.chart.fontSize);var q=a.color;void 0===q&&(q=a.chart.color);if(b){this.axisWidth=a.height;a=b.chartData;var w=a.length,r;for(r=0;r<w;r++){var g=180-360/w*r,p=n+this.axisWidth*Math.sin(g/180*Math.PI),s=e+this.axisWidth*Math.cos(g/
1
+ AmCharts.AmRadarChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(a){this.type="radar";AmCharts.AmRadarChart.base.construct.call(this,a);this.cname="AmRadarChart";this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=0;this.radius="35%";AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmRadarChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.drawChart()},updateData:function(){this.parseData();
2
+ var a=this.graphs,b;for(b=0;b<a.length;b++)a[b].data=this.chartData},updateGraphs:function(){var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.index=b;c.width=this.realRadius;c.height=this.realRadius;c.x=this.marginLeftReal;c.y=this.marginTopReal}},parseData:function(){AmCharts.AmRadarChart.base.parseData.call(this);this.parseSerialData()},updateValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b];c.axisRenderer=AmCharts.RadAxis;c.guideFillRenderer=AmCharts.RadarFill;
3
+ c.axisItemRenderer=AmCharts.RadItem;c.autoGridCount=!1;c.x=this.marginLeftReal;c.y=this.marginTopReal;c.width=this.realRadius;c.height=this.realRadius}},drawChart:function(){AmCharts.AmRadarChart.base.drawChart.call(this);var a=this.updateWidth(),b=this.updateHeight(),c=this.marginTop+this.getTitleHeight(),d=this.marginLeft,b=b-c-this.marginBottom;this.marginLeftReal=d+(a-d-this.marginRight)/2;this.marginTopReal=c+b/2;this.realRadius=AmCharts.toCoordinate(this.radius,a,b);this.updateValueAxes();this.updateGraphs();
4
+ a=this.chartData;if(AmCharts.ifArray(a)){if(0<this.realWidth&&0<this.realHeight){a=a.length-1;d=this.valueAxes;for(c=0;c<d.length;c++)d[c].zoom(0,a);d=this.graphs;for(c=0;c<d.length;c++)d[c].zoom(0,a);(a=this.legend)&&a.invalidateSize()}}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},formatString:function(a,b,c){var d=b.graph;-1!=a.indexOf("[[category]]")&&(a=a.replace(/\[\[category\]\]/g,String(b.serialDataItem.category)));d=d.numberFormatter;d||(d=this.nf);a=AmCharts.formatValue(a,
5
+ b.values,["value"],d,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,b.dataContext));return a=AmCharts.AmRadarChart.base.formatString.call(this,a,b,c)},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,this.graphs])}});AmCharts.RadAxis=AmCharts.Class({construct:function(a){var b=a.chart,c=a.axisThickness,d=a.axisColor,m=a.axisAlpha,n=a.x,e=a.y;this.set=b.container.set();b.axesSet.push(this.set);var f=a.axisTitleOffset,k=a.radarCategoriesEnabled,l=a.chart.fontFamily,h=a.fontSize;void 0===h&&(h=a.chart.fontSize);var q=a.color;void 0===q&&(q=a.chart.color);if(b){this.axisWidth=a.height;a=b.chartData;var w=a.length,r;for(r=0;r<w;r++){var g=180-360/w*r,p=n+this.axisWidth*Math.sin(g/180*Math.PI),s=e+this.axisWidth*Math.cos(g/
6
6
  180*Math.PI);0<m&&(p=AmCharts.line(b.container,[n,p],[e,s],d,m,c),this.set.push(p));if(k){var u="start",p=n+(this.axisWidth+f)*Math.sin(g/180*Math.PI),s=e+(this.axisWidth+f)*Math.cos(g/180*Math.PI);if(180==g||0===g)u="middle",p-=5;0>g&&(u="end",p-=10);180==g&&(s-=5);0===g&&(s+=5);g=AmCharts.text(b.container,a[r].category,q,l,h,u);g.translate(p+5,s);this.set.push(g);g.getBBox()}}}}});AmCharts.RadItem=AmCharts.Class({construct:function(a,b,c,d,m,n,e){void 0===c&&(c="");var f=a.chart.fontFamily,k=a.fontSize;void 0===k&&(k=a.chart.fontSize);var l=a.color;void 0===l&&(l=a.chart.color);var h=a.chart.container;this.set=d=h.set();var q=a.axisColor,w=a.axisAlpha,r=a.tickLength,g=a.gridAlpha,p=a.gridThickness,s=a.gridColor,u=a.dashLength,A=a.fillColor,y=a.fillAlpha,B=a.labelsEnabled;m=a.counter;var C=a.inside,D=a.gridType,t;b-=a.height;var x;n=a.x;var E=a.y;e?(B=!0,isNaN(e.tickLength)||
7
7
  (r=e.tickLength),void 0!=e.lineColor&&(s=e.lineColor),isNaN(e.lineAlpha)||(g=e.lineAlpha),isNaN(e.dashLength)||(u=e.dashLength),isNaN(e.lineThickness)||(p=e.lineThickness),!0===e.inside&&(C=!0)):c||(g/=3,r/=2);var F="end",z=-1;C&&(F="start",z=1);var v;B&&(v=AmCharts.text(h,c,l,f,k,F),v.translate(n+(r+3)*z,b),d.push(v),this.label=v,x=AmCharts.line(h,[n,n+r*z],[b,b],q,w,p),d.push(x));b=Math.round(a.y-b);f=[];k=[];if(0<g){if("polygons"==D){t=a.data.length;for(l=0;l<t;l++)q=180-360/t*l,f.push(b*Math.sin(q/
8
8
  180*Math.PI)),k.push(b*Math.cos(q/180*Math.PI));f.push(f[0]);k.push(k[0]);g=AmCharts.line(h,f,k,s,g,p,u)}else g=AmCharts.circle(h,b,"#FFFFFF",0,p,s,g);g.translate(n,E);d.push(g)}if(1==m&&0<y&&!e&&""!==c){e=a.previousCoord;if("polygons"==D){for(l=t;0<=l;l--)q=180-360/t*l,f.push(e*Math.sin(q/180*Math.PI)),k.push(e*Math.cos(q/180*Math.PI));t=AmCharts.polygon(h,f,k,A,y)}else t=AmCharts.wedge(h,0,0,0,360,b,b,e,0,{fill:A,"fill-opacity":y,stroke:"#000","stroke-opacity":0,"stroke-width":1});d.push(t);t.translate(n,
@@ -1,49 +1,52 @@
1
- AmCharts.AmSerialChart=AmCharts.Class({inherits:AmCharts.AmRectangularChart,construct:function(a){this.className="AmSerialChart";this.chartType="serial";AmCharts.AmSerialChart.base.construct.call(this,a);this.theme=a;this.createEvents("changed");this.columnSpacing=5;this.columnSpacing3D=0;this.columnWidth=0.8;this.updateScrollbar=!0;var b=new AmCharts.CategoryAxis(a);b.chart=this;this.categoryAxis=b;this.zoomOutOnDataUpdate=!0;this.mouseWheelScrollEnabled=this.rotate=this.skipZoom=!1;this.minSelectedTime=
2
- 0;AmCharts.applyTheme(this,a,"AmSerialChart")},initChart:function(){AmCharts.AmSerialChart.base.initChart.call(this);this.updateCategoryAxis(this.categoryAxis,this.rotate,"categoryAxis");this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);var a=this.chartCursor;a&&a.updateData();var a=this.countColumns(),b=this.graphs,c;for(c=0;c<b.length;c++)b[c].columnCount=a;this.updateScrollbar=!0;this.drawChart();this.autoMargins&&!this.marginsUpdated&&(this.marginsUpdated=!0,
3
- this.measureMargins());this.mouseWheelScrollEnabled&&this.addMouseWheel()},validateData:function(a){this.marginsUpdated=!1;this.zoomOutOnDataUpdate&&!a&&(this.endTime=this.end=this.startTime=this.start=NaN);AmCharts.AmSerialChart.base.validateData.call(this)},drawChart:function(){AmCharts.AmSerialChart.base.drawChart.call(this);var a=this.chartData;if(AmCharts.ifArray(a)){var b=this.chartScrollbar;b&&b.draw();if(0<this.realWidth&&0<this.realHeight){var a=a.length-1,c,b=this.categoryAxis;if(b.parseDates&&
4
- !b.equalSpacing){if(b=this.startTime,c=this.endTime,isNaN(b)||isNaN(c))b=this.firstTime,c=this.lastTime}else if(b=this.start,c=this.end,isNaN(b)||isNaN(c))b=0,c=a;this.endTime=this.startTime=this.end=this.start=void 0;this.zoom(b,c)}}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,this.graphs,this.categoryAxis,this.chartScrollbar,this.chartCursor])},updateCategoryAxis:function(a,b,c){a.chart=this;a.id=c;a.rotate=b;a.axisRenderer=
5
- AmCharts.RecAxis;a.guideFillRenderer=AmCharts.RecFill;a.axisItemRenderer=AmCharts.RecItem;a.setOrientation(!this.rotate);a.x=this.marginLeftReal;a.y=this.marginTopReal;a.dx=this.dx;a.dy=this.dy;a.width=this.plotAreaWidth-1;a.height=this.plotAreaHeight-1;a.viW=this.plotAreaWidth-1;a.viH=this.plotAreaHeight-1;a.viX=this.marginLeftReal;a.viY=this.marginTopReal;a.marginsChanged=!0},updateValueAxes:function(){AmCharts.AmSerialChart.base.updateValueAxes.call(this);var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=
6
- a[b],d=this.rotate;c.rotate=d;c.setOrientation(d);d=this.categoryAxis;if(!d.startOnAxis||d.parseDates)c.expandMinMax=!0}},updateData:function(){this.parseData();var a=this.graphs,b,c=this.chartData;for(b=0;b<a.length;b++)a[b].data=c;0<c.length&&(this.firstTime=this.getStartTime(c[0].time),this.lastTime=this.getEndTime(c[c.length-1].time))},getStartTime:function(a){var b=this.categoryAxis;return AmCharts.resetDateToMin(new Date(a),b.minPeriod,1,b.firstDayOfWeek).getTime()},getEndTime:function(a){var b=
7
- AmCharts.extractPeriod(this.categoryAxis.minPeriod);return AmCharts.changeDate(new Date(a),b.period,b.count,!0).getTime()-1},updateMargins:function(){AmCharts.AmSerialChart.base.updateMargins.call(this);var a=this.chartScrollbar;a&&(this.getScrollbarPosition(a,this.rotate,this.categoryAxis.position),this.adjustMargins(a,this.rotate))},updateScrollbars:function(){AmCharts.AmSerialChart.base.updateScrollbars.call(this);this.updateChartScrollbar(this.chartScrollbar,this.rotate)},zoom:function(a,b){var c=
8
- this.categoryAxis;c.parseDates&&!c.equalSpacing?this.timeZoom(a,b):this.indexZoom(a,b);this.updateLegendValues()},timeZoom:function(a,b){var c=this.maxSelectedTime;isNaN(c)||(b!=this.endTime&&b-a>c&&(a=b-c,this.updateScrollbar=!0),a!=this.startTime&&b-a>c&&(b=a+c,this.updateScrollbar=!0));var d=this.minSelectedTime;if(0<d&&b-a<d){var e=Math.round(a+(b-a)/2),d=Math.round(d/2);a=e-d;b=e+d}var g=this.chartData,e=this.categoryAxis;if(AmCharts.ifArray(g)&&(a!=this.startTime||b!=this.endTime)){var k=e.minDuration(),
9
- d=this.firstTime,n=this.lastTime;a||(a=d,isNaN(c)||(a=n-c));b||(b=n);a>n&&(a=n);b<d&&(b=d);a<d&&(a=d);b>n&&(b=n);b<a&&(b=a+k);b-a<k/5&&(b<n?b=a+k/5:a=b-k/5);this.startTime=a;this.endTime=b;c=g.length-1;k=this.getClosestIndex(g,"time",a,!0,0,c);g=this.getClosestIndex(g,"time",b,!1,k,c);e.timeZoom(a,b);e.zoom(k,g);this.start=AmCharts.fitToBounds(k,0,c);this.end=AmCharts.fitToBounds(g,0,c);this.zoomAxesAndGraphs();this.zoomScrollbar();a!=d||b!=n?this.showZB(!0):this.showZB(!1);this.updateColumnsDepth();
10
- this.dispatchTimeZoomEvent()}},indexZoom:function(a,b){var c=this.maxSelectedSeries;isNaN(c)||(b!=this.end&&b-a>c&&(a=b-c,this.updateScrollbar=!0),a!=this.start&&b-a>c&&(b=a+c,this.updateScrollbar=!0));if(a!=this.start||b!=this.end){var d=this.chartData.length-1;isNaN(a)&&(a=0,isNaN(c)||(a=d-c));isNaN(b)&&(b=d);b<a&&(b=a);b>d&&(b=d);a>d&&(a=d-1);0>a&&(a=0);this.start=a;this.end=b;this.categoryAxis.zoom(a,b);this.zoomAxesAndGraphs();this.zoomScrollbar();0!==a||b!=this.chartData.length-1?this.showZB(!0):
11
- this.showZB(!1);this.updateColumnsDepth();this.dispatchIndexZoomEvent()}},updateGraphs:function(){AmCharts.AmSerialChart.base.updateGraphs.call(this);var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.columnWidthReal=this.columnWidth;c.categoryAxis=this.categoryAxis}},updateColumnsDepth:function(){var a,b=this.graphs,c;AmCharts.remove(this.columnsSet);this.columnsArray=[];for(a=0;a<b.length;a++){c=b[a];var d=c.columnsArray;if(d){var e;for(e=0;e<d.length;e++)this.columnsArray.push(d[e])}}this.columnsArray.sort(this.compareDepth);
12
- if(0<this.columnsArray.length){b=this.container.set();this.columnSet.push(b);for(a=0;a<this.columnsArray.length;a++)b.push(this.columnsArray[a].column.set);c&&b.translate(c.x,c.y);this.columnsSet=b}},compareDepth:function(a,b){return a.depth>b.depth?1:-1},zoomScrollbar:function(){var a=this.chartScrollbar,b=this.categoryAxis;a&&this.updateScrollbar&&(b.parseDates&&!b.equalSpacing?a.timeZoom(this.startTime,this.endTime):a.zoom(this.start,this.end),this.updateScrollbar=!0)},updateTrendLines:function(){var a=
13
- this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.TrendLine,this.theme);a[b]=c;c.chart=this;AmCharts.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.categoryAxis=this.categoryAxis}},zoomAxesAndGraphs:function(){if(!this.scrollbarOnly){var a=this.valueAxes,b;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);a=this.graphs;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);this.zoomTrendLines();
14
- (b=this.chartCursor)&&b.zoom(this.start,this.end,this.startTime,this.endTime)}},countColumns:function(){var a=0,b=this.valueAxes.length,c=this.graphs.length,d,e,g=!1,k,n;for(n=0;n<b;n++){e=this.valueAxes[n];var l=e.stackType;if("100%"==l||"regular"==l)for(g=!1,k=0;k<c;k++)d=this.graphs[k],d.hidden||d.valueAxis!=e||"column"!=d.type||(!g&&d.stackable&&(a++,g=!0),!d.stackable&&d.clustered&&a++,d.columnIndex=a-1,d.clustered||(d.columnIndex=0));if("none"==l||"3d"==l)for(k=0;k<c;k++)d=this.graphs[k],!d.hidden&&
15
- d.valueAxis==e&&"column"==d.type&&d.clustered&&(d.columnIndex=a,a++);if("3d"==l){for(n=0;n<c;n++)d=this.graphs[n],d.depthCount=a;a=1}}return a},parseData:function(){AmCharts.AmSerialChart.base.parseData.call(this);this.parseSerialData()},getCategoryIndexByValue:function(a){var b=this.chartData,c,d;for(d=0;d<b.length;d++)b[d].category==a&&(c=d);return c},handleCursorChange:function(a){this.updateLegendValues(a.index)},handleCursorZoom:function(a){this.updateScrollbar=!0;this.zoom(a.start,a.end)},handleScrollbarZoom:function(a){this.updateScrollbar=
16
- !1;this.zoom(a.start,a.end)},dispatchTimeZoomEvent:function(){if(this.prevStartTime!=this.startTime||this.prevEndTime!=this.endTime){var a={type:"zoomed"};a.startDate=new Date(this.startTime);a.endDate=new Date(this.endTime);a.startIndex=this.start;a.endIndex=this.end;this.startIndex=this.start;this.endIndex=this.end;this.startDate=a.startDate;this.endDate=a.endDate;this.prevStartTime=this.startTime;this.prevEndTime=this.endTime;var b=this.categoryAxis,c=AmCharts.extractPeriod(b.minPeriod).period,
17
- b=b.dateFormatsObject[c];a.startValue=AmCharts.formatDate(a.startDate,b);a.endValue=AmCharts.formatDate(a.endDate,b);a.chart=this;a.target=this;this.fire(a.type,a)}},dispatchIndexZoomEvent:function(){if(this.prevStartIndex!=this.start||this.prevEndIndex!=this.end){this.startIndex=this.start;this.endIndex=this.end;var a=this.chartData;if(AmCharts.ifArray(a)&&!isNaN(this.start)&&!isNaN(this.end)){var b={chart:this,target:this,type:"zoomed"};b.startIndex=this.start;b.endIndex=this.end;b.startValue=a[this.start].category;
18
- b.endValue=a[this.end].category;this.categoryAxis.parseDates&&(this.startTime=a[this.start].time,this.endTime=a[this.end].time,b.startDate=new Date(this.startTime),b.endDate=new Date(this.endTime));this.prevStartIndex=this.start;this.prevEndIndex=this.end;this.fire(b.type,b)}}},updateLegendValues:function(a){var b=this.graphs,c;for(c=0;c<b.length;c++){var d=b[c];isNaN(a)?d.currentDataItem=void 0:d.currentDataItem=this.chartData[a].axes[d.valueAxis.id].graphs[d.id]}this.legend&&this.legend.updateValues()},
19
- getClosestIndex:function(a,b,c,d,e,g){0>e&&(e=0);g>a.length-1&&(g=a.length-1);var k=e+Math.round((g-e)/2),n=a[k][b];if(1>=g-e){if(d)return e;d=a[g][b];return Math.abs(a[e][b]-c)<Math.abs(d-c)?e:g}return c==n?k:c<n?this.getClosestIndex(a,b,c,d,e,k):this.getClosestIndex(a,b,c,d,k,g)},zoomToIndexes:function(a,b){this.updateScrollbar=!0;var c=this.chartData;if(c){var d=c.length;0<d&&(0>a&&(a=0),b>d-1&&(b=d-1),d=this.categoryAxis,d.parseDates&&!d.equalSpacing?this.zoom(c[a].time,this.getEndTime(c[b].time)):
20
- this.zoom(a,b))}},zoomToDates:function(a,b){this.updateScrollbar=!0;var c=this.chartData;if(this.categoryAxis.equalSpacing){var d=this.getClosestIndex(c,"time",a.getTime(),!0,0,c.length),c=this.getClosestIndex(c,"time",b.getTime(),!1,0,c.length);this.zoom(d,c)}else this.zoom(a.getTime(),b.getTime())},zoomToCategoryValues:function(a,b){this.updateScrollbar=!0;this.zoom(this.getCategoryIndexByValue(a),this.getCategoryIndexByValue(b))},formatPeriodString:function(a,b){if(b){var c=["value","open","low",
21
- "high","close"],d="value open low high close average sum count".split(" "),e=b.valueAxis,g=this.chartData,k=b.numberFormatter;k||(k=this.numberFormatter);for(var n=0;n<c.length;n++){for(var l=c[n],h=0,f=0,m,u,p,s,y,w=0,r=0,q,t,v,z,B,A=this.start;A<=this.end;A++){var x=g[A];if(x&&(x=x.axes[e.id].graphs[b.id])){if(x.values){var C=x.values[l];if(!isNaN(C)){isNaN(m)&&(m=C);u=C;if(isNaN(p)||p>C)p=C;if(isNaN(s)||s<C)s=C;h+=C;f++;y=h/f}}if(x.percents&&(x=x.percents[l],!isNaN(x))){isNaN(q)&&(q=x);t=x;if(isNaN(v)||
22
- v>x)v=x;if(isNaN(z)||z<x)z=x;w+=x;r++;B=w/r}}}w={open:q,close:t,high:z,low:v,average:B,sum:w,count:r};a=AmCharts.formatValue(a,{open:m,close:u,high:s,low:p,average:y,sum:h,count:f},d,k,l+"\\.",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=AmCharts.formatValue(a,w,d,this.percentFormatter,"percents\\."+l+"\\.")}}return a},formatString:function(a,b){var c=b.graph;if(-1!=a.indexOf("[[category]]")){var d=b.serialDataItem.category;if(this.categoryAxis.parseDates){var e=this.balloonDateFormat,
23
- g=this.chartCursor;g&&(e=g.categoryBalloonDateFormat);-1!=a.indexOf("[[category]]")&&(e=AmCharts.formatDate(d,e),-1!=e.indexOf("fff")&&(e=AmCharts.formatMilliseconds(e,d)),d=e)}a=a.replace(/\[\[category\]\]/g,String(d))}c=c.numberFormatter;c||(c=this.numberFormatter);d=b.graph.valueAxis;(e=d.duration)&&!isNaN(b.values.value)&&(d=AmCharts.formatDuration(b.values.value,e,"",d.durationUnits,d.maxInterval,c),a=a.replace(RegExp("\\[\\[value\\]\\]","g"),d));d="value open low high close total".split(" ");
24
- e=this.percentFormatter;a=AmCharts.formatValue(a,b.percents,d,e,"percents\\.");a=AmCharts.formatValue(a,b.values,d,c,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=AmCharts.formatValue(a,b.values,["percents"],e);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,b.dataContext));return a=AmCharts.AmSerialChart.base.formatString.call(this,a,b)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar]);a&&(a.chart=this,this.listenTo(a,"zoomed",
25
- this.handleScrollbarZoom));this.rotate?void 0===a.width&&(a.width=a.scrollbarHeight):void 0===a.height&&(a.height=a.scrollbarHeight);this.chartScrollbar=a},removeChartScrollbar:function(){AmCharts.callMethod("destroy",[this.chartScrollbar]);this.chartScrollbar=null},handleReleaseOutside:function(a){AmCharts.AmSerialChart.base.handleReleaseOutside.call(this,a);AmCharts.callMethod("handleReleaseOutside",[this.chartScrollbar])}});AmCharts.Cuboid=AmCharts.Class({construct:function(a,b,c,d,e,g,k,n,l,h,f,m,u,p,s){this.set=a.set();this.container=a;this.h=Math.round(c);this.w=Math.round(b);this.dx=d;this.dy=e;this.colors=g;this.alpha=k;this.bwidth=n;this.bcolor=l;this.balpha=h;this.colors=g;this.dashLength=p;this.pattern=s;u?0>b&&0===f&&(f=180):0>c&&270==f&&(f=90);this.gradientRotation=f;0===d&&0===e&&(this.cornerRadius=m);this.draw()},draw:function(){var a=this.set;a.clear();var b=this.container,c=this.w,d=this.h,e=this.dx,g=
26
- this.dy,k=this.colors,n=this.alpha,l=this.bwidth,h=this.bcolor,f=this.balpha,m=this.gradientRotation,u=this.cornerRadius,p=this.dashLength,s=this.pattern,y=k,w=k;"object"==typeof k&&(y=k[0],w=k[k.length-1]);var r,q,t,v,z,B,A,x,C;if(0<e||0<g)A=w,w=AmCharts.adjustLuminosity(y,-0.2),w=AmCharts.adjustLuminosity(y,-0.2),r=AmCharts.polygon(b,[0,e,c+e,c,0],[0,g,g,0,0],w,n,1,h,0,m),0<f&&(C=AmCharts.line(b,[0,e,c+e],[0,g,g],h,f,l,p)),q=AmCharts.polygon(b,[0,0,c,c,0],[0,d,d,0,0],w,n,1,h,0,m),q.translate(e,
27
- g),0<f&&(t=AmCharts.line(b,[e,e],[g,g+d],h,1,l,p)),v=AmCharts.polygon(b,[0,0,e,e,0],[0,d,d+g,g,0],w,n,1,h,0,m),z=AmCharts.polygon(b,[c,c,c+e,c+e,c],[0,d,d+g,g,0],w,n,1,h,0,m),0<f&&(B=AmCharts.line(b,[c,c+e,c+e,c],[0,g,d+g,d],h,f,l,p)),w=AmCharts.adjustLuminosity(A,0.2),A=AmCharts.polygon(b,[0,e,c+e,c,0],[d,d+g,d+g,d,d],w,n,1,h,0,m),0<f&&(x=AmCharts.line(b,[0,e,c+e],[d,d+g,d+g],h,f,l,p));1>Math.abs(d)&&(d=0);1>Math.abs(c)&&(c=0);b=0===d?AmCharts.line(b,[0,c],[0,0],h,f,l,p):0===c?AmCharts.line(b,[0,
28
- 0],[0,d],h,f,l,p):0<u?AmCharts.rect(b,c,d,k,n,l,h,f,u,m,p):AmCharts.polygon(b,[0,0,c,c,0],[0,d,d,0,0],k,n,l,h,f,m,!1,p);d=0>d?[r,C,q,t,v,z,B,A,x,b]:[A,x,q,t,v,z,r,C,B,b];for(r=0;r<d.length;r++)(q=d[r])&&a.push(q);s&&b.pattern(s)},width:function(a){this.w=a;this.draw()},height:function(a){this.h=a;this.draw()},animateHeight:function(a,b){var c=this;c.easing=b;c.totalFrames=1E3*a/AmCharts.updateRate;c.rh=c.h;c.frame=0;c.height(1);setTimeout(function(){c.updateHeight.call(c)},AmCharts.updateRate)},updateHeight:function(){var a=
29
- this;a.frame++;var b=a.totalFrames;a.frame<=b&&(b=a.easing(0,a.frame,1,a.rh-1,b),a.height(b),setTimeout(function(){a.updateHeight.call(a)},AmCharts.updateRate))},animateWidth:function(a,b){var c=this;c.easing=b;c.totalFrames=1E3*a/AmCharts.updateRate;c.rw=c.w;c.frame=0;c.width(1);setTimeout(function(){c.updateWidth.call(c)},AmCharts.updateRate)},updateWidth:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b&&(b=a.easing(0,a.frame,1,a.rw-1,b),a.width(b),setTimeout(function(){a.updateWidth.call(a)},
30
- AmCharts.updateRate))}});AmCharts.CategoryAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(a){AmCharts.CategoryAxis.base.construct.call(this,a);this.minPeriod="DD";this.equalSpacing=this.parseDates=!1;this.position="bottom";this.startOnAxis=!1;this.firstDayOfWeek=1;this.gridPosition="middle";this.markPeriodChange=this.boldPeriodBeginning=!0;this.safeDistance=30;this.centerLabelOnFullPeriod=!0;this.periods=[{period:"ss",count:1},{period:"ss",count:5},{period:"ss",count:10},{period:"ss",count:30},{period:"mm",
31
- count:1},{period:"mm",count:5},{period:"mm",count:10},{period:"mm",count:30},{period:"hh",count:1},{period:"hh",count:3},{period:"hh",count:6},{period:"hh",count:12},{period:"DD",count:1},{period:"DD",count:2},{period:"DD",count:3},{period:"DD",count:4},{period:"DD",count:5},{period:"WW",count:1},{period:"MM",count:1},{period:"MM",count:2},{period:"MM",count:3},{period:"MM",count:6},{period:"YYYY",count:1},{period:"YYYY",count:2},{period:"YYYY",count:5},{period:"YYYY",count:10},{period:"YYYY",count:50},
32
- {period:"YYYY",count:100}];this.dateFormats=[{period:"fff",format:"JJ:NN:SS"},{period:"ss",format:"JJ:NN:SS"},{period:"mm",format:"JJ:NN"},{period:"hh",format:"JJ:NN"},{period:"DD",format:"MMM DD"},{period:"WW",format:"MMM DD"},{period:"MM",format:"MMM"},{period:"YYYY",format:"YYYY"}];this.nextPeriod={};this.nextPeriod.fff="ss";this.nextPeriod.ss="mm";this.nextPeriod.mm="hh";this.nextPeriod.hh="DD";this.nextPeriod.DD="MM";this.nextPeriod.MM="YYYY";AmCharts.applyTheme(this,a,"CategoryAxis")},draw:function(){AmCharts.CategoryAxis.base.draw.call(this);
33
- this.generateDFObject();var a=this.chart.chartData;this.data=a;if(AmCharts.ifArray(a)){var b,c=this.chart,d=this.start,e=this.labelFrequency,g=0;b=this.end-d+1;var k=this.gridCount,n=this.showFirstLabel,l=this.showLastLabel,h,f="",m=AmCharts.extractPeriod(this.minPeriod);h=AmCharts.getPeriodDuration(m.period,m.count);var u,p,s,y,w;u=this.rotate;var r=this.firstDayOfWeek,q=this.boldPeriodBeginning,a=AmCharts.resetDateToMin(new Date(a[a.length-1].time+1.05*h),this.minPeriod,1,r).getTime(),t;this.endTime>
34
- a&&(this.endTime=a);t=this.minorGridEnabled;var v,a=this.gridAlpha,z;if(this.parseDates&&!this.equalSpacing){this.timeDifference=this.endTime-this.startTime;d=this.choosePeriod(0);e=d.period;u=d.count;p=AmCharts.getPeriodDuration(e,u);p<h&&(e=m.period,u=m.count,p=h);s=e;"WW"==s&&(s="DD");this.stepWidth=this.getStepWidth(this.timeDifference);var k=Math.ceil(this.timeDifference/p)+5,B=f=AmCharts.resetDateToMin(new Date(this.startTime-p),e,u,r).getTime();s==e&&1==u&&this.centerLabelOnFullPeriod&&(y=
35
- p*this.stepWidth);this.cellWidth=h*this.stepWidth;b=Math.round(f/p);d=-1;b/2==Math.round(b/2)&&(d=-2,f-=p);var A=c.firstTime,x=0;t&&1<u&&(v=this.chooseMinorFrequency(u),z=AmCharts.getPeriodDuration(e,v));if(0<this.gridCount)for(b=d;b<=k;b++){m=A+p*(b+Math.floor((B-A)/p))-x;"DD"==e&&(m+=36E5);m=AmCharts.resetDateToMin(new Date(m),e,u,r).getTime();"MM"==e&&(t=(m-f)/p,1.5<=(m-f)/p&&(m-=(t-1)*p,x+=p));h=(m-this.startTime)*this.stepWidth;w=!1;this.nextPeriod[s]&&(w=this.checkPeriodChange(this.nextPeriod[s],
36
- 1,m,f));t=!1;w&&this.markPeriodChange?(f=this.dateFormatsObject[this.nextPeriod[s]],t=!0):f=this.dateFormatsObject[s];q||(t=!1);f=AmCharts.formatDate(new Date(m),f);if(b==d&&!n||b==k&&!l)f=" ";this.labelFunction&&(f=this.labelFunction(f,new Date(m),this));f=new this.axisItemRenderer(this,h,f,!1,y,0,!1,t);this.pushAxisItem(f);f=m;if(!isNaN(v))for(h=1;h<u;h+=v)this.gridAlpha=this.minorGridAlpha,t=m+z*h,t=AmCharts.resetDateToMin(new Date(t),e,v,r).getTime(),t=new this.axisItemRenderer(this,(t-this.startTime)*
37
- this.stepWidth),this.pushAxisItem(t);this.gridAlpha=a}}else if(!this.parseDates){if(this.cellWidth=this.getStepWidth(b),b<k&&(k=b),g+=this.start,this.stepWidth=this.getStepWidth(b),0<k)for(q=Math.floor(b/k),v=this.chooseMinorFrequency(q),h=g,h/2==Math.round(h/2)&&h--,0>h&&(h=0),k=0,b=h;b<=this.end+2;b++){r=!1;0<=b&&b<this.data.length?(s=this.data[b],f=s.category,r=s.forceShow):f="";if(t&&!isNaN(v))if(b/v==Math.round(b/v)||r)b/q==Math.round(b/q)||r||(this.gridAlpha=this.minorGridAlpha,f=void 0);else continue;
38
- else if(b/q!=Math.round(b/q)&&!r)continue;h=this.getCoordinate(b-g);r=0;"start"==this.gridPosition&&(h-=this.cellWidth/2,r=this.cellWidth/2);if(b==d&&!n||b==this.end&&!l)f=void 0;Math.round(k/e)!=k/e&&(f=void 0);k++;B=this.cellWidth;u&&(B=NaN);this.labelFunction&&s&&(f=this.labelFunction(f,s,this));f=AmCharts.fixBrakes(f);f=new this.axisItemRenderer(this,h,f,!0,B,r,void 0,!1,r);this.pushAxisItem(f);this.gridAlpha=a}}else if(this.parseDates&&this.equalSpacing){g=this.start;this.startTime=this.data[this.start].time;
39
- this.endTime=this.data[this.end].time;this.timeDifference=this.endTime-this.startTime;d=this.choosePeriod(0);e=d.period;u=d.count;p=AmCharts.getPeriodDuration(e,u);p<h&&(e=m.period,u=m.count,p=h);s=e;"WW"==s&&(s="DD");this.stepWidth=this.getStepWidth(b);k=Math.ceil(this.timeDifference/p)+1;f=AmCharts.resetDateToMin(new Date(this.startTime-p),e,u,r).getTime();this.cellWidth=this.getStepWidth(b);b=Math.round(f/p);d=-1;b/2==Math.round(b/2)&&(d=-2,f-=p);h=this.start;h/2==Math.round(h/2)&&h--;0>h&&(h=
40
- 0);y=this.end+2;y>=this.data.length&&(y=this.data.length);z=!1;z=!n;this.previousPos=-1E3;20<this.labelRotation&&(this.safeDistance=5);p=h;if(this.data[h].time!=AmCharts.resetDateToMin(new Date(this.data[h].time),e,u,r).getTime())for(r=0,A=f,b=h;b<y;b++)m=this.data[b].time,this.checkPeriodChange(e,u,m,A)&&(r++,2<=r&&(p=b,b=y),A=m);t&&1<u&&(v=this.chooseMinorFrequency(u),AmCharts.getPeriodDuration(e,v));for(b=h;b<y;b++)if(m=this.data[b].time,this.checkPeriodChange(e,u,m,f)&&b>=p){h=this.getCoordinate(b-
41
- this.start);w=!1;this.nextPeriod[s]&&(w=this.checkPeriodChange(this.nextPeriod[s],1,m,f));t=!1;w&&this.markPeriodChange?(f=this.dateFormatsObject[this.nextPeriod[s]],t=!0):f=this.dateFormatsObject[s];f=AmCharts.formatDate(new Date(m),f);if(b==d&&!n||b==k&&!l)f=" ";z?z=!1:(q||(t=!1),h-this.previousPos>this.safeDistance*Math.cos(this.labelRotation*Math.PI/180)&&(this.labelFunction&&(f=this.labelFunction(f,new Date(m),this)),f=new this.axisItemRenderer(this,h,f,void 0,void 0,void 0,void 0,t),r=f.graphics(),
42
- this.pushAxisItem(f),r=r.getBBox().width,AmCharts.isModern||(r-=h),this.previousPos=h+r));f=m}else isNaN(v)||(this.checkPeriodChange(e,v,m,B)&&(this.gridAlpha=this.minorGridAlpha,h=this.getCoordinate(b-this.start),t=new this.axisItemRenderer(this,h),this.pushAxisItem(t),B=m),this.gridAlpha=a)}for(b=0;b<this.data.length;b++)if(n=this.data[b])l=this.parseDates&&!this.equalSpacing?Math.round((n.time-this.startTime)*this.stepWidth+this.cellWidth/2):this.getCoordinate(b-g),n.x[this.id]=l;n=this.guides.length;
43
- for(b=0;b<n;b++)l=this.guides[b],q=q=q=a=d=NaN,v=l.above,l.toCategory&&(q=c.getCategoryIndexByValue(l.toCategory),isNaN(q)||(d=this.getCoordinate(q-g),f=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(f,v))),l.category&&(q=c.getCategoryIndexByValue(l.category),isNaN(q)||(a=this.getCoordinate(q-g),q=(d-a)/2,f=new this.axisItemRenderer(this,a,l.label,!0,NaN,q,l),this.pushAxisItem(f,v))),l.toDate&&(this.equalSpacing?(q=c.getClosestIndex(this.data,"time",l.toDate.getTime(),!1,0,this.data.length-
44
- 1),isNaN(q)||(d=this.getCoordinate(q-g))):d=(l.toDate.getTime()-this.startTime)*this.stepWidth,f=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(f,v)),l.date&&(this.equalSpacing?(q=c.getClosestIndex(this.data,"time",l.date.getTime(),!1,0,this.data.length-1),isNaN(q)||(a=this.getCoordinate(q-g))):a=(l.date.getTime()-this.startTime)*this.stepWidth,q=(d-a)/2,f="H"==this.orientation?new this.axisItemRenderer(this,a,l.label,!1,2*q,NaN,l):new this.axisItemRenderer(this,a,l.label,!1,
45
- NaN,q,l),this.pushAxisItem(f,v)),d=new this.guideFillRenderer(this,a,d,l),a=d.graphics(),this.pushAxisItem(d,v),l.graphics=a,a.index=b,l.balloonText&&this.addEventListeners(a,l)}this.axisCreated=!0;c=this.x;g=this.y;this.set.translate(c,g);this.labelsSet.translate(c,g);this.positionTitle();(c=this.axisLine.set)&&c.toFront()},chooseMinorFrequency:function(a){for(var b=10;0<b;b--)if(a/b==Math.round(a/b))return a/b},choosePeriod:function(a){var b=AmCharts.getPeriodDuration(this.periods[a].period,this.periods[a].count),
46
- c=Math.ceil(this.timeDifference/b),d=this.periods;return this.timeDifference<b&&0<a?d[a-1]:c<=this.gridCount?d[a]:a+1<d.length?this.choosePeriod(a+1):d[a]},getStepWidth:function(a){var b;this.startOnAxis?(b=this.axisWidth/(a-1),1==a&&(b=this.axisWidth)):b=this.axisWidth/a;return b},getCoordinate:function(a){a*=this.stepWidth;this.startOnAxis||(a+=this.stepWidth/2);return Math.round(a)},timeZoom:function(a,b){this.startTime=a;this.endTime=b},minDuration:function(){var a=AmCharts.extractPeriod(this.minPeriod);
47
- return AmCharts.getPeriodDuration(a.period,a.count)},checkPeriodChange:function(a,b,c,d){c=new Date(c);var e=new Date(d),g=this.firstDayOfWeek;d=b;"DD"==a&&(b=1);c=AmCharts.resetDateToMin(c,a,b,g).getTime();b=AmCharts.resetDateToMin(e,a,b,g).getTime();return"DD"==a&&c-b<=AmCharts.getPeriodDuration(a,d)?!1:c!=b?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var a;for(a=0;a<this.dateFormats.length;a++){var b=this.dateFormats[a];this.dateFormatsObject[b.period]=b.format}},xToIndex:function(a){var b=
48
- this.data,c=this.chart,d=c.rotate,e=this.stepWidth;this.parseDates&&!this.equalSpacing?(a=this.startTime+Math.round(a/e)-this.minDuration()/2,c=c.getClosestIndex(b,"time",a,!1,this.start,this.end+1)):(this.startOnAxis||(a-=e/2),c=this.start+Math.round(a/e));var c=AmCharts.fitToBounds(c,0,b.length-1),g;b[c]&&(g=b[c].x[this.id]);d?g>this.height+1&&c--:g>this.width+1&&c--;0>g&&c++;return c=AmCharts.fitToBounds(c,0,b.length-1)},dateToCoordinate:function(a){return this.parseDates&&!this.equalSpacing?(a.getTime()-
49
- this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?(a=this.chart.getClosestIndex(this.data,"time",a.getTime(),!1,0,this.data.length-1),this.getCoordinate(a-this.start)):NaN},categoryToCoordinate:function(a){return this.chart?(a=this.chart.getCategoryIndexByValue(a),this.getCoordinate(a-this.start)):NaN},coordinateToDate:function(a){return this.equalSpacing?(a=this.xToIndex(a),new Date(this.data[a].time)):new Date(this.startTime+a/this.stepWidth)}});
1
+ AmCharts.AmSerialChart=AmCharts.Class({inherits:AmCharts.AmRectangularChart,construct:function(a){this.type="serial";AmCharts.AmSerialChart.base.construct.call(this,a);this.cname="AmSerialChart";this.theme=a;this.createEvents("changed");this.columnSpacing=5;this.columnSpacing3D=0;this.columnWidth=0.8;this.updateScrollbar=!0;var b=new AmCharts.CategoryAxis(a);b.chart=this;this.categoryAxis=b;this.zoomOutOnDataUpdate=!0;this.mouseWheelScrollEnabled=this.rotate=this.skipZoom=!1;this.minSelectedTime=
2
+ 0;AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmSerialChart.base.initChart.call(this);this.updateCategoryAxis(this.categoryAxis,this.rotate,"categoryAxis");this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);var a=this.chartCursor;a&&(a.updateData(),a.fullWidth&&(a.fullRectSet=this.cursorLineSet));var a=this.countColumns(),b=this.graphs,c;for(c=0;c<b.length;c++)b[c].columnCount=a;this.updateScrollbar=!0;this.drawChart();this.autoMargins&&
3
+ !this.marginsUpdated&&(this.marginsUpdated=!0,this.measureMargins());this.mouseWheelScrollEnabled&&this.addMouseWheel()},handleWheelReal:function(a,b){if(!this.wheelBusy){var c=this.categoryAxis,d=c.parseDates,c=c.minDuration(),e=1;b&&(e=-1);0>a?d?this.endTime<this.lastTime&&this.zoomToDates(new Date(this.startTime+e*c),new Date(this.endTime+1*c)):this.end<this.chartData.length-1&&this.zoomToIndexes(this.start+e,this.end+1):d?this.startTime>this.firstTime&&this.zoomToDates(new Date(this.startTime-
4
+ e*c),new Date(this.endTime-1*c)):0<this.start&&this.zoomToIndexes(this.start-e,this.end-1)}},validateData:function(a){this.marginsUpdated=!1;this.zoomOutOnDataUpdate&&!a&&(this.endTime=this.end=this.startTime=this.start=NaN);AmCharts.AmSerialChart.base.validateData.call(this)},drawChart:function(){AmCharts.AmSerialChart.base.drawChart.call(this);var a=this.chartData;if(AmCharts.ifArray(a)){var b=this.chartScrollbar;b&&b.draw();if(0<this.realWidth&&0<this.realHeight){var a=a.length-1,c,b=this.categoryAxis;
5
+ if(b.parseDates&&!b.equalSpacing){if(b=this.startTime,c=this.endTime,isNaN(b)||isNaN(c))b=this.firstTime,c=this.lastTime}else if(b=this.start,c=this.end,isNaN(b)||isNaN(c))b=0,c=a;this.endTime=this.startTime=this.end=this.start=void 0;this.zoom(b,c)}}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,this.graphs,this.categoryAxis,this.chartScrollbar,this.chartCursor])},updateCategoryAxis:function(a,b,c){a.chart=this;a.id=
6
+ c;a.rotate=b;a.axisRenderer=AmCharts.RecAxis;a.guideFillRenderer=AmCharts.RecFill;a.axisItemRenderer=AmCharts.RecItem;a.setOrientation(!this.rotate);a.x=this.marginLeftReal;a.y=this.marginTopReal;a.dx=this.dx;a.dy=this.dy;a.width=this.plotAreaWidth-1;a.height=this.plotAreaHeight-1;a.viW=this.plotAreaWidth-1;a.viH=this.plotAreaHeight-1;a.viX=this.marginLeftReal;a.viY=this.marginTopReal;a.marginsChanged=!0},updateValueAxes:function(){AmCharts.AmSerialChart.base.updateValueAxes.call(this);var a=this.valueAxes,
7
+ b;for(b=0;b<a.length;b++){var c=a[b],d=this.rotate;c.rotate=d;c.setOrientation(d);d=this.categoryAxis;if(!d.startOnAxis||d.parseDates)c.expandMinMax=!0}},updateData:function(){this.parseData();var a=this.graphs,b,c=this.chartData;for(b=0;b<a.length;b++)a[b].data=c;0<c.length&&(this.firstTime=this.getStartTime(c[0].time),this.lastTime=this.getEndTime(c[c.length-1].time))},getStartTime:function(a){var b=this.categoryAxis;return AmCharts.resetDateToMin(new Date(a),b.minPeriod,1,b.firstDayOfWeek).getTime()},
8
+ getEndTime:function(a){var b=AmCharts.extractPeriod(this.categoryAxis.minPeriod);return AmCharts.changeDate(new Date(a),b.period,b.count,!0).getTime()-1},updateMargins:function(){AmCharts.AmSerialChart.base.updateMargins.call(this);var a=this.chartScrollbar;a&&(this.getScrollbarPosition(a,this.rotate,this.categoryAxis.position),this.adjustMargins(a,this.rotate))},updateScrollbars:function(){AmCharts.AmSerialChart.base.updateScrollbars.call(this);this.updateChartScrollbar(this.chartScrollbar,this.rotate)},
9
+ zoom:function(a,b){var c=this.categoryAxis;c.parseDates&&!c.equalSpacing?this.timeZoom(a,b):this.indexZoom(a,b);this.updateLegendValues()},timeZoom:function(a,b){var c=this.maxSelectedTime;isNaN(c)||(b!=this.endTime&&b-a>c&&(a=b-c,this.updateScrollbar=!0),a!=this.startTime&&b-a>c&&(b=a+c,this.updateScrollbar=!0));var d=this.minSelectedTime;if(0<d&&b-a<d){var e=Math.round(a+(b-a)/2),d=Math.round(d/2);a=e-d;b=e+d}var f=this.chartData,e=this.categoryAxis;if(AmCharts.ifArray(f)&&(a!=this.startTime||b!=
10
+ this.endTime)){var k=e.minDuration(),d=this.firstTime,n=this.lastTime;a||(a=d,isNaN(c)||(a=n-c));b||(b=n);a>n&&(a=n);b<d&&(b=d);a<d&&(a=d);b>n&&(b=n);b<a&&(b=a+k);b-a<k/5&&(b<n?b=a+k/5:a=b-k/5);this.startTime=a;this.endTime=b;c=f.length-1;k=this.getClosestIndex(f,"time",a,!0,0,c);f=this.getClosestIndex(f,"time",b,!1,k,c);e.timeZoom(a,b);e.zoom(k,f);this.start=AmCharts.fitToBounds(k,0,c);this.end=AmCharts.fitToBounds(f,0,c);this.zoomAxesAndGraphs();this.zoomScrollbar();a!=d||b!=n?this.showZB(!0):this.showZB(!1);
11
+ this.updateColumnsDepth();this.dispatchTimeZoomEvent()}},indexZoom:function(a,b){var c=this.maxSelectedSeries;isNaN(c)||(b!=this.end&&b-a>c&&(a=b-c,this.updateScrollbar=!0),a!=this.start&&b-a>c&&(b=a+c,this.updateScrollbar=!0));if(a!=this.start||b!=this.end){var d=this.chartData.length-1;isNaN(a)&&(a=0,isNaN(c)||(a=d-c));isNaN(b)&&(b=d);b<a&&(b=a);b>d&&(b=d);a>d&&(a=d-1);0>a&&(a=0);this.start=a;this.end=b;this.categoryAxis.zoom(a,b);this.zoomAxesAndGraphs();this.zoomScrollbar();0!==a||b!=this.chartData.length-
12
+ 1?this.showZB(!0):this.showZB(!1);this.updateColumnsDepth();this.dispatchIndexZoomEvent()}},updateGraphs:function(){AmCharts.AmSerialChart.base.updateGraphs.call(this);var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.columnWidthReal=this.columnWidth;c.categoryAxis=this.categoryAxis;AmCharts.isString(c.fillToGraph)&&(c.fillToGraph=this.getGraphById(c.fillToGraph))}},updateColumnsDepth:function(){var a,b=this.graphs,c;AmCharts.remove(this.columnsSet);this.columnsArray=[];for(a=0;a<b.length;a++){c=
13
+ b[a];var d=c.columnsArray;if(d){var e;for(e=0;e<d.length;e++)this.columnsArray.push(d[e])}}this.columnsArray.sort(this.compareDepth);if(0<this.columnsArray.length){b=this.container.set();this.columnSet.push(b);for(a=0;a<this.columnsArray.length;a++)b.push(this.columnsArray[a].column.set);c&&b.translate(c.x,c.y);this.columnsSet=b}},compareDepth:function(a,b){return a.depth>b.depth?1:-1},zoomScrollbar:function(){var a=this.chartScrollbar,b=this.categoryAxis;a&&this.updateScrollbar&&(b.parseDates&&!b.equalSpacing?
14
+ a.timeZoom(this.startTime,this.endTime):a.zoom(this.start,this.end),this.updateScrollbar=!0)},updateTrendLines:function(){var a=this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.TrendLine,this.theme);a[b]=c;c.chart=this;AmCharts.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.categoryAxis=this.categoryAxis}},zoomAxesAndGraphs:function(){if(!this.scrollbarOnly){var a=this.valueAxes,b;for(b=
15
+ 0;b<a.length;b++)a[b].zoom(this.start,this.end);a=this.graphs;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);this.zoomTrendLines();(b=this.chartCursor)&&b.zoom(this.start,this.end,this.startTime,this.endTime)}},countColumns:function(){var a=0,b=this.valueAxes.length,c=this.graphs.length,d,e,f=!1,k,n;for(n=0;n<b;n++){e=this.valueAxes[n];var l=e.stackType;if("100%"==l||"regular"==l)for(f=!1,k=0;k<c;k++)d=this.graphs[k],d.hidden||d.valueAxis!=e||"column"!=d.type||(!f&&d.stackable&&(a++,f=!0),
16
+ (!d.stackable&&d.clustered||d.newStack)&&a++,d.columnIndex=a-1,d.clustered||(d.columnIndex=0));if("none"==l||"3d"==l)for(k=0;k<c;k++)d=this.graphs[k],!d.hidden&&d.valueAxis==e&&"column"==d.type&&d.clustered&&(d.columnIndex=a,a++);if("3d"==l){for(n=0;n<c;n++)d=this.graphs[n],d.depthCount=a;a=1}}return a},parseData:function(){AmCharts.AmSerialChart.base.parseData.call(this);this.parseSerialData()},getCategoryIndexByValue:function(a){var b=this.chartData,c,d;for(d=0;d<b.length;d++)b[d].category==a&&
17
+ (c=d);return c},handleCursorChange:function(a){this.updateLegendValues(a.index)},handleCursorZoom:function(a){this.updateScrollbar=!0;this.zoom(a.start,a.end)},handleScrollbarZoom:function(a){this.updateScrollbar=!1;this.zoom(a.start,a.end)},dispatchTimeZoomEvent:function(){if(this.prevStartTime!=this.startTime||this.prevEndTime!=this.endTime){var a={type:"zoomed"};a.startDate=new Date(this.startTime);a.endDate=new Date(this.endTime);a.startIndex=this.start;a.endIndex=this.end;this.startIndex=this.start;
18
+ this.endIndex=this.end;this.startDate=a.startDate;this.endDate=a.endDate;this.prevStartTime=this.startTime;this.prevEndTime=this.endTime;var b=this.categoryAxis,c=AmCharts.extractPeriod(b.minPeriod).period,b=b.dateFormatsObject[c];a.startValue=AmCharts.formatDate(a.startDate,b);a.endValue=AmCharts.formatDate(a.endDate,b);a.chart=this;a.target=this;this.fire(a.type,a)}},dispatchIndexZoomEvent:function(){if(this.prevStartIndex!=this.start||this.prevEndIndex!=this.end){this.startIndex=this.start;this.endIndex=
19
+ this.end;var a=this.chartData;if(AmCharts.ifArray(a)&&!isNaN(this.start)&&!isNaN(this.end)){var b={chart:this,target:this,type:"zoomed"};b.startIndex=this.start;b.endIndex=this.end;b.startValue=a[this.start].category;b.endValue=a[this.end].category;this.categoryAxis.parseDates&&(this.startTime=a[this.start].time,this.endTime=a[this.end].time,b.startDate=new Date(this.startTime),b.endDate=new Date(this.endTime));this.prevStartIndex=this.start;this.prevEndIndex=this.end;this.fire(b.type,b)}}},updateLegendValues:function(a){var b=
20
+ this.graphs,c;for(c=0;c<b.length;c++){var d=b[c];isNaN(a)?d.currentDataItem=void 0:d.currentDataItem=this.chartData[a].axes[d.valueAxis.id].graphs[d.id]}this.legend&&this.legend.updateValues()},getClosestIndex:function(a,b,c,d,e,f){0>e&&(e=0);f>a.length-1&&(f=a.length-1);var k=e+Math.round((f-e)/2),n=a[k][b];if(1>=f-e){if(d)return e;d=a[f][b];return Math.abs(a[e][b]-c)<Math.abs(d-c)?e:f}return c==n?k:c<n?this.getClosestIndex(a,b,c,d,e,k):this.getClosestIndex(a,b,c,d,k,f)},zoomToIndexes:function(a,
21
+ b){this.updateScrollbar=!0;var c=this.chartData;if(c){var d=c.length;0<d&&(0>a&&(a=0),b>d-1&&(b=d-1),d=this.categoryAxis,d.parseDates&&!d.equalSpacing?this.zoom(c[a].time,this.getEndTime(c[b].time)):this.zoom(a,b))}},zoomToDates:function(a,b){this.updateScrollbar=!0;var c=this.chartData;if(this.categoryAxis.equalSpacing){var d=this.getClosestIndex(c,"time",a.getTime(),!0,0,c.length);b=AmCharts.resetDateToMin(b,this.categoryAxis.minPeriod,1);c=this.getClosestIndex(c,"time",b.getTime(),!1,0,c.length);
22
+ this.zoom(d,c)}else this.zoom(a.getTime(),b.getTime())},zoomToCategoryValues:function(a,b){this.updateScrollbar=!0;this.zoom(this.getCategoryIndexByValue(a),this.getCategoryIndexByValue(b))},formatPeriodString:function(a,b){if(b){var c=["value","open","low","high","close"],d="value open low high close average sum count".split(" "),e=b.valueAxis,f=this.chartData,k=b.numberFormatter;k||(k=this.nf);for(var n=0;n<c.length;n++){for(var l=c[n],h=0,g=0,m,u,q,s,p,v=0,A=0,y,r,t,w,B,C=this.start;C<=this.end;C++){var x=
23
+ f[C];if(x&&(x=x.axes[e.id].graphs[b.id])){if(x.values){var z=x.values[l];if(!isNaN(z)){isNaN(m)&&(m=z);u=z;if(isNaN(q)||q>z)q=z;if(isNaN(s)||s<z)s=z;p=AmCharts.getDecimals(h);var D=AmCharts.getDecimals(z),h=h+z,h=AmCharts.roundTo(h,Math.max(p,D));g++;p=h/g}}if(x.percents&&(x=x.percents[l],!isNaN(x))){isNaN(y)&&(y=x);r=x;if(isNaN(t)||t>x)t=x;if(isNaN(w)||w<x)w=x;B=AmCharts.getDecimals(v);z=AmCharts.getDecimals(x);v+=x;v=AmCharts.roundTo(v,Math.max(B,z));A++;B=v/A}}}v={open:y,close:r,high:w,low:t,average:B,
24
+ sum:v,count:A};a=AmCharts.formatValue(a,{open:m,close:u,high:s,low:q,average:p,sum:h,count:g},d,k,l+"\\.",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=AmCharts.formatValue(a,v,d,this.pf,"percents\\."+l+"\\.")}}return a},formatString:function(a,b,c){var d=b.graph;if(-1!=a.indexOf("[[category]]")){var e=b.serialDataItem.category;if(this.categoryAxis.parseDates){var f=this.balloonDateFormat,k=this.chartCursor;k&&(f=k.categoryBalloonDateFormat);-1!=a.indexOf("[[category]]")&&
25
+ (f=AmCharts.formatDate(e,f),-1!=f.indexOf("fff")&&(f=AmCharts.formatMilliseconds(f,e)),e=f)}a=a.replace(/\[\[category\]\]/g,String(e))}d=d.numberFormatter;d||(d=this.nf);e=b.graph.valueAxis;(f=e.duration)&&!isNaN(b.values.value)&&(e=AmCharts.formatDuration(b.values.value,f,"",e.durationUnits,e.maxInterval,d),a=a.replace(RegExp("\\[\\[value\\]\\]","g"),e));e="value open low high close total".split(" ");f=this.pf;a=AmCharts.formatValue(a,b.percents,e,f,"percents\\.");a=AmCharts.formatValue(a,b.values,
26
+ e,d,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=AmCharts.formatValue(a,b.values,["percents"],f);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,b.dataContext));return a=AmCharts.AmSerialChart.base.formatString.call(this,a,b,c)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar]);a&&(a.chart=this,this.listenTo(a,"zoomed",this.handleScrollbarZoom));this.rotate?void 0===a.width&&(a.width=a.scrollbarHeight):void 0===a.height&&(a.height=
27
+ a.scrollbarHeight);this.chartScrollbar=a},removeChartScrollbar:function(){AmCharts.callMethod("destroy",[this.chartScrollbar]);this.chartScrollbar=null},handleReleaseOutside:function(a){AmCharts.AmSerialChart.base.handleReleaseOutside.call(this,a);AmCharts.callMethod("handleReleaseOutside",[this.chartScrollbar])}});AmCharts.Cuboid=AmCharts.Class({construct:function(a,b,c,d,e,f,k,n,l,h,g,m,u,q,s){this.set=a.set();this.container=a;this.h=Math.round(c);this.w=Math.round(b);this.dx=d;this.dy=e;this.colors=f;this.alpha=k;this.bwidth=n;this.bcolor=l;this.balpha=h;this.colors=f;this.dashLength=q;this.pattern=s;u?0>b&&0===g&&(g=180):0>c&&270==g&&(g=90);this.gradientRotation=g;0===d&&0===e&&(this.cornerRadius=m);this.draw()},draw:function(){var a=this.set;a.clear();var b=this.container,c=this.w,d=this.h,e=this.dx,f=
28
+ this.dy,k=this.colors,n=this.alpha,l=this.bwidth,h=this.bcolor,g=this.balpha,m=this.gradientRotation,u=this.cornerRadius,q=this.dashLength,s=this.pattern,p=k,v=k;"object"==typeof k&&(p=k[0],v=k[k.length-1]);var A,y,r,t,w,B,C,x,z,D=n;s&&(n=0);if(0<e||0<f)C=v,v=AmCharts.adjustLuminosity(p,-0.2),v=AmCharts.adjustLuminosity(p,-0.2),A=AmCharts.polygon(b,[0,e,c+e,c,0],[0,f,f,0,0],v,n,1,h,0,m),0<g&&(z=AmCharts.line(b,[0,e,c+e],[0,f,f],h,g,l,q)),y=AmCharts.polygon(b,[0,0,c,c,0],[0,d,d,0,0],v,n,1,h,0,m),y.translate(e,
29
+ f),0<g&&(r=AmCharts.line(b,[e,e],[f,f+d],h,g,l,q)),t=AmCharts.polygon(b,[0,0,e,e,0],[0,d,d+f,f,0],v,n,1,h,0,m),w=AmCharts.polygon(b,[c,c,c+e,c+e,c],[0,d,d+f,f,0],v,n,1,h,0,m),0<g&&(B=AmCharts.line(b,[c,c+e,c+e,c],[0,f,d+f,d],h,g,l,q)),v=AmCharts.adjustLuminosity(C,0.2),C=AmCharts.polygon(b,[0,e,c+e,c,0],[d,d+f,d+f,d,d],v,n,1,h,0,m),0<g&&(x=AmCharts.line(b,[0,e,c+e],[d,d+f,d+f],h,g,l,q));n=D;1>Math.abs(d)&&(d=0);1>Math.abs(c)&&(c=0);b=0===d?AmCharts.line(b,[0,c],[0,0],h,g,l,q):0===c?AmCharts.line(b,
30
+ [0,0],[0,d],h,g,l,q):0<u?AmCharts.rect(b,c,d,k,n,l,h,g,u,m,q):AmCharts.polygon(b,[0,0,c,c,0],[0,d,d,0,0],k,n,l,h,g,m,!1,q);d=0>d?[A,z,y,r,t,w,B,C,x,b]:[C,x,y,r,t,w,A,z,B,b];for(A=0;A<d.length;A++)(y=d[A])&&a.push(y);s&&b.pattern(s)},width:function(a){this.w=a;this.draw()},height:function(a){this.h=a;this.draw()},animateHeight:function(a,b){var c=this;c.easing=b;c.totalFrames=1E3*a/AmCharts.updateRate;c.rh=c.h;c.frame=0;c.height(1);setTimeout(function(){c.updateHeight.call(c)},AmCharts.updateRate)},
31
+ updateHeight:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b&&(b=a.easing(0,a.frame,1,a.rh-1,b),a.height(b),setTimeout(function(){a.updateHeight.call(a)},AmCharts.updateRate))},animateWidth:function(a,b){var c=this;c.easing=b;c.totalFrames=1E3*a/AmCharts.updateRate;c.rw=c.w;c.frame=0;c.width(1);setTimeout(function(){c.updateWidth.call(c)},AmCharts.updateRate)},updateWidth:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b&&(b=a.easing(0,a.frame,1,a.rw-1,b),a.width(b),setTimeout(function(){a.updateWidth.call(a)},
32
+ AmCharts.updateRate))}});AmCharts.CategoryAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(a){this.cname="CategoryAxis";AmCharts.CategoryAxis.base.construct.call(this,a);this.minPeriod="DD";this.equalSpacing=this.parseDates=!1;this.position="bottom";this.startOnAxis=!1;this.firstDayOfWeek=1;this.gridPosition="middle";this.markPeriodChange=this.boldPeriodBeginning=!0;this.safeDistance=30;this.centerLabelOnFullPeriod=!0;this.periods=[{period:"ss",count:1},{period:"ss",count:5},{period:"ss",count:10},{period:"ss",
33
+ count:30},{period:"mm",count:1},{period:"mm",count:5},{period:"mm",count:10},{period:"mm",count:30},{period:"hh",count:1},{period:"hh",count:3},{period:"hh",count:6},{period:"hh",count:12},{period:"DD",count:1},{period:"DD",count:2},{period:"DD",count:3},{period:"DD",count:4},{period:"DD",count:5},{period:"WW",count:1},{period:"MM",count:1},{period:"MM",count:2},{period:"MM",count:3},{period:"MM",count:6},{period:"YYYY",count:1},{period:"YYYY",count:2},{period:"YYYY",count:5},{period:"YYYY",count:10},
34
+ {period:"YYYY",count:50},{period:"YYYY",count:100}];this.dateFormats=[{period:"fff",format:"JJ:NN:SS"},{period:"ss",format:"JJ:NN:SS"},{period:"mm",format:"JJ:NN"},{period:"hh",format:"JJ:NN"},{period:"DD",format:"MMM DD"},{period:"WW",format:"MMM DD"},{period:"MM",format:"MMM"},{period:"YYYY",format:"YYYY"}];this.nextPeriod={};this.nextPeriod.fff="ss";this.nextPeriod.ss="mm";this.nextPeriod.mm="hh";this.nextPeriod.hh="DD";this.nextPeriod.DD="MM";this.nextPeriod.MM="YYYY";AmCharts.applyTheme(this,
35
+ a,this.cname)},draw:function(){AmCharts.CategoryAxis.base.draw.call(this);this.generateDFObject();var a=this.chart.chartData;this.data=a;if(AmCharts.ifArray(a)){var b,c=this.chart,d=this.start,e=this.labelFrequency,f=0;b=this.end-d+1;var k=this.gridCountR,n=this.showFirstLabel,l=this.showLastLabel,h,g="",m=AmCharts.extractPeriod(this.minPeriod);h=AmCharts.getPeriodDuration(m.period,m.count);var u,q,s,p,v,A;u=this.rotate;var y=this.firstDayOfWeek,r=this.boldPeriodBeginning,a=AmCharts.resetDateToMin(new Date(a[a.length-
36
+ 1].time+1.05*h),this.minPeriod,1,y).getTime(),t;this.endTime>a&&(this.endTime=a);t=this.minorGridEnabled;var w,a=this.gridAlpha,B;if(this.parseDates&&!this.equalSpacing){this.timeDifference=this.endTime-this.startTime;d=this.choosePeriod(0);e=d.period;u=d.count;q=AmCharts.getPeriodDuration(e,u);q<h&&(e=m.period,u=m.count,q=h);s=e;"WW"==s&&(s="DD");this.stepWidth=this.getStepWidth(this.timeDifference);var k=Math.ceil(this.timeDifference/q)+5,C=g=AmCharts.resetDateToMin(new Date(this.startTime-q),e,
37
+ u,y).getTime();s==e&&1==u&&this.centerLabelOnFullPeriod&&(v=q*this.stepWidth);this.cellWidth=h*this.stepWidth;b=Math.round(g/q);d=-1;b/2==Math.round(b/2)&&(d=-2,g-=q);var x=c.firstTime,z=0;t&&1<u&&(w=this.chooseMinorFrequency(u),B=AmCharts.getPeriodDuration(e,w));if(0<this.gridCountR)for(b=d;b<=k;b++){m=x+q*(b+Math.floor((C-x)/q))-z;"DD"==e&&(m+=36E5);m=AmCharts.resetDateToMin(new Date(m),e,u,y).getTime();"MM"==e&&(t=(m-g)/q,1.5<=(m-g)/q&&(m=m-(t-1)*q+AmCharts.getPeriodDuration("DD",3),m=AmCharts.resetDateToMin(new Date(m),
38
+ e,1).getTime(),z+=q));h=(m-this.startTime)*this.stepWidth;A=!1;this.nextPeriod[s]&&(A=this.checkPeriodChange(this.nextPeriod[s],1,m,g,s));t=!1;A&&this.markPeriodChange?(g=this.dateFormatsObject[this.nextPeriod[s]],this.twoLineMode&&(g=this.dateFormatsObject[s]+"\n"+g,g=AmCharts.fixBrakes(g)),t=!0):g=this.dateFormatsObject[s];r||(t=!1);g=AmCharts.formatDate(new Date(m),g);if(b==d&&!n||b==k&&!l)g=" ";this.labelFunction&&(g=this.labelFunction(g,new Date(m),this,e,u,p).toString());p=new this.axisItemRenderer(this,
39
+ h,g,!1,v,0,!1,t);this.pushAxisItem(p);p=g=m;if(!isNaN(w))for(h=1;h<u;h+=w)this.gridAlpha=this.minorGridAlpha,t=m+B*h,t=AmCharts.resetDateToMin(new Date(t),e,w,y).getTime(),t=new this.axisItemRenderer(this,(t-this.startTime)*this.stepWidth),this.pushAxisItem(t);this.gridAlpha=a}}else if(!this.parseDates){if(this.cellWidth=this.getStepWidth(b),b<k&&(k=b),f+=this.start,this.stepWidth=this.getStepWidth(b),0<k)for(r=Math.floor(b/k),w=this.chooseMinorFrequency(r),h=f,h/2==Math.round(h/2)&&h--,0>h&&(h=0),
40
+ k=0,this.end-h+1>=this.autoRotateCount&&(this.labelRotation=this.autoRotateAngle),b=h;b<=this.end+2;b++){p=!1;0<=b&&b<this.data.length?(s=this.data[b],g=s.category,p=s.forceShow):g="";if(t&&!isNaN(w))if(b/w==Math.round(b/w)||p)b/r==Math.round(b/r)||p||(this.gridAlpha=this.minorGridAlpha,g=void 0);else continue;else if(b/r!=Math.round(b/r)&&!p)continue;h=this.getCoordinate(b-f);p=0;"start"==this.gridPosition&&(h-=this.cellWidth/2,p=this.cellWidth/2);if(b==d&&!n||b==this.end&&!l)g=void 0;Math.round(k/
41
+ e)!=k/e&&(g=void 0);k++;y=this.cellWidth;u&&(y=NaN);this.labelFunction&&s&&(g=this.labelFunction(g,s,this));g=AmCharts.fixBrakes(g);p=new this.axisItemRenderer(this,h,g,!0,y,p,void 0,!1,p);this.pushAxisItem(p);this.gridAlpha=a}}else if(this.parseDates&&this.equalSpacing){f=this.start;this.startTime=this.data[this.start].time;this.endTime=this.data[this.end].time;this.timeDifference=this.endTime-this.startTime;d=this.choosePeriod(0);e=d.period;u=d.count;q=AmCharts.getPeriodDuration(e,u);q<h&&(e=m.period,
42
+ u=m.count,q=h);s=e;"WW"==s&&(s="DD");this.stepWidth=this.getStepWidth(b);k=Math.ceil(this.timeDifference/q)+1;g=AmCharts.resetDateToMin(new Date(this.startTime-q),e,u,y).getTime();this.cellWidth=this.getStepWidth(b);b=Math.round(g/q);d=-1;b/2==Math.round(b/2)&&(d=-2,g-=q);h=this.start;h/2==Math.round(h/2)&&h--;0>h&&(h=0);v=this.end+2;v>=this.data.length&&(v=this.data.length);B=!1;B=!n;this.previousPos=-1E3;20<this.labelRotation&&(this.safeDistance=5);q=h;if(this.data[h].time!=AmCharts.resetDateToMin(new Date(this.data[h].time),
43
+ e,u,y).getTime())for(y=0,x=g,b=h;b<v;b++)m=this.data[b].time,this.checkPeriodChange(e,u,m,x)&&(y++,2<=y&&(q=b,b=v),x=m);t&&1<u&&(w=this.chooseMinorFrequency(u),AmCharts.getPeriodDuration(e,w));for(b=h;b<v;b++)if(m=this.data[b].time,this.checkPeriodChange(e,u,m,g)&&b>=q){h=this.getCoordinate(b-this.start);A=!1;this.nextPeriod[s]&&(A=this.checkPeriodChange(this.nextPeriod[s],1,m,g,s));t=!1;A&&this.markPeriodChange?(g=this.dateFormatsObject[this.nextPeriod[s]],t=!0):g=this.dateFormatsObject[s];g=AmCharts.formatDate(new Date(m),
44
+ g);if(b==d&&!n||b==k&&!l)g=" ";B?B=!1:(r||(t=!1),h-this.previousPos>this.safeDistance*Math.cos(this.labelRotation*Math.PI/180)&&(this.labelFunction&&(g=this.labelFunction(g,new Date(m),this,e,u,p)),p=new this.axisItemRenderer(this,h,g,void 0,void 0,void 0,void 0,t),y=p.graphics(),this.pushAxisItem(p),p=y.getBBox().width,AmCharts.isModern||(p-=h),this.previousPos=h+p));p=g=m}else isNaN(w)||(this.checkPeriodChange(e,w,m,C)&&(this.gridAlpha=this.minorGridAlpha,h=this.getCoordinate(b-this.start),t=new this.axisItemRenderer(this,
45
+ h),this.pushAxisItem(t),C=m),this.gridAlpha=a)}for(b=0;b<this.data.length;b++)if(n=this.data[b])l=this.parseDates&&!this.equalSpacing?Math.round((n.time-this.startTime)*this.stepWidth+this.cellWidth/2):this.getCoordinate(b-f),n.x[this.id]=l;n=this.guides.length;for(b=0;b<n;b++)l=this.guides[b],r=r=r=a=d=NaN,w=l.above,l.toCategory&&(r=c.getCategoryIndexByValue(l.toCategory),isNaN(r)||(d=this.getCoordinate(r-f),p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(p,w))),l.category&&
46
+ (r=c.getCategoryIndexByValue(l.category),isNaN(r)||(a=this.getCoordinate(r-f),r=(d-a)/2,p=new this.axisItemRenderer(this,a,l.label,!0,NaN,r,l),this.pushAxisItem(p,w))),l.toDate&&(this.equalSpacing?(r=c.getClosestIndex(this.data,"time",l.toDate.getTime(),!1,0,this.data.length-1),isNaN(r)||(d=this.getCoordinate(r-f))):d=(l.toDate.getTime()-this.startTime)*this.stepWidth,p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(p,w)),l.date&&(this.equalSpacing?(r=c.getClosestIndex(this.data,
47
+ "time",l.date.getTime(),!1,0,this.data.length-1),isNaN(r)||(a=this.getCoordinate(r-f))):a=(l.date.getTime()-this.startTime)*this.stepWidth,r=(d-a)/2,p="H"==this.orientation?new this.axisItemRenderer(this,a,l.label,!1,2*r,NaN,l):new this.axisItemRenderer(this,a,l.label,!1,NaN,r,l),this.pushAxisItem(p,w)),d=new this.guideFillRenderer(this,a,d,l),a=d.graphics(),this.pushAxisItem(d,w),l.graphics=a,a.index=b,l.balloonText&&this.addEventListeners(a,l)}this.axisCreated=!0;c=this.x;f=this.y;this.set.translate(c,
48
+ f);this.labelsSet.translate(c,f);this.positionTitle();(c=this.axisLine.set)&&c.toFront();c=this.getBBox().height;2<c-this.previousHeight&&this.autoWrap&&!this.parseDates&&(this.axisCreated=this.chart.marginsUpdated=!1);this.previousHeight=c},chooseMinorFrequency:function(a){for(var b=10;0<b;b--)if(a/b==Math.round(a/b))return a/b},choosePeriod:function(a){var b=AmCharts.getPeriodDuration(this.periods[a].period,this.periods[a].count),c=Math.ceil(this.timeDifference/b),d=this.periods;return this.timeDifference<
49
+ b&&0<a?d[a-1]:c<=this.gridCountR?d[a]:a+1<d.length?this.choosePeriod(a+1):d[a]},getStepWidth:function(a){var b;this.startOnAxis?(b=this.axisWidth/(a-1),1==a&&(b=this.axisWidth)):b=this.axisWidth/a;return b},getCoordinate:function(a){a*=this.stepWidth;this.startOnAxis||(a+=this.stepWidth/2);return Math.round(a)},timeZoom:function(a,b){this.startTime=a;this.endTime=b},minDuration:function(){var a=AmCharts.extractPeriod(this.minPeriod);return AmCharts.getPeriodDuration(a.period,a.count)},checkPeriodChange:function(a,
50
+ b,c,d,e){c=new Date(c);var f=new Date(d),k=this.firstDayOfWeek;d=b;"DD"==a&&(b=1);c=AmCharts.resetDateToMin(c,a,b,k).getTime();b=AmCharts.resetDateToMin(f,a,b,k).getTime();return"DD"==a&&"hh"!=e&&c-b<=AmCharts.getPeriodDuration(a,d)?!1:c!=b?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var a;for(a=0;a<this.dateFormats.length;a++){var b=this.dateFormats[a];this.dateFormatsObject[b.period]=b.format}},xToIndex:function(a){var b=this.data,c=this.chart,d=c.rotate,e=this.stepWidth;this.parseDates&&
51
+ !this.equalSpacing?(a=this.startTime+Math.round(a/e)-this.minDuration()/2,c=c.getClosestIndex(b,"time",a,!1,this.start,this.end+1)):(this.startOnAxis||(a-=e/2),c=this.start+Math.round(a/e));var c=AmCharts.fitToBounds(c,0,b.length-1),f;b[c]&&(f=b[c].x[this.id]);d?f>this.height+1&&c--:f>this.width+1&&c--;0>f&&c++;return c=AmCharts.fitToBounds(c,0,b.length-1)},dateToCoordinate:function(a){return this.parseDates&&!this.equalSpacing?(a.getTime()-this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?
52
+ (a=this.chart.getClosestIndex(this.data,"time",a.getTime(),!1,0,this.data.length-1),this.getCoordinate(a-this.start)):NaN},categoryToCoordinate:function(a){return this.chart?(a=this.chart.getCategoryIndexByValue(a),this.getCoordinate(a-this.start)):NaN},coordinateToDate:function(a){return this.equalSpacing?(a=this.xToIndex(a),new Date(this.data[a].time)):new Date(this.startTime+a/this.stepWidth)}});
@@ -0,0 +1,206 @@
1
+ AmCharts.themes.black = {
2
+
3
+ themeName: "black",
4
+
5
+ AmChart: {
6
+ color: "#e7e7e7"
7
+ },
8
+
9
+ AmCoordinateChart: {
10
+ colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
11
+ },
12
+
13
+ AmStockChart: {
14
+ colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
15
+ },
16
+
17
+ AmSlicedChart: {
18
+ outlineAlpha: 1,
19
+ outlineThickness: 2,
20
+ labelTickColor: "#FFFFFF",
21
+ labelTickAlpha: 0.3,
22
+ colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
23
+ },
24
+
25
+ AmRectangularChart: {
26
+ zoomOutButtonColor: '#FFFFFF',
27
+ zoomOutButtonRollOverAlpha: 0.15,
28
+ zoomOutButtonImage: "lensWhite.png"
29
+ },
30
+
31
+ AxisBase: {
32
+ axisColor: "#FFFFFF",
33
+ axisAlpha: 0.3,
34
+ gridAlpha: 0.1,
35
+ gridColor: "#FFFFFF",
36
+ dashLength: 3
37
+ },
38
+
39
+ ChartScrollbar: {
40
+ backgroundColor: "#000000",
41
+ backgroundAlpha: 0.2,
42
+ graphFillAlpha: 0.2,
43
+ graphLineAlpha: 0,
44
+ graphFillColor: "#FFFFFF",
45
+ selectedGraphFillColor: "#FFFFFF",
46
+ selectedGraphFillAlpha: 0.4,
47
+ selectedGraphLineColor: "#FFFFFF",
48
+ selectedBackgroundColor: "#FFFFFF",
49
+ selectedBackgroundAlpha: 0.09,
50
+ gridAlpha: 0.15
51
+ },
52
+
53
+ ChartCursor: {
54
+ cursorColor: "#FFFFFF",
55
+ color: "#000000",
56
+ cursorAlpha: 0.5
57
+ },
58
+
59
+ AmLegend: {
60
+ color: "#e7e7e7"
61
+ },
62
+
63
+ AmGraph: {
64
+ lineAlpha: 0.9
65
+ },
66
+
67
+
68
+ GaugeArrow: {
69
+ color: "#FFFFFF",
70
+ alpha: 0.8,
71
+ nailAlpha: 0,
72
+ innerRadius: "40%",
73
+ nailRadius: 15,
74
+ startWidth: 15,
75
+ borderAlpha: 0.8,
76
+ nailBorderAlpha: 0
77
+ },
78
+
79
+ GaugeAxis: {
80
+ tickColor: "#FFFFFF",
81
+ tickAlpha: 1,
82
+ tickLength: 15,
83
+ minorTickLength: 8,
84
+ axisThickness: 3,
85
+ axisColor: '#FFFFFF',
86
+ axisAlpha: 1,
87
+ bandAlpha: 0.8
88
+ },
89
+
90
+ TrendLine: {
91
+ lineColor: "#c03246",
92
+ lineAlpha: 0.8
93
+ },
94
+
95
+ // ammap
96
+ AreasSettings: {
97
+ alpha: 0.8,
98
+ color: "#FFFFFF",
99
+ colorSolid: "#000000",
100
+ unlistedAreasAlpha: 0.4,
101
+ unlistedAreasColor: "#FFFFFF",
102
+ outlineColor: "#000000",
103
+ outlineAlpha: 0.5,
104
+ outlineThickness: 0.5,
105
+ rollOverColor: "#3c5bdc",
106
+ rollOverOutlineColor: "#000000",
107
+ selectedOutlineColor: "#000000",
108
+ selectedColor: "#f15135",
109
+ unlistedAreasOutlineColor: "#000000",
110
+ unlistedAreasOutlineAlpha: 0.5
111
+ },
112
+
113
+ LinesSettings: {
114
+ color: "#FFFFFF",
115
+ alpha: 0.8
116
+ },
117
+
118
+ ImagesSettings: {
119
+ alpha: 0.8,
120
+ labelColor: "#FFFFFF",
121
+ color: "#FFFFFF",
122
+ labelRollOverColor: "#3c5bdc"
123
+ },
124
+
125
+ ZoomControl: {
126
+ buttonRollOverColor: "#3c5bdc",
127
+ buttonFillColor: "#738f58",
128
+ buttonBorderColor: "#738f58",
129
+ buttonFillAlpha: 0.8,
130
+ gridBackgroundColor: "#FFFFFF",
131
+ buttonBorderAlpha:0,
132
+ buttonCornerRadius:2,
133
+ gridAlpha:0.5,
134
+ gridBackgroundColor:"#FFFFFF",
135
+ homeIconFile:"homeIconWhite.gif",
136
+ buttonIconAlpha:0.6,
137
+ gridAlpha: 0.2,
138
+ buttonSize:20
139
+ },
140
+
141
+ SmallMap: {
142
+ mapColor: "#FFFFFF",
143
+ rectangleColor: "#FFFFFF",
144
+ backgroundColor: "#000000",
145
+ backgroundAlpha: 0.7,
146
+ borderThickness: 1,
147
+ borderAlpha: 0.8
148
+ },
149
+
150
+ // the defaults below are set using CSS syntax, you can use any existing css property
151
+ // if you don't use Stock chart, you can delete lines below
152
+ PeriodSelector: {
153
+ color: "#e7e7e7"
154
+ },
155
+
156
+ PeriodButton: {
157
+ color: "#e7e7e7",
158
+ background: "transparent",
159
+ opacity: 0.7,
160
+ border: "1px solid rgba(255, 255, 255, .15)",
161
+ MozBorderRadius: "5px",
162
+ borderRadius: "5px",
163
+ margin: "1px",
164
+ outline: "none",
165
+ boxSizing: "border-box"
166
+ },
167
+
168
+ PeriodButtonSelected: {
169
+ color: "#e7e7e7",
170
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
171
+ border: "1px solid rgba(255, 255, 255, .3)",
172
+ MozBorderRadius: "5px",
173
+ borderRadius: "5px",
174
+ margin: "1px",
175
+ outline: "none",
176
+ opacity: 1,
177
+ boxSizing: "border-box"
178
+ },
179
+
180
+ PeriodInputField: {
181
+ color: "#e7e7e7",
182
+ background: "transparent",
183
+ border: "1px solid rgba(255, 255, 255, .15)",
184
+ outline: "none"
185
+ },
186
+
187
+ DataSetSelector: {
188
+ color: "#e7e7e7",
189
+ selectedBackgroundColor: "rgba(255, 255, 255, .25)",
190
+ rollOverBackgroundColor: "rgba(255, 255, 255, .15)"
191
+ },
192
+
193
+ DataSetCompareList: {
194
+ color: "#e7e7e7",
195
+ lineHeight: "100%",
196
+ boxSizing: "initial",
197
+ webkitBoxSizing: "initial",
198
+ border: "1px solid rgba(255, 255, 255, .15)"
199
+ },
200
+
201
+ DataSetSelect: {
202
+ border: "1px solid rgba(255, 255, 255, .15)",
203
+ outline: "none"
204
+ }
205
+
206
+ };