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,90 +1,93 @@
1
- AmCharts.AmStockChart=AmCharts.Class({construct:function(){this.version="3.2.0";this.createEvents("zoomed","rollOverStockEvent","rollOutStockEvent","clickStockEvent","panelRemoved","dataUpdated","init","rendered","drawn");this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.firstDayOfWeek=1;this.glueToTheEnd=!1;this.dataSetCounter=-1;this.zoomOutOnDataSetChange=!1;this.panels=[];this.dataSets=[];this.chartCursors=[];
2
- this.comparedDataSets=[];this.categoryAxesSettings=new AmCharts.CategoryAxesSettings;this.valueAxesSettings=new AmCharts.ValueAxesSettings;this.panelsSettings=new AmCharts.PanelsSettings;this.chartScrollbarSettings=new AmCharts.ChartScrollbarSettings;this.chartCursorSettings=new AmCharts.ChartCursorSettings;this.stockEventsSettings=new AmCharts.StockEventsSettings;this.legendSettings=new AmCharts.LegendSettings;this.balloon=new AmCharts.AmBalloon;this.previousEndDate=new Date(0);this.previousStartDate=
3
- new Date(0);this.dataSetCount=this.graphCount=0;this.chartCreated=!1},write:function(a){var b=this.exportConfig;b&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,b));this.chartRendered=!1;a="object"!=typeof a?document.getElementById(a):a;this.zoomOutOnDataSetChange&&(this.endDate=this.startDate=void 0);this.categoryAxesSettings=AmCharts.processObject(this.categoryAxesSettings,AmCharts.CategoryAxesSettings);this.valueAxesSettings=AmCharts.processObject(this.valueAxesSettings,
4
- AmCharts.ValueAxesSettings);this.chartCursorSettings=AmCharts.processObject(this.chartCursorSettings,AmCharts.ChartCursorSettings);this.chartScrollbarSettings=AmCharts.processObject(this.chartScrollbarSettings,AmCharts.ChartScrollbarSettings);this.legendSettings=AmCharts.processObject(this.legendSettings,AmCharts.LegendSettings);this.panelsSettings=AmCharts.processObject(this.panelsSettings,AmCharts.PanelsSettings);this.stockEventsSettings=AmCharts.processObject(this.stockEventsSettings,AmCharts.StockEventsSettings);
5
- a.innerHTML="";this.div=a;this.measure();this.createLayout();this.updateDataSets();this.addDataSetSelector();this.addPeriodSelector();this.addPanels();this.updatePanels();this.addChartScrollbar();this.updateData();this.skipDefault||this.setDefaultPeriod()},setDefaultPeriod:function(a){var b=this.periodSelector;b&&(this.animationPlayed=!1,b.setDefaultPeriod(a))},validateSize:function(){var a,b=this.panels;this.measurePanels();for(a=0;a<b.length;a++)panel=b[a],panel.invalidateSize()},updateDataSets:function(){var a=
6
- this.dataSets;!this.mainDataSet&&AmCharts.ifArray(a)&&(this.mainDataSet=this.dataSets[0]);var b;for(b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.DataSet);a[b]=c;c.id||(this.dataSetCount++,c.id="ds"+this.dataSetCount);void 0===c.color&&(c.color=this.colors.length-1>b?this.colors[b]:AmCharts.randomColor())}},updateEvents:function(a){AmCharts.ifArray(a.stockEvents)&&AmCharts.parseEvents(a,this.panels,this.stockEventsSettings,this.firstDayOfWeek,this,this.dataDateFormat)},getLastDate:function(a){var b=
7
- this.dataDateFormat;a=a instanceof Date?new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()):b?AmCharts.stringToDate(a,b):new Date(a);return new Date(AmCharts.changeDate(a,this.categoryAxesSettings.minPeriod,1,!0).getTime()-1)},getFirstDate:function(a){var b=this.dataDateFormat;a=a instanceof Date?new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()):b?AmCharts.stringToDate(a,b):
8
- new Date(a);return new Date(AmCharts.resetDateToMin(a,this.categoryAxesSettings.minPeriod,1,this.firstDayOfWeek))},updateData:function(){var a=this.mainDataSet;if(a){var b=this.categoryAxesSettings;-1==AmCharts.getItemIndex(b.minPeriod,b.groupToPeriods)&&b.groupToPeriods.unshift(b.minPeriod);var c=a.dataProvider;if(AmCharts.ifArray(c)){var d=a.categoryField;this.firstDate=this.getFirstDate(c[0][d]);this.lastDate=this.getLastDate(c[c.length-1][d]);this.periodSelector&&this.periodSelector.setRanges(this.firstDate,
9
- this.lastDate);a.dataParsed||(AmCharts.parseStockData(a,b.minPeriod,b.groupToPeriods,this.firstDayOfWeek,this.dataDateFormat),a.dataParsed=!0);this.updateComparingData();this.updateEvents(a)}else this.lastDate=this.firstDate=void 0;this.glueToTheEnd&&this.startDate&&this.endDate&&this.lastDate&&(AmCharts.getPeriodDuration(b.minPeriod),this.startDate=new Date(this.startDate.getTime()+(this.lastDate.getTime()-this.endDate.getTime())),this.endDate=this.lastDate,this.updateScrollbar=!0);this.updatePanelsWithNewData()}a=
10
- {type:"dataUpdated",chart:this};this.fire(a.type,a)},updateComparingData:function(){var a=this.comparedDataSets,b=this.categoryAxesSettings,c;for(c=0;c<a.length;c++){var d=a[c];d.dataParsed||(AmCharts.parseStockData(d,b.minPeriod,b.groupToPeriods,this.firstDayOfWeek,this.dataDateFormat),d.dataParsed=!0);this.updateEvents(d)}},createLayout:function(){var a=this.div,b,c,d=document.createElement("div");d.style.position="relative";this.containerDiv=d;a.appendChild(d);if(a=this.periodSelector)b=a.position;
11
- if(a=this.dataSetSelector)c=a.position;if("left"==b||"left"==c)a=document.createElement("div"),a.style.cssFloat="left",a.style.styleFloat="left",a.style.width="0px",a.style.position="absolute",d.appendChild(a),this.leftContainer=a;if("right"==b||"right"==c)b=document.createElement("div"),b.style.cssFloat="right",b.style.styleFloat="right",b.style.width="0px",d.appendChild(b),this.rightContainer=b;b=document.createElement("div");d.appendChild(b);this.centerContainer=b;d=document.createElement("div");
12
- b.appendChild(d);this.panelsContainer=d},addPanels:function(){this.measurePanels();for(var a=this.panels,b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.StockPanel);a[b]=c;this.addStockPanel(c,b)}this.panelsAdded=!0},measurePanels:function(){this.measure();var a=this.chartScrollbarSettings,b=this.divRealHeight,c=this.panelsSettings.panelSpacing;a.enabled&&(b-=a.height);(a=this.periodSelector)&&!a.vertical&&(a=a.offsetHeight,b-=a+c);(a=this.dataSetSelector)&&!a.vertical&&(a=a.offsetHeight,
13
- b-=a+c);a=this.panels;this.panelsContainer.style.height=b+"px";this.chartCursors=[];var d=0,e,g;for(e=0;e<a.length;e++){g=a[e];var h=g.percentHeight;isNaN(h)&&(h=100/a.length,g.percentHeight=h);d+=h}this.panelsHeight=Math.max(b-c*(a.length-1),0);for(e=0;e<a.length;e++)g=a[e],g.percentHeight=g.percentHeight/d*100,g.panelBox&&(g.panelBox.style.height=Math.round(g.percentHeight*this.panelsHeight/100)+"px")},addStockPanel:function(a,b){var c=this.panelsSettings,d=document.createElement("div");d.className=
14
- "amChartsPanel";0<b&&!this.panels[b-1].showCategoryAxis&&(d.style.marginTop=c.panelSpacing+"px");a.panelBox=d;a.stockChart=this;a.id||(a.id="stockPanel"+b);a.pathToImages=this.pathToImages;d.style.height=Math.round(a.percentHeight*this.panelsHeight/100)+"px";d.style.width="100%";this.panelsContainer.appendChild(d);0<c.backgroundAlpha&&(d.style.backgroundColor=c.backgroundColor);if(d=a.stockLegend)d.container=void 0,d.title=a.title,d.marginLeft=c.marginLeft,d.marginRight=c.marginRight,d.verticalGap=
15
- 3,d.position="top",AmCharts.copyProperties(this.legendSettings,d),a.addLegend(d);a.zoomOutText="";a.removeChartCursor();this.addCursor(a)},enableCursors:function(a){var b=this.chartCursors,c;for(c=0;c<b.length;c++)b[c].enabled=a},updatePanels:function(){var a=this.panels,b;for(b=0;b<a.length;b++)this.updatePanel(a[b]);this.mainDataSet&&this.updateGraphs();this.currentPeriod=void 0},updatePanel:function(a){a.seriesIdField="amCategoryIdField";a.dataProvider=[];a.chartData=[];a.graphs=[];var b=a.categoryAxis,
16
- c=this.categoryAxesSettings;AmCharts.copyProperties(this.panelsSettings,a);AmCharts.copyProperties(c,b);b.parseDates=!0;a.zoomOutOnDataUpdate=!1;a.showCategoryAxis?"top"==b.position?a.marginTop=c.axisHeight:a.marginBottom=c.axisHeight:(a.categoryAxis.labelsEnabled=!1,a.chartCursor&&(a.chartCursor.categoryBalloonEnabled=!1));var c=a.valueAxes,d=c.length,e;0===d&&(e=new AmCharts.ValueAxis,a.addValueAxis(e));b=new AmCharts.AmBalloon;AmCharts.copyProperties(this.balloon,b);a.balloon=b;c=a.valueAxes;d=
17
- c.length;for(b=0;b<d;b++)e=c[b],AmCharts.copyProperties(this.valueAxesSettings,e);a.listenersAdded=!1;a.write(a.panelBox)},zoom:function(a,b){this.zoomChart(a,b)},zoomOut:function(){this.zoomChart(this.firstDate,this.lastDate)},updatePanelsWithNewData:function(){var a=this.mainDataSet;if(a){var b=this.panels;this.currentPeriod=void 0;var c;for(c=0;c<b.length;c++){var d=b[c];d.categoryField=a.categoryField;0===a.dataProvider.length&&(d.dataProvider=[])}if(b=this.scrollbarChart){c=this.categoryAxesSettings;
18
- d=c.minPeriod;b.categoryField=a.categoryField;if(0<a.dataProvider.length){var e=this.chartScrollbarSettings.usePeriod;b.dataProvider=e?a.agregatedDataProviders[e]:a.agregatedDataProviders[d]}else b.dataProvider=[];e=b.categoryAxis;e.minPeriod=d;e.firstDayOfWeek=this.firstDayOfWeek;e.equalSpacing=c.equalSpacing;b.validateData()}0<a.dataProvider.length&&this.zoomChart(this.startDate,this.endDate)}this.panelDataInvalidated=!1},addChartScrollbar:function(){var a=this.chartScrollbarSettings,b=this.scrollbarChart;
19
- b&&(b.clear(),b.destroy());if(a.enabled){var c=this.panelsSettings,d=this.categoryAxesSettings,b=new AmCharts.AmSerialChart;b.pathToImages=this.pathToImages;b.autoMargins=!1;this.scrollbarChart=b;b.id="scrollbarChart";b.scrollbarOnly=!0;b.zoomOutText="";b.panEventsEnabled=this.panelsSettings.panEventsEnabled;b.marginLeft=c.marginLeft;b.marginRight=c.marginRight;b.marginTop=0;b.marginBottom=0;var c=d.dateFormats,e=b.categoryAxis;e.boldPeriodBeginning=d.boldPeriodBeginning;c&&(e.dateFormats=d.dateFormats);
20
- e.labelsEnabled=!1;e.parseDates=!0;d=a.graph;if(AmCharts.isString(d)){c=this.panels;for(e=0;e<c.length;e++){var g=AmCharts.getObjById(c[e].stockGraphs,a.graph);g&&(d=g)}a.graph=d}var h;d&&(h=new AmCharts.AmGraph,h.valueField=d.valueField,h.periodValue=d.periodValue,h.type=d.type,h.connect=d.connect,b.addGraph(h));d=new AmCharts.ChartScrollbar;b.addChartScrollbar(d);AmCharts.copyProperties(a,d);d.scrollbarHeight=a.height;d.graph=h;this.removeListener(d,"zoomed",this.handleScrollbarZoom);this.listenTo(d,
21
- "zoomed",this.handleScrollbarZoom);h=document.createElement("div");h.style.height=a.height+"px";d=this.periodSelectorContainer;c=this.periodSelector;e=this.centerContainer;"bottom"==a.position?c?"bottom"==c.position?e.insertBefore(h,d):e.appendChild(h):e.appendChild(h):c?"top"==c.position?e.insertBefore(h,d.nextSibling):e.insertBefore(h,e.firstChild):e.insertBefore(h,e.firstChild);b.write(h)}},handleScrollbarZoom:function(a){if(this.skipScrollbarEvent)this.skipScrollbarEvent=!1;else{var b=a.endDate,
22
- c={};c.startDate=a.startDate;c.endDate=b;this.updateScrollbar=!1;this.handleZoom(c)}},addPeriodSelector:function(){var a=this.periodSelector;if(a){this.periodSelector=a=AmCharts.processObject(a,AmCharts.PeriodSelector);var b=this.categoryAxesSettings.minPeriod;a.minDuration=AmCharts.getPeriodDuration(b);a.minPeriod=b;a.chart=this;var c=this.dataSetSelector,d,b=this.dssContainer;c&&(d=c.position);var c=this.panelsSettings.panelSpacing,e=document.createElement("div");this.periodSelectorContainer=e;
23
- var g=this.leftContainer,h=this.rightContainer,f=this.centerContainer,m=this.panelsContainer,k=a.width+2*c+"px";switch(a.position){case "left":g.style.width=a.width+"px";g.appendChild(e);f.style.paddingLeft=k;break;case "right":f.style.marginRight=k;h.appendChild(e);h.style.width=a.width+"px";break;case "top":m.style.clear="both";"top"==d?f.insertAfter(e,b):f.insertBefore(e,m);e.style.paddingBottom=c+"px";break;case "bottom":e.style.marginTop=c+"px","bottom"==d?f.insertBefore(e,b):f.appendChild(e)}this.removeListener(a,
24
- "changed",this.handlePeriodSelectorZoom);this.listenTo(a,"changed",this.handlePeriodSelectorZoom);a.write(e)}},addDataSetSelector:function(){var a=this.dataSetSelector;if(a){this.dataSetSelector=a=AmCharts.processObject(a,AmCharts.DataSetSelector);a.chart=this;a.dataProvider=this.dataSets;var b=a.position,c=this.panelsSettings.panelSpacing,d=document.createElement("div");this.dssContainer=d;var e=this.leftContainer,g=this.rightContainer,h=this.centerContainer,f=this.panelsContainer,c=a.width+2*c+
25
- "px";switch(b){case "left":e.style.width=a.width+"px";e.appendChild(d);h.style.paddingLeft=c;break;case "right":h.style.marginRight=c;g.appendChild(d);g.style.width=a.width+"px";break;case "top":f.style.clear="both";h.insertBefore(d,f);break;case "bottom":h.appendChild(d)}a.write(d)}},handlePeriodSelectorZoom:function(a){var b=this.scrollbarChart;b&&(b.updateScrollbar=!0);a.predefinedPeriod?(this.predefinedStart=a.startDate,this.predefinedEnd=a.endDate):this.predefinedEnd=this.predefinedStart=null;
26
- this.zoomChart(a.startDate,a.endDate)},addCursor:function(a){var b=this.chartCursorSettings;if(b.enabled){var c=new AmCharts.ChartCursor;AmCharts.copyProperties(b,c);a.removeChartCursor();a.addChartCursor(c);this.removeListener(c,"changed",this.handleCursorChange);this.removeListener(c,"onHideCursor",this.hideChartCursor);this.removeListener(c,"zoomed",this.handleCursorZoom);this.listenTo(c,"changed",this.handleCursorChange);this.listenTo(c,"onHideCursor",this.hideChartCursor);this.listenTo(c,"zoomed",
27
- this.handleCursorZoom);this.chartCursors.push(c)}},hideChartCursor:function(){var a=this.chartCursors,b;for(b=0;b<a.length;b++){var c=a[b];c.hideCursor(!1);(c=c.chart)&&c.updateLegendValues()}},handleCursorZoom:function(a){var b=this.scrollbarChart;b&&(b.updateScrollbar=!0);var b={},c;if(this.categoryAxesSettings.equalSpacing){var d=this.mainDataSet.categoryField,e=this.mainDataSet.agregatedDataProviders[this.currentPeriod];c=new Date(e[a.start][d]);a=new Date(e[a.end][d])}else c=new Date(a.start),
28
- a=new Date(a.end);b.startDate=c;b.endDate=a;this.handleZoom(b)},handleZoom:function(a){this.zoomChart(a.startDate,a.endDate)},zoomChart:function(a,b){var c=this,d=c.firstDate,e=c.lastDate,g=c.currentPeriod,h=c.categoryAxesSettings,f=h.minPeriod,m=c.panelsSettings,k=c.periodSelector,u=c.panels,y=c.comparedGraphs,r=c.scrollbarChart,x=c.firstDayOfWeek;if(d&&e){a||(a=d);b||(b=e);if(g){var s=AmCharts.extractPeriod(g);a.getTime()==b.getTime()&&s!=f&&(b=AmCharts.changeDate(b,s.period,s.count),b.setTime(b.getTime()-
29
- 1))}a.getTime()<d.getTime()&&(a=d);a.getTime()>e.getTime()&&(a=e);b.getTime()<d.getTime()&&(b=d);b.getTime()>e.getTime()&&(b=e);h=AmCharts.getItemIndex(f,h.groupToPeriods);e=g;g=c.choosePeriod(h,a,b);c.currentPeriod=g;h=AmCharts.extractPeriod(g);AmCharts.getPeriodDuration(h.period,h.count);AmCharts.getPeriodDuration(f);1>b.getTime()-a.getTime()&&(a=new Date(b.getTime()-1));f=new Date(a);f.getTime()==d.getTime()&&(f=AmCharts.resetDateToMin(a,h.period,h.count,x));for(d=0;d<u.length;d++){s=u[d];if(g!=
30
- e){var n;for(n=0;n<y.length;n++){var w=y[n].graph;w.dataProvider=w.dataSet.agregatedDataProviders[g]}n=s.categoryAxis;n.firstDayOfWeek=x;n.minPeriod=g;s.dataProvider=c.mainDataSet.agregatedDataProviders[g];if(n=s.chartCursor)n.categoryBalloonDateFormat=c.chartCursorSettings.categoryBalloonDateFormat(h.period),s.showCategoryAxis||(n.categoryBalloonEnabled=!1);s.startTime=f.getTime();s.endTime=b.getTime();s.validateData(!0)}n=!1;s.chartCursor&&s.chartCursor.panning&&(n=!0);n||(s.startTime=void 0,s.endTime=
31
- void 0,s.zoomToDates(f,b));0<m.startDuration&&c.animationPlayed?(s.startDuration=0,s.animateAgain()):0<m.startDuration&&s.animateAgain()}c.animationPlayed=!0;AmCharts.extractPeriod(g);m=new Date(b);r&&c.updateScrollbar&&(r.zoomToDates(a,m),c.skipScrollbarEvent=!0,setTimeout(function(){c.resetSkip.call(c)},100));c.updateScrollbar=!0;c.startDate=a;c.endDate=b;k&&k.zoom(a,b);if(a.getTime()!=c.previousStartDate.getTime()||b.getTime()!=c.previousEndDate.getTime())k={type:"zoomed"},k.startDate=a,k.endDate=
32
- b,k.chart=c,k.period=g,c.fire(k.type,k),c.previousStartDate=new Date(a),c.previousEndDate=new Date(b)}c.eventsHidden&&c.showHideEvents(!1);c.chartCreated||(g="init",c.fire(g,{type:g,chart:c}));c.chartRendered||(g="rendered",c.fire(g,{type:g,chart:c}),c.chartRendered=!0);g="drawn";c.fire(g,{type:g,chart:c});c.chartCreated=!0;c.animationPlayed=!0},resetSkip:function(){this.skipScrollbarEvent=!1},updateGraphs:function(){this.getSelections();if(0<this.dataSets.length){var a=this.panels;this.comparedGraphs=
33
- [];var b;for(b=0;b<a.length;b++){var c=a[b],d=c.valueAxes,e;for(e=0;e<d.length;e++){var g=d[e];g.prevLog&&(g.logarithmic=g.prevLog);g.recalculateToPercents="always"==c.recalculateToPercents?!0:!1}d=this.mainDataSet;e=this.comparedDataSets;g=c.stockGraphs;c.graphs=[];var h;for(h=0;h<g.length;h++){var f=g[h],f=AmCharts.processObject(f,AmCharts.StockGraph);g[h]=f;if(!f.title||f.resetTitleOnDataSetChange)f.title=d.title,f.resetTitleOnDataSetChange=!0;f.useDataSetColors&&(f.lineColor=d.color,f.fillColors=
34
- void 0,f.bulletColor=void 0);c.addGraph(f);var m=!1;"always"==c.recalculateToPercents&&(m=!0);var k=c.stockLegend,u,y,r,x;k&&(k=AmCharts.processObject(k,AmCharts.StockLegend),c.stockLegend=k,u=k.valueTextComparing,y=k.valueTextRegular,r=k.periodValueTextComparing,x=k.periodValueTextRegular);if(f.comparable){var s=e.length;0<s&&f.valueAxis.logarithmic&&"never"!=c.recalculateToPercents&&(f.valueAxis.logarithmic=!1,f.valueAxis.prevLog=!0);0<s&&"whenComparing"==c.recalculateToPercents&&(f.valueAxis.recalculateToPercents=
35
- !0);k&&f.valueAxis&&!0===f.valueAxis.recalculateToPercents&&(m=!0);var n;for(n=0;n<s;n++){var w=e[n],p=f.comparedGraphs[w.id];p||(p=new AmCharts.AmGraph,p.id="comparedGraph"+n+"_"+w.id);p.periodValue=f.periodValue;p.dataSet=w;f.comparedGraphs[w.id]=p;p.seriesIdField="amCategoryIdField";p.connect=f.connect;var l=f.compareField;l||(l=f.valueField);var D=!1,A=w.fieldMappings,z;for(z=0;z<A.length;z++)A[z].toField==l&&(D=!0);if(D){p.valueField=l;p.title=w.title;p.lineColor=w.color;f.compareGraphType&&
36
- (p.type=f.compareGraphType);l=f.compareGraphLineThickness;isNaN(l)||(p.lineThickness=l);l=f.compareGraphDashLength;isNaN(l)||(p.dashLength=l);l=f.compareGraphLineAlpha;isNaN(l)||(p.lineAlpha=l);l=f.compareGraphCornerRadiusTop;isNaN(l)||(p.cornerRadiusTop=l);l=f.compareGraphCornerRadiusBottom;isNaN(l)||(p.cornerRadiusBottom=l);l=f.compareGraphBalloonColor;isNaN(l)||(p.balloonColor=l);if(l=f.compareGraphFillColors)p.fillColors=l;if(l=f.compareGraphNegativeFillColors)p.negativeFillColors=l;if(l=f.compareGraphFillAlphas)p.fillAlphas=
37
- l;if(l=f.compareGraphNegativeFillAlphas)p.negativeFillAlphas=l;if(l=f.compareGraphBullet)p.bullet=l;if(l=f.compareGraphNumberFormatter)p.numberFormatter=l;if(l=f.compareGraphBalloonText)p.balloonText=l;l=f.compareGraphBulletSize;isNaN(l)||(p.bulletSize=l);l=f.compareGraphBulletAlpha;isNaN(l)||(p.bulletAlpha=l);l=f.compareGraphBulletBorderAlpha;isNaN(l)||(p.bulletBorderAlpha=l);if(l=f.compareGraphBulletBorderColor)p.bulletBorderColor=l;l=f.compareGraphBulletBorderThickness;isNaN(l)||(p.bulletBorderThickness=
38
- l);p.visibleInLegend=f.compareGraphVisibleInLegend;p.balloonFunction=f.compareGraphBalloonFunction;p.valueAxis=f.valueAxis;k&&(m&&u?(p.legendValueText=u,p.legendPeriodValueText=r):(y&&(p.legendValueText=y),x&&(p.legendPeriodValueText=x)));c.addGraph(p);this.comparedGraphs.push({graph:p,dataSet:w})}}}k&&(m&&u?(f.legendValueText=u,f.legendPeriodValueText=r):(y&&(f.legendValueText=y),x&&(f.legendPeriodValueText=x)))}}}},choosePeriod:function(a,b,c){var d=this.categoryAxesSettings,e=d.groupToPeriods,
39
- g=e[a],e=e[a+1],h=AmCharts.extractPeriod(g),h=AmCharts.getPeriodDuration(h.period,h.count),f=b.getTime(),m=c.getTime(),d=d.maxSeries;return(m-f)/h>d&&0<d&&e?this.choosePeriod(a+1,b,c):g},handleCursorChange:function(a){var b=a.target,c=a.position;a=a.zooming;var d=this.chartCursors,e;for(e=0;e<d.length;e++){var g=d[e];g!=b&&c&&(g.isZooming(a),g.previousMousePosition=NaN,g.forceShow=!0,g.setPosition(c,!1))}},getSelections:function(){var a=[],b=this.dataSets,c;for(c=0;c<b.length;c++){var d=b[c];d.compared&&
40
- a.push(d)}this.comparedDataSets=a;b=this.panels;for(c=0;c<b.length;c++)d=b[c],"never"!=d.recalculateToPercents&&0<a.length?d.hideDrawingIcons(!0):d.drawingIconsEnabled&&d.hideDrawingIcons(!1)},addPanel:function(a){this.panels.push(a);AmCharts.removeChart(a);AmCharts.addChart(a)},addPanelAt:function(a,b){this.panels.splice(b,0,a);AmCharts.removeChart(a);AmCharts.addChart(a)},removePanel:function(a){var b=this.panels,c;for(c=b.length-1;0<=c;c--)if(b[c]==a){var d={type:"panelRemoved",panel:a,chart:this};
41
- this.fire(d.type,d);b.splice(c,1);a.destroy();a.clear()}},validateData:function(){this.resetDataParsed();this.updateDataSets();this.mainDataSet.compared=!1;this.updateGraphs();this.updateData();var a=this.dataSetSelector;a&&a.write(a.div)},resetDataParsed:function(){var a=this.dataSets,b;for(b=0;b<a.length;b++)a[b].dataParsed=!1},validateNow:function(){this.skipDefault=!0;this.clear(!0);this.write(this.div)},hideStockEvents:function(){this.showHideEvents(!1);this.eventsHidden=!0},showStockEvents:function(){this.showHideEvents(!0);
42
- this.eventsHidden=!1},showHideEvents:function(a){var b=this.panels,c;for(c=0;c<b.length;c++){var d=b[c].graphs,e;for(e=0;e<d.length;e++){var g=d[e];!0===a?g.showBullets():g.hideBullets()}}},invalidateSize:function(){var a=this;clearTimeout(a.validateTO);var b=setTimeout(function(){a.validateNow()},5);a.validateTO=b},measure:function(){var a=this.div,b=a.offsetWidth,c=a.offsetHeight;a.clientHeight&&(b=a.clientWidth,c=a.clientHeight);this.divRealWidth=b;this.divRealHeight=c},clear:function(a){var b=
43
- this.panels,c;if(b)for(c=0;c<b.length;c++){var d=b[c];a||(d.cleanChart(),d.destroy());d.clear(a)}(b=this.scrollbarChart)&&b.clear();if(b=this.div)b.innerHTML="";a||(this.div=null,AmCharts.deleteObject(this))}});AmCharts.StockEvent=AmCharts.Class({construct:function(){}});AmCharts.DataSet=AmCharts.Class({construct:function(){this.fieldMappings=[];this.dataProvider=[];this.agregatedDataProviders=[];this.stockEvents=[];this.compared=!1;this.showInCompare=this.showInSelect=!0}});AmCharts.PeriodSelector=AmCharts.Class({construct:function(){this.createEvents("changed");this.inputFieldsEnabled=!0;this.position="bottom";this.width=180;this.fromText="From: ";this.toText="to: ";this.periodsText="Zoom: ";this.periods=[];this.inputFieldWidth=100;this.dateFormat="DD-MM-YYYY";this.hideOutOfScopePeriods=!0},zoom:function(a,b){this.inputFieldsEnabled&&(this.startDateField.value=AmCharts.formatDate(a,this.dateFormat),this.endDateField.value=AmCharts.formatDate(b,this.dateFormat));this.markButtonAsSelected()},
44
- write:function(a){var b=this;a.className="amChartsPeriodSelector";b.div=a;a.innerHTML="";var c=b.position,c="top"==c||"bottom"==c?!1:!0;b.vertical=c;var d=0,e=0;if(b.inputFieldsEnabled){var g=document.createElement("div");a.appendChild(g);var h=document.createTextNode(b.fromText);g.appendChild(h);c?AmCharts.addBr(g):(g.style.styleFloat="left",g.style.display="inline");var f=document.createElement("input");f.className="amChartsInputField";f.style.textAlign="center";f.onblur=function(){b.handleCalChange()};
45
- AmCharts.isNN&&f.addEventListener("keypress",function(a){b.handleCalendarChange.call(b,a)},!0);AmCharts.isIE&&f.attachEvent("onkeypress",function(a){b.handleCalendarChange.call(b,a)});g.appendChild(f);b.startDateField=f;if(c)h=b.width-6+"px",AmCharts.addBr(g);else{var h=b.inputFieldWidth+"px",m=document.createTextNode(" ");g.appendChild(m)}f.style.width=h;f=document.createTextNode(b.toText);g.appendChild(f);c&&AmCharts.addBr(g);f=document.createElement("input");f.className="amChartsInputField";f.style.textAlign=
46
- "center";f.onblur=function(){b.handleCalChange()};AmCharts.isNN&&f.addEventListener("keypress",function(a){b.handleCalendarChange.call(b,a)},!0);AmCharts.isIE&&f.attachEvent("onkeypress",function(a){b.handleCalendarChange.call(b,a)});g.appendChild(f);b.endDateField=f;c?AmCharts.addBr(g):d=f.offsetHeight+2;h&&(f.style.width=h)}g=b.periods;if(AmCharts.ifArray(g)){h=document.createElement("div");c||(h.style.cssFloat="right",h.style.styleFloat="right",h.style.display="inline");a.appendChild(h);c&&AmCharts.addBr(h);
47
- a=document.createTextNode(b.periodsText);h.appendChild(a);b.periodContainer=h;var k;for(a=0;a<g.length;a++)f=g[a],k=document.createElement("input"),k.type="button",k.value=f.label,k.period=f.period,k.count=f.count,k.periodObj=f,k.className="amChartsButton",c&&(k.style.width=b.width-1+"px"),h.appendChild(k),b.addEventListeners(k),f.button=k;!c&&k&&(e=k.offsetHeight);b.offsetHeight=Math.max(d,e)}},addEventListeners:function(a){var b=this;AmCharts.isNN&&a.addEventListener("click",function(a){b.handlePeriodChange.call(b,
48
- a)},!0);AmCharts.isIE&&a.attachEvent("onclick",function(a){b.handlePeriodChange.call(b,a)})},getPeriodDates:function(){var a=this.periods,b;for(b=0;b<a.length;b++)this.selectPeriodButton(a[b],!0)},handleCalendarChange:function(a){13==a.keyCode&&this.handleCalChange()},handleCalChange:function(){var a=this.dateFormat,b=AmCharts.stringToDate(this.startDateField.value,a),a=this.chart.getLastDate(AmCharts.stringToDate(this.endDateField.value,a));try{this.startDateField.blur(),this.endDateField.blur()}catch(c){}if(b&&
49
- a){var d={type:"changed"};d.startDate=b;d.endDate=a;d.chart=this.chart;this.fire(d.type,d)}},handlePeriodChange:function(a){this.selectPeriodButton((a.srcElement?a.srcElement:a.target).periodObj)},setRanges:function(a,b){this.firstDate=a;this.lastDate=b;this.getPeriodDates()},selectPeriodButton:function(a,b){var c=a.button,d=c.count,e=c.period,g,h,f=this.firstDate,m=this.lastDate,k;f&&m&&("MAX"==e?(g=f,h=m):"YTD"==e?(g=new Date,g.setMonth(0,1),g.setHours(0,0,0,0),0===d&&g.setDate(g.getDate()-1),h=
50
- this.lastDate):(k=AmCharts.getPeriodDuration(e,d),this.selectFromStart?(g=f,h=new Date(f.getTime()+k-1)):(g=new Date(m.getTime()-k+1),h=m)),a.startTime=g.getTime(),this.hideOutOfScopePeriods&&(b&&a.startTime<f.getTime()?c.style.display="none":c.style.display="inline"),g.getTime()>m.getTime()&&(k=AmCharts.getPeriodDuration("DD",1),g=new Date(m.getTime()-k)),g.getTime()<f.getTime()&&(g=f),"YTD"==e&&(a.startTime=g.getTime()),a.endTime=h.getTime(),b||(this.skipMark=!0,this.unselectButtons(),c.className=
51
- "amChartsButtonSelected",c={type:"changed"},c.startDate=g,c.endDate=h,c.predefinedPeriod=e,c.chart=this.chart,c.count=d,this.fire(c.type,c)))},markButtonAsSelected:function(){if(!this.skipMark){var a=this.chart,b=this.periods,c=a.startDate.getTime(),a=a.endDate.getTime();this.unselectButtons();var d;for(d=b.length-1;0<=d;d--){var e=b[d],g=e.button;e.startTime&&e.endTime&&c==e.startTime&&a==e.endTime&&(this.unselectButtons(),g.className="amChartsButtonSelected")}}this.skipMark=!1},unselectButtons:function(){var a=
52
- this.periods,b;for(b=a.length-1;0<=b;b--)a[b].button.className="amChartsButton"},setDefaultPeriod:function(){var a=this.periods,b;for(b=0;b<a.length;b++){var c=a[b];c.selected&&this.selectPeriodButton(c)}}});AmCharts.StockGraph=AmCharts.Class({inherits:AmCharts.AmGraph,construct:function(){AmCharts.StockGraph.base.construct.call(this);this.useDataSetColors=!0;this.periodValue="Close";this.compareGraphType="line";this.compareGraphVisibleInLegend=!0;this.comparable=this.resetTitleOnDataSetChange=!1;this.comparedGraphs={};this.showEventsOnComparedGraphs=!1}});AmCharts.StockPanel=AmCharts.Class({inherits:AmCharts.AmSerialChart,construct:function(){AmCharts.StockPanel.base.construct.call(this);this.showCategoryAxis=!0;this.recalculateToPercents="whenComparing";this.panelHeaderPaddingBottom=this.panelHeaderPaddingLeft=this.panelHeaderPaddingRight=this.panelHeaderPaddingTop=0;this.trendLineAlpha=1;this.trendLineColor="#00CC00";this.trendLineColorHover="#CC0000";this.trendLineThickness=2;this.trendLineDashLength=0;this.stockGraphs=[];this.drawingIconsEnabled=
53
- !1;this.iconSize=18;this.autoMargins=this.allowTurningOff=this.eraseAll=this.erasingEnabled=this.drawingEnabled=!1},initChart:function(a){AmCharts.StockPanel.base.initChart.call(this,a);this.drawingIconsEnabled&&this.createDrawIcons();if(a=this.chartCursor)this.removeListener(a,"draw",this.handleDraw),this.listenTo(a,"draw",this.handleDraw)},addStockGraph:function(a){this.stockGraphs.push(a);return a},removeStockGraph:function(a){var b=this.stockGraphs,c;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,
54
- 1)},createDrawIcons:function(){var a=this,b=a.iconSize,c=a.container,d=a.pathToImages,e=a.realWidth-2*b-1-a.marginRight,g=AmCharts.rect(c,b,b,"#000",0.005),h=AmCharts.rect(c,b,b,"#000",0.005);h.translate(b+1,0);var f=c.image(d+"pencilIcon.gif",0,0,b,b);a.pencilButton=f;h.setAttr("cursor","pointer");g.setAttr("cursor","pointer");g.mouseup(function(){a.handlePencilClick()});var m=c.image(d+"pencilIconH.gif",0,0,b,b);a.pencilButtonPushed=m;a.drawingEnabled||m.hide();var k=c.image(d+"eraserIcon.gif",
55
- b+1,0,b,b);a.eraserButton=k;h.mouseup(function(){a.handleEraserClick()});g.touchend&&(g.touchend(function(){a.handlePencilClick()}),h.touchend(function(){a.handleEraserClick()}));b=c.image(d+"eraserIconH.gif",b+1,0,b,b);a.eraserButtonPushed=b;a.erasingEnabled||b.hide();c=c.set([f,m,k,b,g,h]);c.translate(e,1);this.hideIcons&&c.hide()},handlePencilClick:function(){var a=!this.drawingEnabled;this.disableDrawing(!a);this.erasingEnabled=!1;this.eraserButtonPushed.hide();a?this.pencilButtonPushed.show():
1
+ AmCharts.AmStockChart=AmCharts.Class({construct:function(a){this.type="stock";this.cname="AmStockChart";this.version="3.4.7";this.theme=a;this.createEvents("zoomed","rollOverStockEvent","rollOutStockEvent","clickStockEvent","panelRemoved","dataUpdated","init","rendered","drawn");this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.firstDayOfWeek=1;this.glueToTheEnd=!1;this.dataSetCounter=-1;this.zoomOutOnDataSetChange=
2
+ !1;this.panels=[];this.dataSets=[];this.chartCursors=[];this.comparedDataSets=[];this.categoryAxesSettings=new AmCharts.CategoryAxesSettings(a);this.valueAxesSettings=new AmCharts.ValueAxesSettings(a);this.panelsSettings=new AmCharts.PanelsSettings(a);this.chartScrollbarSettings=new AmCharts.ChartScrollbarSettings(a);this.chartCursorSettings=new AmCharts.ChartCursorSettings(a);this.stockEventsSettings=new AmCharts.StockEventsSettings(a);this.legendSettings=new AmCharts.LegendSettings(a);this.balloon=
3
+ new AmCharts.AmBalloon(a);this.previousEndDate=new Date(0);this.previousStartDate=new Date(0);this.dataSetCount=this.graphCount=0;this.chartCreated=!1;AmCharts.applyTheme(this,a,this.cname)},write:function(a){var b=this.theme,c=this.exportConfig;c&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,c));this.chartRendered=!1;a="object"!=typeof a?document.getElementById(a):a;this.zoomOutOnDataSetChange&&(this.endDate=this.startDate=void 0);this.categoryAxesSettings=AmCharts.processObject(this.categoryAxesSettings,
4
+ AmCharts.CategoryAxesSettings,b);this.valueAxesSettings=AmCharts.processObject(this.valueAxesSettings,AmCharts.ValueAxesSettings,b);this.chartCursorSettings=AmCharts.processObject(this.chartCursorSettings,AmCharts.ChartCursorSettings,b);this.chartScrollbarSettings=AmCharts.processObject(this.chartScrollbarSettings,AmCharts.ChartScrollbarSettings,b);this.legendSettings=AmCharts.processObject(this.legendSettings,AmCharts.LegendSettings,b);this.panelsSettings=AmCharts.processObject(this.panelsSettings,
5
+ AmCharts.PanelsSettings,b);this.stockEventsSettings=AmCharts.processObject(this.stockEventsSettings,AmCharts.StockEventsSettings,b);this.dataSetSelector&&(this.dataSetSelector=AmCharts.processObject(this.dataSetSelector,AmCharts.DataSetSelector,b));this.periodSelector&&(this.periodSelector=AmCharts.processObject(this.periodSelector,AmCharts.PeriodSelector,b));a.innerHTML="";this.div=a;this.measure();this.createLayout();this.updateDataSets();this.addDataSetSelector();this.addPeriodSelector();this.addPanels();
6
+ this.updatePanels();this.addChartScrollbar();this.updateData();this.skipDefault||this.setDefaultPeriod()},setDefaultPeriod:function(a){var b=this.periodSelector;b&&(this.animationPlayed=!1,b.setDefaultPeriod(a))},validateSize:function(){var a,b=this.panels;this.measurePanels();for(a=0;a<b.length;a++)panel=b[a],panel.invalidateSize()},updateDataSets:function(){var a=this.mainDataSet,b=this.dataSets,c;for(c=0;c<b.length;c++){var d=b[c],d=AmCharts.processObject(d,AmCharts.DataSet);b[c]=d;d.id||(this.dataSetCount++,
7
+ d.id="ds"+this.dataSetCount);void 0===d.color&&(d.color=this.colors.length-1>c?this.colors[c]:AmCharts.randomColor())}!a&&AmCharts.ifArray(b)&&(this.mainDataSet=this.dataSets[0])},updateEvents:function(a){AmCharts.ifArray(a.stockEvents)&&AmCharts.parseEvents(a,this.panels,this.stockEventsSettings,this.firstDayOfWeek,this,this.dataDateFormat)},getLastDate:function(a){var b=this.dataDateFormat;a=a instanceof Date?new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),
8
+ a.getMilliseconds()):b?AmCharts.stringToDate(a,b):new Date(a);return new Date(AmCharts.changeDate(a,this.categoryAxesSettings.minPeriod,1,!0).getTime()-1)},getFirstDate:function(a){var b=this.dataDateFormat;a=a instanceof Date?new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()):b?AmCharts.stringToDate(a,b):new Date(a);return new Date(AmCharts.resetDateToMin(a,this.categoryAxesSettings.minPeriod,1,this.firstDayOfWeek))},updateData:function(){var a=
9
+ this.mainDataSet;if(a){var b=this.categoryAxesSettings;-1==AmCharts.getItemIndex(b.minPeriod,b.groupToPeriods)&&b.groupToPeriods.unshift(b.minPeriod);var c=a.dataProvider;if(AmCharts.ifArray(c)){var d=a.categoryField;this.firstDate=this.getFirstDate(c[0][d]);this.lastDate=this.getLastDate(c[c.length-1][d]);this.periodSelector&&this.periodSelector.setRanges(this.firstDate,this.lastDate);a.dataParsed||(AmCharts.parseStockData(a,b.minPeriod,b.groupToPeriods,this.firstDayOfWeek,this.dataDateFormat),a.dataParsed=
10
+ !0);this.updateComparingData();this.updateEvents(a)}else this.lastDate=this.firstDate=void 0;this.glueToTheEnd&&this.startDate&&this.endDate&&this.lastDate&&(AmCharts.getPeriodDuration(b.minPeriod),this.startDate=new Date(this.startDate.getTime()+(this.lastDate.getTime()-this.endDate.getTime())),this.endDate=this.lastDate,this.updateScrollbar=!0);this.updatePanelsWithNewData()}a={type:"dataUpdated",chart:this};this.fire(a.type,a)},updateComparingData:function(){var a=this.comparedDataSets,b=this.categoryAxesSettings,
11
+ c;for(c=0;c<a.length;c++){var d=a[c];d.dataParsed||(AmCharts.parseStockData(d,b.minPeriod,b.groupToPeriods,this.firstDayOfWeek,this.dataDateFormat),d.dataParsed=!0);this.updateEvents(d)}},createLayout:function(){var a=this.div,b,c,d=document.createElement("div");d.style.position="relative";this.containerDiv=d;a.appendChild(d);if(a=this.periodSelector)b=a.position;if(a=this.dataSetSelector)c=a.position;if("left"==b||"left"==c)a=document.createElement("div"),a.style.cssFloat="left",a.style.styleFloat=
12
+ "left",a.style.width="0px",a.style.position="absolute",d.appendChild(a),this.leftContainer=a;if("right"==b||"right"==c)b=document.createElement("div"),b.style.cssFloat="right",b.style.styleFloat="right",b.style.width="0px",d.appendChild(b),this.rightContainer=b;b=document.createElement("div");d.appendChild(b);this.centerContainer=b;d=document.createElement("div");b.appendChild(d);this.panelsContainer=d},addPanels:function(){this.measurePanels();for(var a=this.panels,b=0;b<a.length;b++){var c=a[b],
13
+ c=AmCharts.processObject(c,AmCharts.StockPanel,this.theme);a[b]=c;this.addStockPanel(c,b)}this.panelsAdded=!0},measurePanels:function(){this.measure();var a=this.chartScrollbarSettings,b=this.divRealHeight,c=this.panelsSettings.panelSpacing;a.enabled&&(b-=a.height);(a=this.periodSelector)&&!a.vertical&&(a=a.offsetHeight,b-=a+c);(a=this.dataSetSelector)&&!a.vertical&&(a=a.offsetHeight,b-=a+c);a=this.panels;this.panelsContainer.style.height=b+"px";this.chartCursors=[];var d=0,e,h;for(e=0;e<a.length;e++){h=
14
+ a[e];var f=h.percentHeight;isNaN(f)&&(f=100/a.length,h.percentHeight=f);d+=f}this.panelsHeight=Math.max(b-c*(a.length-1),0);for(e=0;e<a.length;e++)h=a[e],h.percentHeight=h.percentHeight/d*100,h.panelBox&&(h.panelBox.style.height=Math.round(h.percentHeight*this.panelsHeight/100)+"px")},addStockPanel:function(a,b){var c=this.panelsSettings,d=document.createElement("div");d.className="amChartsPanel";0<b&&!this.panels[b-1].showCategoryAxis&&(d.style.marginTop=c.panelSpacing+"px");a.panelBox=d;a.stockChart=
15
+ this;a.id||(a.id="stockPanel"+b);a.pathToImages=this.pathToImages;d.style.height=Math.round(a.percentHeight*this.panelsHeight/100)+"px";d.style.width="100%";this.panelsContainer.appendChild(d);0<c.backgroundAlpha&&(d.style.backgroundColor=c.backgroundColor);if(d=a.stockLegend)d.container=void 0,d.title=a.title,d.marginLeft=c.marginLeft,d.marginRight=c.marginRight,d.verticalGap=3,d.position="top",AmCharts.copyProperties(this.legendSettings,d),a.addLegend(d,d.divId);a.zoomOutText="";a.removeChartCursor();
16
+ this.addCursor(a)},enableCursors:function(a){var b=this.chartCursors,c;for(c=0;c<b.length;c++)b[c].enabled=a},updatePanels:function(){var a=this.panels,b;for(b=0;b<a.length;b++)this.updatePanel(a[b]);this.mainDataSet&&this.updateGraphs();this.currentPeriod=void 0},updatePanel:function(a){a.seriesIdField="amCategoryIdField";a.dataProvider=[];a.chartData=[];a.graphs=[];var b=a.categoryAxis,c=this.categoryAxesSettings;AmCharts.copyProperties(this.panelsSettings,a);AmCharts.copyProperties(c,b);b.parseDates=
17
+ !0;a.zoomOutOnDataUpdate=!1;a.mouseWheelScrollEnabled=this.mouseWheelScrollEnabled;a.showCategoryAxis?"top"==b.position?a.marginTop=c.axisHeight:a.marginBottom=c.axisHeight:(a.categoryAxis.labelsEnabled=!1,a.chartCursor&&(a.chartCursor.categoryBalloonEnabled=!1));var c=a.valueAxes,d=c.length,e;0===d&&(e=new AmCharts.ValueAxis(this.theme),a.addValueAxis(e));b=new AmCharts.AmBalloon(this.theme);AmCharts.copyProperties(this.balloon,b);a.balloon=b;c=a.valueAxes;d=c.length;for(b=0;b<d;b++)e=c[b],AmCharts.copyProperties(this.valueAxesSettings,
18
+ e);a.listenersAdded=!1;a.write(a.panelBox)},zoom:function(a,b){this.zoomChart(a,b)},zoomOut:function(){this.zoomChart(this.firstDate,this.lastDate)},updatePanelsWithNewData:function(){var a=this.mainDataSet,b=this.scrollbarChart;if(a){var c=this.panels;this.currentPeriod=void 0;var d;for(d=0;d<c.length;d++){var e=c[d];e.categoryField=a.categoryField;0===a.dataProvider.length&&(e.dataProvider=[]);e.scrollbarChart=b}b&&(c=this.categoryAxesSettings,d=c.minPeriod,b.categoryField=a.categoryField,0<a.dataProvider.length?
19
+ (e=this.chartScrollbarSettings.usePeriod,b.dataProvider=e?a.agregatedDataProviders[e]:a.agregatedDataProviders[d]):b.dataProvider=[],e=b.categoryAxis,e.minPeriod=d,e.firstDayOfWeek=this.firstDayOfWeek,e.equalSpacing=c.equalSpacing,e.markPeriodChange=c.markPeriodChange,b.bbsetr=!0,b.validateData());0<a.dataProvider.length&&this.zoomChart(this.startDate,this.endDate)}this.panelDataInvalidated=!1},addChartScrollbar:function(){var a=this.chartScrollbarSettings,b=this.scrollbarChart;b&&(b.clear(),b.destroy());
20
+ if(a.enabled){var c=this.panelsSettings,d=this.categoryAxesSettings,b=new AmCharts.AmSerialChart(this.theme);b.pathToImages=this.pathToImages;b.autoMargins=!1;this.scrollbarChart=b;b.id="scrollbarChart";b.scrollbarOnly=!0;b.zoomOutText="";b.panEventsEnabled=this.panelsSettings.panEventsEnabled;b.marginLeft=c.marginLeft;b.marginRight=c.marginRight;b.marginTop=0;b.marginBottom=0;var c=d.dateFormats,e=b.categoryAxis;e.boldPeriodBeginning=d.boldPeriodBeginning;c&&(e.dateFormats=d.dateFormats);e.labelsEnabled=
21
+ !1;e.parseDates=!0;d=a.graph;if(AmCharts.isString(d)){c=this.panels;for(e=0;e<c.length;e++){var h=AmCharts.getObjById(c[e].stockGraphs,a.graph);h&&(d=h)}a.graph=d}var f;d&&(f=new AmCharts.AmGraph(this.theme),f.valueField=d.valueField,f.periodValue=d.periodValue,f.type=d.type,f.connect=d.connect,b.addGraph(f));d=new AmCharts.ChartScrollbar(this.theme);b.addChartScrollbar(d);AmCharts.copyProperties(a,d);d.scrollbarHeight=a.height;d.graph=f;this.listenTo(d,"zoomed",this.handleScrollbarZoom);f=document.createElement("div");
22
+ f.style.height=a.height+"px";d=this.periodSelectorContainer;c=this.periodSelector;e=this.centerContainer;"bottom"==a.position?c?"bottom"==c.position?e.insertBefore(f,d):e.appendChild(f):e.appendChild(f):c?"top"==c.position?e.insertBefore(f,d.nextSibling):e.insertBefore(f,e.firstChild):e.insertBefore(f,e.firstChild);b.write(f)}},handleScrollbarZoom:function(a){if(this.skipScrollbarEvent)this.skipScrollbarEvent=!1;else{var b=a.endDate,c={};c.startDate=a.startDate;c.endDate=b;this.updateScrollbar=!1;
23
+ this.handleZoom(c)}},addPeriodSelector:function(){var a=this.periodSelector;if(a){var b=this.categoryAxesSettings.minPeriod;a.minDuration=AmCharts.getPeriodDuration(b);a.minPeriod=b;a.chart=this;var c=this.dataSetSelector,d,b=this.dssContainer;c&&(d=c.position);var c=this.panelsSettings.panelSpacing,e=document.createElement("div");this.periodSelectorContainer=e;var h=this.leftContainer,f=this.rightContainer,g=this.centerContainer,k=this.panelsContainer,m=a.width+2*c+"px";switch(a.position){case "left":h.style.width=
24
+ a.width+"px";h.appendChild(e);g.style.paddingLeft=m;break;case "right":g.style.marginRight=m;f.appendChild(e);f.style.width=a.width+"px";break;case "top":k.style.clear="both";g.insertBefore(e,k);e.style.paddingBottom=c+"px";e.style.overflow="hidden";break;case "bottom":e.style.marginTop=c+"px","bottom"==d?g.insertBefore(e,b):g.appendChild(e)}this.listenTo(a,"changed",this.handlePeriodSelectorZoom);a.write(e)}},addDataSetSelector:function(){var a=this.dataSetSelector;if(a){a.chart=this;a.dataProvider=
25
+ this.dataSets;var b=a.position,c=this.panelsSettings.panelSpacing,d=document.createElement("div");this.dssContainer=d;var e=this.leftContainer,h=this.rightContainer,f=this.centerContainer,g=this.panelsContainer,c=a.width+2*c+"px";switch(b){case "left":e.style.width=a.width+"px";e.appendChild(d);f.style.paddingLeft=c;break;case "right":f.style.marginRight=c;h.appendChild(d);h.style.width=a.width+"px";break;case "top":g.style.clear="both";f.insertBefore(d,g);d.style.overflow="hidden";break;case "bottom":f.appendChild(d)}a.write(d)}},
26
+ handlePeriodSelectorZoom:function(a){var b=this.scrollbarChart;b&&(b.updateScrollbar=!0);a.predefinedPeriod?(this.predefinedStart=a.startDate,this.predefinedEnd=a.endDate):this.predefinedEnd=this.predefinedStart=null;this.zoomChart(a.startDate,a.endDate)},addCursor:function(a){var b=this.chartCursorSettings;if(b.enabled){var c=new AmCharts.ChartCursor(this.theme);AmCharts.copyProperties(b,c);a.removeChartCursor();a.addChartCursor(c);this.listenTo(c,"changed",this.handleCursorChange);this.listenTo(c,
27
+ "onHideCursor",this.hideChartCursor);this.listenTo(c,"zoomed",this.handleCursorZoom);this.chartCursors.push(c)}},hideChartCursor:function(){var a=this.chartCursors,b;for(b=0;b<a.length;b++){var c=a[b];c.hideCursor(!1);(c=c.chart)&&c.updateLegendValues()}},handleCursorZoom:function(a){var b=this.scrollbarChart;b&&(b.updateScrollbar=!0);var b={},c;if(this.categoryAxesSettings.equalSpacing){var d=this.mainDataSet.categoryField,e=this.mainDataSet.agregatedDataProviders[this.currentPeriod];c=new Date(e[a.start][d]);
28
+ a=new Date(e[a.end][d])}else c=new Date(a.start),a=new Date(a.end);b.startDate=c;b.endDate=a;this.handleZoom(b)},handleZoom:function(a){this.zoomChart(a.startDate,a.endDate)},zoomChart:function(a,b){var c=this,d=c.firstDate,e=c.lastDate,h=c.currentPeriod,f=c.categoryAxesSettings,g=f.minPeriod,k=c.panelsSettings,m=c.periodSelector,q=c.panels,x=c.comparedGraphs,t=c.scrollbarChart,y=c.firstDayOfWeek;if(d&&e){a||(a=d);b||(b=e);if(h){var u=AmCharts.extractPeriod(h);a.getTime()==b.getTime()&&u!=g&&(b=AmCharts.changeDate(b,
29
+ u.period,u.count),b.setTime(b.getTime()-1))}a.getTime()<d.getTime()&&(a=d);a.getTime()>e.getTime()&&(a=e);b.getTime()<d.getTime()&&(b=d);b.getTime()>e.getTime()&&(b=e);e=AmCharts.getItemIndex(g,f.groupToPeriods);d=h;h=c.choosePeriod(e,a,b);c.currentPeriod=h;e=AmCharts.extractPeriod(h);AmCharts.getPeriodDuration(e.period,e.count);AmCharts.getPeriodDuration(g);1>b.getTime()-a.getTime()&&(a=new Date(b.getTime()-1));g=new Date(a);for(f=0;f<q.length;f++){u=q[f];if(h!=d){var n;for(n=0;n<x.length;n++){var w=
30
+ x[n].graph;w.dataProvider=w.dataSet.agregatedDataProviders[h]}n=u.categoryAxis;n.firstDayOfWeek=y;n.minPeriod=h;u.dataProvider=c.mainDataSet.agregatedDataProviders[h];if(n=u.chartCursor)n.categoryBalloonDateFormat=c.chartCursorSettings.categoryBalloonDateFormat(e.period),u.showCategoryAxis||(n.categoryBalloonEnabled=!1);u.startTime=g.getTime();u.endTime=b.getTime();u.validateData(!0)}n=!1;u.chartCursor&&u.chartCursor.panning&&(n=!0);n||(u.startTime=void 0,u.endTime=void 0,u.zoomToDates(g,b));0<k.startDuration&&
31
+ c.animationPlayed?(u.startDuration=0,u.animateAgain()):0<k.startDuration&&u.animateAgain()}c.animationPlayed=!0;AmCharts.extractPeriod(h);k=new Date(b);t&&c.updateScrollbar&&(t.zoomToDates(a,k),c.skipScrollbarEvent=!0,setTimeout(function(){c.resetSkip.call(c)},100));c.updateScrollbar=!0;c.startDate=a;c.endDate=b;m&&m.zoom(a,b);if(a.getTime()!=c.previousStartDate.getTime()||b.getTime()!=c.previousEndDate.getTime())m={type:"zoomed"},m.startDate=a,m.endDate=b,m.chart=c,m.period=h,c.fire(m.type,m),c.previousStartDate=
32
+ new Date(a),c.previousEndDate=new Date(b)}c.eventsHidden&&c.showHideEvents(!1);c.chartCreated||(h="init",c.fire(h,{type:h,chart:c}));c.chartRendered||(h="rendered",c.fire(h,{type:h,chart:c}),c.chartRendered=!0);h="drawn";c.fire(h,{type:h,chart:c});c.chartCreated=!0;c.animationPlayed=!0},resetSkip:function(){this.skipScrollbarEvent=!1},updateGraphs:function(){this.getSelections();if(0<this.dataSets.length){var a=this.panels;this.comparedGraphs=[];var b;for(b=0;b<a.length;b++){var c=a[b],d=c.valueAxes,
33
+ e;for(e=0;e<d.length;e++){var h=d[e];h.prevLog&&(h.logarithmic=h.prevLog);h.recalculateToPercents="always"==c.recalculateToPercents?!0:!1}d=this.mainDataSet;e=this.comparedDataSets;h=c.stockGraphs;c.graphs=[];var f;for(f=0;f<h.length;f++){var g=h[f],g=AmCharts.processObject(g,AmCharts.StockGraph,this.theme);h[f]=g;if(!g.title||g.resetTitleOnDataSetChange)g.title=d.title,g.resetTitleOnDataSetChange=!0;g.useDataSetColors&&(g.lineColor=d.color,g.fillColors=void 0,g.bulletColor=void 0);c.addGraph(g);
34
+ var k=!1;"always"==c.recalculateToPercents&&(k=!0);var m=c.stockLegend,q,x,t,y;m&&(m=AmCharts.processObject(m,AmCharts.StockLegend,this.theme),c.stockLegend=m,q=m.valueTextComparing,x=m.valueTextRegular,t=m.periodValueTextComparing,y=m.periodValueTextRegular);if(g.comparable){var u=e.length;0<u&&g.valueAxis.logarithmic&&"never"!=c.recalculateToPercents&&(g.valueAxis.logarithmic=!1,g.valueAxis.prevLog=!0);0<u&&"whenComparing"==c.recalculateToPercents&&(g.valueAxis.recalculateToPercents=!0);m&&g.valueAxis&&
35
+ !0===g.valueAxis.recalculateToPercents&&(k=!0);var n;for(n=0;n<u;n++){var w=e[n],p=g.comparedGraphs[w.id];p||(p=new AmCharts.AmGraph(this.theme),p.id="comparedGraph"+n+"_"+w.id);p.periodValue=g.periodValue;p.dataSet=w;p.behindColumns=g.behindColumns;g.comparedGraphs[w.id]=p;p.seriesIdField="amCategoryIdField";p.connect=g.connect;var l=g.compareField;l||(l=g.valueField);var D=!1,A=w.fieldMappings,z;for(z=0;z<A.length;z++)A[z].toField==l&&(D=!0);if(D){p.valueField=l;p.title=w.title;p.lineColor=w.color;
36
+ g.compareGraphType&&(p.type=g.compareGraphType);l=g.compareGraphLineThickness;isNaN(l)||(p.lineThickness=l);l=g.compareGraphDashLength;isNaN(l)||(p.dashLength=l);l=g.compareGraphLineAlpha;isNaN(l)||(p.lineAlpha=l);l=g.compareGraphCornerRadiusTop;isNaN(l)||(p.cornerRadiusTop=l);l=g.compareGraphCornerRadiusBottom;isNaN(l)||(p.cornerRadiusBottom=l);l=g.compareGraphBalloonColor;isNaN(l)||(p.balloonColor=l);if(l=g.compareGraphFillColors)p.fillColors=l;if(l=g.compareGraphNegativeFillColors)p.negativeFillColors=
37
+ l;if(l=g.compareGraphFillAlphas)p.fillAlphas=l;if(l=g.compareGraphNegativeFillAlphas)p.negativeFillAlphas=l;if(l=g.compareGraphBullet)p.bullet=l;if(l=g.compareGraphNumberFormatter)p.numberFormatter=l;l=g.compareGraphPrecision;isNaN(l)||(p.precision=l);if(l=g.compareGraphBalloonText)p.balloonText=l;l=g.compareGraphBulletSize;isNaN(l)||(p.bulletSize=l);l=g.compareGraphBulletAlpha;isNaN(l)||(p.bulletAlpha=l);l=g.compareGraphBulletBorderAlpha;isNaN(l)||(p.bulletBorderAlpha=l);if(l=g.compareGraphBulletBorderColor)p.bulletBorderColor=
38
+ l;l=g.compareGraphBulletBorderThickness;isNaN(l)||(p.bulletBorderThickness=l);p.visibleInLegend=g.compareGraphVisibleInLegend;p.balloonFunction=g.compareGraphBalloonFunction;p.hideBulletsCount=g.hideBulletsCount;p.valueAxis=g.valueAxis;m&&(k&&q?(p.legendValueText=q,p.legendPeriodValueText=t):(x&&(p.legendValueText=x),y&&(p.legendPeriodValueText=y)));c.addGraph(p);this.comparedGraphs.push({graph:p,dataSet:w})}}}m&&(k&&q?(g.legendValueText=q,g.legendPeriodValueText=t):(x&&(g.legendValueText=x),y&&(g.legendPeriodValueText=
39
+ y)))}}}},choosePeriod:function(a,b,c){var d=this.categoryAxesSettings,e=d.groupToPeriods,h=e[a],e=e[a+1],f=AmCharts.extractPeriod(h),f=AmCharts.getPeriodDuration(f.period,f.count),g=b.getTime(),k=c.getTime(),d=d.maxSeries;return(k-g)/f>d&&0<d&&e?this.choosePeriod(a+1,b,c):h},handleCursorChange:function(a){var b=a.target,c=a.position;a=a.zooming;var d=this.chartCursors,e;for(e=0;e<d.length;e++){var h=d[e];h!=b&&c&&(h.isZooming(a),h.previousMousePosition=NaN,h.forceShow=!0,h.setPosition(c,!1))}},getSelections:function(){var a=
40
+ [],b=this.dataSets,c;for(c=0;c<b.length;c++){var d=b[c];d.compared&&a.push(d)}this.comparedDataSets=a;b=this.panels;for(c=0;c<b.length;c++)d=b[c],"never"!=d.recalculateToPercents&&0<a.length?d.hideDrawingIcons(!0):d.drawingIconsEnabled&&d.hideDrawingIcons(!1)},addPanel:function(a){this.panels.push(a);AmCharts.removeChart(a);AmCharts.addChart(a)},addPanelAt:function(a,b){this.panels.splice(b,0,a);AmCharts.removeChart(a);AmCharts.addChart(a)},removePanel:function(a){var b=this.panels,c;for(c=b.length-
41
+ 1;0<=c;c--)if(b[c]==a){var d={type:"panelRemoved",panel:a,chart:this};this.fire(d.type,d);b.splice(c,1);a.destroy();a.clear()}},validateData:function(){this.resetDataParsed();this.updateDataSets();this.mainDataSet.compared=!1;this.updateGraphs();this.updateData();var a=this.dataSetSelector;a&&a.write(a.div)},resetDataParsed:function(){var a=this.dataSets,b;for(b=0;b<a.length;b++)a[b].dataParsed=!1},validateNow:function(){this.skipDefault=!0;this.chartRendered=!1;this.clear(!0);this.write(this.div)},
42
+ hideStockEvents:function(){this.showHideEvents(!1);this.eventsHidden=!0},showStockEvents:function(){this.showHideEvents(!0);this.eventsHidden=!1},showHideEvents:function(a){var b=this.panels,c;for(c=0;c<b.length;c++){var d=b[c].graphs,e;for(e=0;e<d.length;e++){var h=d[e];!0===a?h.showBullets():h.hideBullets()}}},invalidateSize:function(){var a=this;clearTimeout(a.validateTO);var b=setTimeout(function(){a.validateNow()},5);a.validateTO=b},measure:function(){var a=this.div,b=a.offsetWidth,c=a.offsetHeight;
43
+ a.clientHeight&&(b=a.clientWidth,c=a.clientHeight);this.divRealWidth=b;this.divRealHeight=c},clear:function(a){var b=this.panels,c;if(b)for(c=0;c<b.length;c++){var d=b[c];a||(d.cleanChart(),d.destroy());d.clear(a)}(b=this.scrollbarChart)&&b.clear();if(b=this.div)b.innerHTML="";a||(this.div=null,AmCharts.deleteObject(this))}});AmCharts.StockEvent=AmCharts.Class({construct:function(){}});AmCharts.DataSet=AmCharts.Class({construct:function(){this.cname="DataSet";this.fieldMappings=[];this.dataProvider=[];this.agregatedDataProviders=[];this.stockEvents=[];this.compared=!1;this.showInCompare=this.showInSelect=!0}});AmCharts.PeriodSelector=AmCharts.Class({construct:function(a){this.cname="PeriodSelector";this.theme=a;this.createEvents("changed");this.inputFieldsEnabled=!0;this.position="bottom";this.width=180;this.fromText="From: ";this.toText="to: ";this.periodsText="Zoom: ";this.periods=[];this.inputFieldWidth=100;this.dateFormat="DD-MM-YYYY";this.hideOutOfScopePeriods=!0;AmCharts.applyTheme(this,a,this.cname)},zoom:function(a,b){this.inputFieldsEnabled&&(this.startDateField.value=AmCharts.formatDate(a,this.dateFormat),
44
+ this.endDateField.value=AmCharts.formatDate(b,this.dateFormat));this.markButtonAsSelected()},write:function(a){var b=this;a.className="amChartsPeriodSelector";var c=b.width,d=b.position;b.width=void 0;b.position=void 0;AmCharts.applyStyles(a.style,b);b.width=c;b.position=d;b.div=a;a.innerHTML="";c=b.theme;d=b.position;d="top"==d||"bottom"==d?!1:!0;b.vertical=d;var e=0,h=0;if(b.inputFieldsEnabled){var f=document.createElement("div");a.appendChild(f);var g=document.createTextNode(b.fromText);f.appendChild(g);
45
+ d?AmCharts.addBr(f):(f.style.styleFloat="left",f.style.display="inline");var k=document.createElement("input");k.className="amChartsInputField";c&&AmCharts.applyStyles(k.style,c.PeriodInputField);k.style.textAlign="center";k.onblur=function(a){b.handleCalChange(a)};AmCharts.isNN&&k.addEventListener("keypress",function(a){b.handleCalendarChange.call(b,a)},!0);AmCharts.isIE&&k.attachEvent("onkeypress",function(a){b.handleCalendarChange.call(b,a)});f.appendChild(k);b.startDateField=k;if(d)g=b.width-
46
+ 6+"px",AmCharts.addBr(f);else{var g=b.inputFieldWidth+"px",m=document.createTextNode(" ");f.appendChild(m)}k.style.width=g;k=document.createTextNode(b.toText);f.appendChild(k);d&&AmCharts.addBr(f);k=document.createElement("input");k.className="amChartsInputField";c&&AmCharts.applyStyles(k.style,c.PeriodInputField);k.style.textAlign="center";k.onblur=function(){b.handleCalChange()};AmCharts.isNN&&k.addEventListener("keypress",function(a){b.handleCalendarChange.call(b,a)},!0);AmCharts.isIE&&k.attachEvent("onkeypress",
47
+ function(a){b.handleCalendarChange.call(b,a)});f.appendChild(k);b.endDateField=k;d?AmCharts.addBr(f):e=k.offsetHeight+2;g&&(k.style.width=g)}f=b.periods;if(AmCharts.ifArray(f)){g=document.createElement("div");d||(g.style.cssFloat="right",g.style.styleFloat="right",g.style.display="inline");a.appendChild(g);d&&AmCharts.addBr(g);a=document.createTextNode(b.periodsText);g.appendChild(a);b.periodContainer=g;var q;for(a=0;a<f.length;a++)k=f[a],q=document.createElement("input"),q.type="button",q.value=
48
+ k.label,q.period=k.period,q.count=k.count,q.periodObj=k,q.className="amChartsButton",c&&AmCharts.applyStyles(q.style,c.PeriodButton),d&&(q.style.width=b.width-1+"px"),q.style.boxSizing="border-box",g.appendChild(q),b.addEventListeners(q),k.button=q;!d&&q&&(h=q.offsetHeight);b.offsetHeight=Math.max(e,h)}},addEventListeners:function(a){var b=this;AmCharts.isNN&&a.addEventListener("click",function(a){b.handlePeriodChange.call(b,a)},!0);AmCharts.isIE&&a.attachEvent("onclick",function(a){b.handlePeriodChange.call(b,
49
+ a)})},getPeriodDates:function(){var a=this.periods,b;for(b=0;b<a.length;b++)this.selectPeriodButton(a[b],!0)},handleCalendarChange:function(a){13==a.keyCode&&this.handleCalChange(a)},handleCalChange:function(a){var b=this.dateFormat,c=AmCharts.stringToDate(this.startDateField.value,b),b=this.chart.getLastDate(AmCharts.stringToDate(this.endDateField.value,b));try{this.startDateField.blur(),this.endDateField.blur()}catch(d){}if(c&&b){var e={type:"changed"};e.startDate=c;e.endDate=b;e.chart=this.chart;
50
+ e.event=a;this.fire(e.type,e)}},handlePeriodChange:function(a){this.selectPeriodButton((a.srcElement?a.srcElement:a.target).periodObj,!1,a)},setRanges:function(a,b){this.firstDate=a;this.lastDate=b;this.getPeriodDates()},selectPeriodButton:function(a,b,c){var d=a.button,e=d.count,h=d.period,f,g,k=this.firstDate,m=this.lastDate,q,x=this.theme;k&&m&&("MAX"==h?(f=k,g=m):"YTD"==h?(f=new Date,f.setMonth(0,1),f.setHours(0,0,0,0),0===e&&f.setDate(f.getDate()-1),g=this.lastDate):"YYYY"==h||"MM"==h?this.selectFromStart?
51
+ (f=k,g=new Date(k),g.setMonth(g.getMonth()+e)):(f=new Date(m),AmCharts.changeDate(f,h,e,!1),f.setDate(f.getDate()-1),g=m):(q=AmCharts.getPeriodDuration(h,e),this.selectFromStart?(f=k,g=new Date(k.getTime()+q-1)):(f=new Date(m.getTime()-q+1),g=m)),a.startTime=f.getTime(),this.hideOutOfScopePeriods&&(b&&a.startTime<k.getTime()?d.style.display="none":d.style.display="inline"),f.getTime()>m.getTime()&&(q=AmCharts.getPeriodDuration("DD",1),f=new Date(m.getTime()-q)),f.getTime()<k.getTime()&&(f=k),"YTD"==
52
+ h&&(a.startTime=f.getTime()),a.endTime=g.getTime(),b||(this.skipMark=!0,this.unselectButtons(),d.className="amChartsButtonSelected",x&&AmCharts.applyStyles(d.style,x.PeriodButtonSelected),a={type:"changed"},a.startDate=f,a.endDate=g,a.predefinedPeriod=h,a.chart=this.chart,a.count=e,a.event=c,this.fire(a.type,a)))},markButtonAsSelected:function(){if(!this.skipMark){var a=this.chart,b=this.periods,c=a.startDate.getTime(),a=a.endDate.getTime(),d=this.theme;this.unselectButtons();var e;for(e=b.length-
53
+ 1;0<=e;e--){var h=b[e],f=h.button;h.startTime&&h.endTime&&c==h.startTime&&a==h.endTime&&(this.unselectButtons(),f.className="amChartsButtonSelected",d&&AmCharts.applyStyles(f.style,d.PeriodButtonSelected))}}this.skipMark=!1},unselectButtons:function(){var a=this.periods,b,c=this.theme;for(b=a.length-1;0<=b;b--){var d=a[b].button;d.className="amChartsButton";c&&AmCharts.applyStyles(d.style,c.PeriodButton)}},setDefaultPeriod:function(){var a=this.periods,b;for(b=0;b<a.length;b++){var c=a[b];c.selected&&
54
+ this.selectPeriodButton(c)}}});AmCharts.StockGraph=AmCharts.Class({inherits:AmCharts.AmGraph,construct:function(a){AmCharts.StockGraph.base.construct.call(this,a);this.cname="StockGraph";this.useDataSetColors=!0;this.periodValue="Close";this.compareGraphType="line";this.compareGraphVisibleInLegend=!0;this.comparable=this.resetTitleOnDataSetChange=!1;this.comparedGraphs={};this.showEventsOnComparedGraphs=!1;AmCharts.applyTheme(this,a,this.cname)}});AmCharts.StockPanel=AmCharts.Class({inherits:AmCharts.AmSerialChart,construct:function(a){AmCharts.StockPanel.base.construct.call(this,a);this.cname="StockPanel";this.theme=a;this.showCategoryAxis=!0;this.recalculateToPercents="whenComparing";this.panelHeaderPaddingBottom=this.panelHeaderPaddingLeft=this.panelHeaderPaddingRight=this.panelHeaderPaddingTop=0;this.trendLineAlpha=1;this.trendLineColor="#00CC00";this.trendLineColorHover="#CC0000";this.trendLineThickness=2;this.trendLineDashLength=0;this.stockGraphs=
55
+ [];this.drawingIconsEnabled=!1;this.iconSize=18;this.autoMargins=this.allowTurningOff=this.eraseAll=this.erasingEnabled=this.drawingEnabled=!1;AmCharts.applyTheme(this,a,this.cname)},initChart:function(a){AmCharts.StockPanel.base.initChart.call(this,a);this.drawingIconsEnabled&&this.createDrawIcons();(a=this.chartCursor)&&this.listenTo(a,"draw",this.handleDraw)},addStockGraph:function(a){this.stockGraphs.push(a);return a},removeStockGraph:function(a){var b=this.stockGraphs,c;for(c=b.length-1;0<=c;c--)b[c]==
56
+ a&&b.splice(c,1)},createDrawIcons:function(){var a=this,b=a.iconSize,c=a.container,d=a.pathToImages,e=a.realWidth-2*b-1-a.marginRight,h=AmCharts.rect(c,b,b,"#000",0.005),f=AmCharts.rect(c,b,b,"#000",0.005);f.translate(b+1,0);var g=c.image(d+"pencilIcon.gif",0,0,b,b);a.pencilButton=g;f.setAttr("cursor","pointer");h.setAttr("cursor","pointer");h.mouseup(function(){a.handlePencilClick()});var k=c.image(d+"pencilIconH.gif",0,0,b,b);a.pencilButtonPushed=k;a.drawingEnabled||k.hide();var m=c.image(d+"eraserIcon.gif",
57
+ b+1,0,b,b);a.eraserButton=m;f.mouseup(function(){a.handleEraserClick()});h.touchend&&(h.touchend(function(){a.handlePencilClick()}),f.touchend(function(){a.handleEraserClick()}));b=c.image(d+"eraserIconH.gif",b+1,0,b,b);a.eraserButtonPushed=b;a.erasingEnabled||b.hide();c=c.set([g,k,m,b,h,f]);c.translate(e,1);this.hideIcons&&c.hide()},handlePencilClick:function(){var a=!this.drawingEnabled;this.disableDrawing(!a);this.erasingEnabled=!1;this.eraserButtonPushed.hide();a?this.pencilButtonPushed.show():
56
58
  (this.pencilButtonPushed.hide(),this.setMouseCursor("auto"))},disableDrawing:function(a){this.drawingEnabled=!a;var b=this.chartCursor;this.stockChart.enableCursors(a);b&&b.enableDrawing(!a)},handleEraserClick:function(){this.disableDrawing(!0);this.pencilButtonPushed.hide();if(this.eraseAll){var a=this.trendLines,b;for(b=a.length-1;0<=b;b--){var c=a[b];c.isProtected||this.removeTrendLine(c)}this.validateNow()}else(this.erasingEnabled=a=!this.erasingEnabled)?(this.eraserButtonPushed.show(),this.setTrendColorHover(this.trendLineColorHover),
57
- this.setMouseCursor("auto")):(this.eraserButtonPushed.hide(),this.setTrendColorHover())},setTrendColorHover:function(a){var b=this.trendLines,c;for(c=b.length-1;0<=c;c--){var d=b[c];d.isProtected||(d.rollOverColor=a)}},handleDraw:function(a){var b=this.drawOnAxis;AmCharts.isString(b)&&(b=this.getValueAxisById(b));b||(b=this.valueAxes[0]);this.drawOnAxis=b;var c=this.categoryAxis,d=a.initialX,e=a.finalX,g=a.initialY;a=a.finalY;var h=new AmCharts.TrendLine;h.initialDate=c.coordinateToDate(d);h.finalDate=
58
- c.coordinateToDate(e);h.initialValue=b.coordinateToValue(g);h.finalValue=b.coordinateToValue(a);h.lineAlpha=this.trendLineAlpha;h.lineColor=this.trendLineColor;h.lineThickness=this.trendLineThickness;h.dashLength=this.trendLineDashLength;h.valueAxis=b;h.categoryAxis=c;this.addTrendLine(h);this.listenTo(h,"click",this.handleTrendClick);this.validateNow()},hideDrawingIcons:function(a){(this.hideIcons=a)&&this.disableDrawing(a)},handleTrendClick:function(a){this.erasingEnabled&&(a=a.trendLine,this.eraseAll||
59
- a.isProtected||this.removeTrendLine(a),this.validateNow())}});AmCharts.CategoryAxesSettings=AmCharts.Class({construct:function(){this.minPeriod="DD";this.equalSpacing=!1;this.axisHeight=28;this.tickLength=this.axisAlpha=0;this.gridCount=10;this.maxSeries=150;this.groupToPeriods="ss 10ss 30ss mm 10mm 30mm hh DD WW MM YYYY".split(" ");this.autoGridCount=!0}});AmCharts.ChartCursorSettings=AmCharts.Class({construct:function(){this.enabled=!0;this.bulletsEnabled=this.valueBalloonsEnabled=!1;this.categoryBalloonDateFormats=[{period:"YYYY",format:"YYYY"},{period:"MM",format:"MMM, YYYY"},{period:"WW",format:"MMM DD, YYYY"},{period:"DD",format:"MMM DD, YYYY"},{period:"hh",format:"JJ:NN"},{period:"mm",format:"JJ:NN"},{period:"ss",format:"JJ:NN:SS"},{period:"fff",format:"JJ:NN:SS"}]},categoryBalloonDateFormat:function(a){var b=this.categoryBalloonDateFormats,c,
60
- d;for(d=0;d<b.length;d++)b[d].period==a&&(c=b[d].format);return c}});AmCharts.ChartScrollbarSettings=AmCharts.Class({construct:function(){this.height=40;this.enabled=!0;this.color="#FFFFFF";this.updateOnReleaseOnly=this.autoGridCount=!0;this.hideResizeGrips=!1;this.position="bottom"}});AmCharts.LegendSettings=AmCharts.Class({construct:function(){this.marginBottom=this.marginTop=0;this.usePositiveNegativeOnPercentsOnly=!0;this.positiveValueColor="#00CC00";this.negativeValueColor="#CC0000";this.autoMargins=this.equalWidths=this.textClickEnabled=!1}});AmCharts.PanelsSettings=AmCharts.Class({construct:function(){this.marginBottom=this.marginTop=this.marginRight=this.marginLeft=0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.panelSpacing=8;this.panEventsEnabled=!1}});AmCharts.StockEventsSettings=AmCharts.Class({construct:function(){this.type="sign";this.backgroundAlpha=1;this.backgroundColor="#DADADA";this.borderAlpha=1;this.borderColor="#888888";this.balloonColor=this.rollOverColor="#CC0000"}});AmCharts.ValueAxesSettings=AmCharts.Class({construct:function(){this.tickLength=0;this.showFirstLabel=this.autoGridCount=this.inside=!0;this.showLastLabel=!1;this.axisAlpha=0}});AmCharts.getItemIndex=function(a,b){var c=-1,d;for(d=0;d<b.length;d++)a==b[d]&&(c=d);return c};AmCharts.addBr=function(a){a.appendChild(document.createElement("br"))};
61
- AmCharts.parseStockData=function(a,b,c,d,e){(new Date).getTime();var g={},h=a.dataProvider,f=a.categoryField;if(f){var m=AmCharts.getItemIndex(b,c),k=c.length,u,y=h.length,r,x={};for(u=m;u<k;u++)r=c[u],g[r]=[];var s={},n=a.fieldMappings,w=n.length;for(u=0;u<y;u++){var p=h[u],l=p[f],l=l instanceof Date?"fff"==b?AmCharts.useUTC?new Date(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate(),l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()):new Date(l.getFullYear(),l.getMonth(),
62
- l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()):new Date(l):e?AmCharts.stringToDate(l,e):new Date(l),D=l.getTime(),A={};for(r=0;r<w;r++)A[n[r].toField]=p[n[r].fromField];var z;for(z=m;z<k;z++){r=c[z];var B=AmCharts.extractPeriod(r),C=B.period,B=B.count,v,t,q;if(z==m||D>=x[r]||!x[r]){s[r]={};s[r].amCategoryIdField=String(AmCharts.resetDateToMin(l,C,B,d).getTime());var E;for(E=0;E<w;E++)v=n[E].toField,t=s[r],q=Number(A[v]),t[v+"Count"]=0,t[v+"Sum"]=0,isNaN(q)||(t[v+"Open"]=
63
- q,t[v+"Sum"]=q,t[v+"High"]=q,t[v+"Low"]=q,t[v+"Close"]=q,t[v+"Count"]=1,t[v+"Average"]=q);g[r].push(s[r]);z>m&&(t=new Date(l),t=AmCharts.changeDate(t,C,B,!0),t=AmCharts.resetDateToMin(t,C,B,d),x[r]=t.getTime());if(z==m)for(var F in p)p.hasOwnProperty(F)&&(s[r][F]=p[F]);s[r][f]=new Date(l)}else for(C=0;C<w;C++)v=n[C].toField,t=s[r],u==y-1&&(t[f]=new Date(l)),q=Number(A[v]),isNaN(q)||(isNaN(t[v+"Low"])&&(t[v+"Low"]=q),q<t[v+"Low"]&&(t[v+"Low"]=q),isNaN(t[v+"High"])&&(t[v+"High"]=q),q>t[v+"High"]&&(t[v+
64
- "High"]=q),t[v+"Close"]=q,t[v+"Sum"]+=q,t[v+"Count"]++,t[v+"Average"]=t[v+"Sum"]/t[v+"Count"])}}}a.agregatedDataProviders=g};
65
- AmCharts.parseEvents=function(a,b,c,d,e,g){var h=a.stockEvents,f=a.agregatedDataProviders,m=b.length,k,u,y,r,x,s,n,w;for(k=0;k<m;k++){s=b[k];x=s.graphs;y=x.length;var p;for(u=0;u<y;u++)r=x[u],r.customBulletField="amCustomBullet"+r.id+"_"+s.id,r.bulletConfigField="amCustomBulletConfig"+r.id+"_"+s.id;for(var l=0;l<h.length;l++)if(n=h[l],p=n.graph,AmCharts.isString(p)&&(p=AmCharts.getObjById(x,p)))n.graph=p}for(var D in f)if(f.hasOwnProperty(D)){p=f[D];var A=AmCharts.extractPeriod(D),z=p.length,B;for(B=
66
- 0;B<z;B++){var C=p[B];k=C[a.categoryField];w=k instanceof Date;g&&!w&&(k=AmCharts.stringToDate(k,g));var v=k.getTime();x=A.period;var l=A.count,t;t="fff"==x?k.getTime()+1:AmCharts.resetDateToMin(AmCharts.changeDate(new Date(k),A.period,A.count),x,l,d).getTime();for(k=0;k<m;k++)for(s=b[k],x=s.graphs,y=x.length,u=0;u<y;u++){r=x[u];var q={};q.eventDispatcher=e;q.eventObjects=[];q.letters=[];q.descriptions=[];q.shapes=[];q.backgroundColors=[];q.backgroundAlphas=[];q.borderColors=[];q.borderAlphas=[];
67
- q.colors=[];q.rollOverColors=[];q.showOnAxis=[];for(l=0;l<h.length;l++){n=h[l];w=n.date instanceof Date;g&&!w&&(n.date=AmCharts.stringToDate(n.date,g));w=n.date.getTime();var E=!1;n.graph&&(n.graph.showEventsOnComparedGraphs&&n.graph.comparedGraphs[a.id]&&(E=!0),(r==n.graph||E)&&w>=v&&w<t&&(q.eventObjects.push(n),q.letters.push(n.text),q.descriptions.push(n.description),n.type?q.shapes.push(n.type):q.shapes.push(c.type),void 0!==n.backgroundColor?q.backgroundColors.push(n.backgroundColor):q.backgroundColors.push(c.backgroundColor),
68
- isNaN(n.backgroundAlpha)?q.backgroundAlphas.push(c.backgroundAlpha):q.backgroundAlphas.push(n.backgroundAlpha),isNaN(n.borderAlpha)?q.borderAlphas.push(c.borderAlpha):q.borderAlphas.push(n.borderAlpha),void 0!==n.borderColor?q.borderColors.push(n.borderColor):q.borderColors.push(c.borderColor),void 0!==n.rollOverColor?q.rollOverColors.push(n.rollOverColor):q.rollOverColors.push(c.rollOverColor),q.colors.push(n.color),!n.panel&&n.graph&&(n.panel=n.graph.chart),q.showOnAxis.push(n.showOnAxis),q.date=
69
- new Date(n.date)));0<q.shapes.length&&(n="amCustomBullet"+r.id+"_"+s.id,w="amCustomBulletConfig"+r.id+"_"+s.id,C[n]=AmCharts.StackedBullet,C[w]=q)}}}}};AmCharts.StockLegend=AmCharts.Class({inherits:AmCharts.AmLegend,construct:function(){AmCharts.StockLegend.base.construct.call(this);this.valueTextComparing="[[percents.value]]%";this.valueTextRegular="[[value]]"},drawLegend:function(){var a=this;AmCharts.StockLegend.base.drawLegend.call(a);var b=a.chart;if(b.allowTurningOff){var c=a.container,d=c.image(b.pathToImages+"xIcon.gif",b.realWidth-17,3,17,17),b=c.image(b.pathToImages+"xIconH.gif",b.realWidth-17,3,17,17);b.hide();a.xButtonHover=b;d.mouseup(function(){a.handleXClick()}).mouseover(function(){a.handleXOver()});
70
- b.mouseup(function(){a.handleXClick()}).mouseout(function(){a.handleXOut()})}},handleXOver:function(){this.xButtonHover.show()},handleXOut:function(){this.xButtonHover.hide()},handleXClick:function(){var a=this.chart,b=a.stockChart;b.removePanel(a);b.validateNow()}});AmCharts.DataSetSelector=AmCharts.Class({construct:function(){this.createEvents("dataSetSelected","dataSetCompared","dataSetUncompared");this.position="left";this.selectText="Select:";this.comboBoxSelectText="Select...";this.compareText="Compare to:";this.width=180;this.dataProvider=[];this.listHeight=150;this.listCheckBoxSize=14;this.rollOverBackgroundColor="#b2e1ff";this.selectedBackgroundColor="#7fceff"},write:function(a){var b=this,c;a.className="amChartsDataSetSelector";b.div=a;a.innerHTML="";
71
- var d=b.position,e;e="top"==d||"bottom"==d?!1:!0;b.vertical=e;var g;e&&(g=b.width+"px");var d=b.dataProvider,h,f;if(1<b.countDataSets("showInSelect")){c=document.createTextNode(b.selectText);a.appendChild(c);e&&AmCharts.addBr(a);var m=document.createElement("select");g&&(m.style.width=g);b.selectCB=m;a.appendChild(m);AmCharts.isNN&&m.addEventListener("change",function(a){b.handleDataSetChange.call(b,a)},!0);AmCharts.isIE&&m.attachEvent("onchange",function(a){b.handleDataSetChange.call(b,a)});for(c=
72
- 0;c<d.length;c++)if(h=d[c],!0===h.showInSelect){f=document.createElement("option");f.text=h.title;f.value=c;h==b.chart.mainDataSet&&(f.selected=!0);try{m.add(f,null)}catch(k){m.add(f)}}b.offsetHeight=m.offsetHeight}if(0<b.countDataSets("showInCompare")&&1<d.length)if(e?(AmCharts.addBr(a),AmCharts.addBr(a)):(c=document.createTextNode(" "),a.appendChild(c)),c=document.createTextNode(b.compareText),a.appendChild(c),f=b.listCheckBoxSize,e){AmCharts.addBr(a);g=document.createElement("div");a.appendChild(g);
73
- g.className="amChartsCompareList";g.style.overflow="auto";g.style.overflowX="hidden";g.style.width=b.width-2+"px";g.style.maxHeight=b.listHeight+"px";for(c=0;c<d.length;c++)h=d[c],!0===h.showInCompare&&h!=b.chart.mainDataSet&&(e=document.createElement("div"),e.style.padding="4px",e.style.position="relative",e.name="amCBContainer",e.dataSet=h,e.style.height=f+"px",h.compared&&(e.style.backgroundColor=b.selectedBackgroundColor),g.appendChild(e),m=document.createElement("div"),m.style.width=f+"px",m.style.height=
74
- f+"px",m.style.position="absolute",m.style.backgroundColor=h.color,e.appendChild(m),m=document.createElement("div"),m.style.width="100%",m.style.position="absolute",m.style.left=f+10+"px",e.appendChild(m),h=document.createTextNode(h.title),m.style.whiteSpace="nowrap",m.style.cursor="default",m.appendChild(h),b.addEventListeners(e));AmCharts.addBr(a);AmCharts.addBr(a)}else{e=document.createElement("select");b.compareCB=e;g&&(e.style.width=g);a.appendChild(e);AmCharts.isNN&&e.addEventListener("change",
75
- function(a){b.handleCBSelect.call(b,a)},!0);AmCharts.isIE&&e.attachEvent("onchange",function(a){b.handleCBSelect.call(b,a)});f=document.createElement("option");f.text=b.comboBoxSelectText;try{e.add(f,null)}catch(u){e.add(f)}for(c=0;c<d.length;c++)if(h=d[c],!0===h.showInCompare&&h!=b.chart.mainDataSet){f=document.createElement("option");f.text=h.title;f.value=c;h.compared&&(f.selected=!0);try{e.add(f,null)}catch(y){e.add(f)}}b.offsetHeight=e.offsetHeight}},addEventListeners:function(a){var b=this;
76
- AmCharts.isNN&&(a.addEventListener("mouseover",function(a){b.handleRollOver.call(b,a)},!0),a.addEventListener("mouseout",function(a){b.handleRollOut.call(b,a)},!0),a.addEventListener("click",function(a){b.handleClick.call(b,a)},!0));AmCharts.isIE&&(a.attachEvent("onmouseout",function(a){b.handleRollOut.call(b,a)}),a.attachEvent("onmouseover",function(a){b.handleRollOver.call(b,a)}),a.attachEvent("onclick",function(a){b.handleClick.call(b,a)}))},handleDataSetChange:function(){var a=this.selectCB,a=
77
- this.dataProvider[a.options[a.selectedIndex].value],b=this.chart;b.mainDataSet=a;b.zoomOutOnDataSetChange&&(b.startDate=void 0,b.endDate=void 0);b.validateData();a={type:"dataSetSelected",dataSet:a,chart:this.chart};this.fire(a.type,a)},handleRollOver:function(a){a=this.getRealDiv(a);a.dataSet.compared||(a.style.backgroundColor=this.rollOverBackgroundColor)},handleRollOut:function(a){a=this.getRealDiv(a);a.dataSet.compared||(a.style.removeProperty&&a.style.removeProperty("background-color"),a.style.removeAttribute&&
78
- a.style.removeAttribute("backgroundColor"))},handleCBSelect:function(a){var b=this.compareCB,c=this.dataProvider,d,e;for(d=0;d<c.length;d++)e=c[d],e.compared&&(a={type:"dataSetUncompared",dataSet:e}),e.compared=!1;c=b.selectedIndex;0<c&&(e=this.dataProvider[b.options[c].value],e.compared||(a={type:"dataSetCompared",dataSet:e}),e.compared=!0);b=this.chart;b.validateData();a.chart=b;this.fire(a.type,a)},handleClick:function(a){a=this.getRealDiv(a).dataSet;!0===a.compared?(a.compared=!1,a={type:"dataSetUncompared",
79
- dataSet:a}):(a.compared=!0,a={type:"dataSetCompared",dataSet:a});var b=this.chart;b.validateData();a.chart=b;this.fire(a.type,a)},getRealDiv:function(a){a||(a=window.event);a=a.currentTarget?a.currentTarget:a.srcElement;"amCBContainer"==a.parentNode.name&&(a=a.parentNode);return a},countDataSets:function(a){var b=this.dataProvider,c=0,d;for(d=0;d<b.length;d++)!0===b[d][a]&&c++;return c}});AmCharts.StackedBullet=AmCharts.Class({construct:function(){this.fontSize=11;this.stackDown=!1;this.mastHeight=8;this.shapes=[];this.backgroundColors=[];this.backgroundAlphas=[];this.borderAlphas=[];this.borderColors=[];this.colors=[];this.rollOverColors=[];this.showOnAxiss=[];this.textColor="#000000";this.nextY=0;this.size=16},parseConfig:function(){var a=this.bulletConfig;this.eventObjects=a.eventObjects;this.letters=a.letters;this.shapes=a.shapes;this.backgroundColors=a.backgroundColors;this.backgroundAlphas=
59
+ this.setMouseCursor("auto")):(this.eraserButtonPushed.hide(),this.setTrendColorHover())},setTrendColorHover:function(a){var b=this.trendLines,c;for(c=b.length-1;0<=c;c--){var d=b[c];d.isProtected||(d.rollOverColor=a)}},handleDraw:function(a){var b=this.drawOnAxis;AmCharts.isString(b)&&(b=this.getValueAxisById(b));b||(b=this.valueAxes[0]);this.drawOnAxis=b;var c=this.categoryAxis,d=a.initialX,e=a.finalX,h=a.initialY;a=a.finalY;var f=new AmCharts.TrendLine(this.theme);f.initialDate=c.coordinateToDate(d);
60
+ f.finalDate=c.coordinateToDate(e);f.initialValue=b.coordinateToValue(h);f.finalValue=b.coordinateToValue(a);f.lineAlpha=this.trendLineAlpha;f.lineColor=this.trendLineColor;f.lineThickness=this.trendLineThickness;f.dashLength=this.trendLineDashLength;f.valueAxis=b;f.categoryAxis=c;this.addTrendLine(f);this.listenTo(f,"click",this.handleTrendClick);this.validateNow()},hideDrawingIcons:function(a){(this.hideIcons=a)&&this.disableDrawing(a)},handleTrendClick:function(a){this.erasingEnabled&&(a=a.trendLine,
61
+ this.eraseAll||a.isProtected||this.removeTrendLine(a),this.validateNow())},handleWheelReal:function(a,b){var c=this.scrollbarChart;if(!this.wheelBusy&&c){var d=1;b&&(d=-1);var c=c.chartScrollbar,e=this.categoryAxis.minDuration();0>a?(d=this.startTime+d*e,e=this.endTime+1*e):(d=this.startTime-d*e,e=this.endTime-1*e);d<this.firstTime&&(d=this.firstTime);e>this.lastTime&&(e=this.lastTime);d<e&&c.timeZoom(d,e,!0)}}});AmCharts.CategoryAxesSettings=AmCharts.Class({construct:function(a){this.cname="CategoryAxesSettings";this.minPeriod="DD";this.equalSpacing=!1;this.axisHeight=28;this.tickLength=this.axisAlpha=0;this.gridCount=10;this.maxSeries=150;this.groupToPeriods="ss 10ss 30ss mm 10mm 30mm hh DD WW MM YYYY".split(" ");this.markPeriodChange=this.autoGridCount=!0;AmCharts.applyTheme(this,a,this.cname)}});AmCharts.ChartCursorSettings=AmCharts.Class({construct:function(a){this.cname="ChartCursorSettings";this.enabled=!0;this.bulletsEnabled=this.valueBalloonsEnabled=!1;this.categoryBalloonDateFormats=[{period:"YYYY",format:"YYYY"},{period:"MM",format:"MMM, YYYY"},{period:"WW",format:"MMM DD, YYYY"},{period:"DD",format:"MMM DD, YYYY"},{period:"hh",format:"JJ:NN"},{period:"mm",format:"JJ:NN"},{period:"ss",format:"JJ:NN:SS"},{period:"fff",format:"JJ:NN:SS"}];AmCharts.applyTheme(this,a,this.cname)},categoryBalloonDateFormat:function(a){var b=
62
+ this.categoryBalloonDateFormats,c,d;for(d=0;d<b.length;d++)b[d].period==a&&(c=b[d].format);return c}});AmCharts.ChartScrollbarSettings=AmCharts.Class({construct:function(a){this.cname="ChartScrollbarSettings";this.height=40;this.enabled=!0;this.color="#FFFFFF";this.updateOnReleaseOnly=this.autoGridCount=!0;this.hideResizeGrips=!1;this.position="bottom";AmCharts.applyTheme(this,a,this.cname)}});AmCharts.LegendSettings=AmCharts.Class({construct:function(a){this.cname="LegendSettings";this.marginBottom=this.marginTop=0;this.usePositiveNegativeOnPercentsOnly=!0;this.positiveValueColor="#00CC00";this.negativeValueColor="#CC0000";this.autoMargins=this.equalWidths=this.textClickEnabled=!1;AmCharts.applyTheme(this,a,this.cname)}});AmCharts.PanelsSettings=AmCharts.Class({construct:function(a){this.cname="PanelsSettings";this.marginBottom=this.marginTop=this.marginRight=this.marginLeft=0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.panelSpacing=8;this.panEventsEnabled=!0;this.creditsPosition="top-right";AmCharts.applyTheme(this,a,this.cname)}});AmCharts.StockEventsSettings=AmCharts.Class({construct:function(a){this.cname="StockEventsSettings";this.type="sign";this.backgroundAlpha=1;this.backgroundColor="#DADADA";this.borderAlpha=1;this.borderColor="#888888";this.balloonColor=this.rollOverColor="#CC0000";AmCharts.applyTheme(this,a,this.cname)}});AmCharts.ValueAxesSettings=AmCharts.Class({construct:function(a){this.cname="ValueAxesSettings";this.tickLength=0;this.showFirstLabel=this.autoGridCount=this.inside=!0;this.showLastLabel=!1;this.axisAlpha=0;AmCharts.applyTheme(this,a,this.cname)}});AmCharts.getItemIndex=function(a,b){var c=-1,d;for(d=0;d<b.length;d++)a==b[d]&&(c=d);return c};AmCharts.addBr=function(a){a.appendChild(document.createElement("br"))};AmCharts.applyStyles=function(a,b){if(b&&a)for(var c in a){var d=c,e=b[d];if(void 0!==e)try{a[d]=e}catch(h){}}};
63
+ AmCharts.parseStockData=function(a,b,c,d,e){(new Date).getTime();var h={},f=a.dataProvider,g=a.categoryField;if(g){var k=AmCharts.getItemIndex(b,c),m=c.length,q,x=f.length,t,y={};for(q=k;q<m;q++)t=c[q],h[t]=[];var u={},n=a.fieldMappings,w=n.length;for(q=0;q<x;q++){var p=f[q],l=p[g],l=l instanceof Date?"fff"==b?AmCharts.useUTC?new Date(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate(),l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()):new Date(l.getFullYear(),l.getMonth(),
64
+ l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()):new Date(l):e?AmCharts.stringToDate(l,e):new Date(l),D=l.getTime(),A={};for(t=0;t<w;t++)A[n[t].toField]=p[n[t].fromField];var z;for(z=k;z<m;z++){t=c[z];var s=AmCharts.extractPeriod(t),B=s.period,E=s.count,v,r;if(z==k||D>=y[t]||!y[t]){u[t]={};u[t].amCategoryIdField=String(AmCharts.resetDateToMin(l,B,E,d).getTime());var C;for(C=0;C<w;C++)s=n[C].toField,v=u[t],r=Number(A[s]),v[s+"Count"]=0,v[s+"Sum"]=0,isNaN(r)||(v[s+"Open"]=
65
+ r,v[s+"Sum"]=r,v[s+"High"]=r,v[s+"Low"]=r,v[s+"Close"]=r,v[s+"Count"]=1,v[s+"Average"]=r);v.dataContext=p;h[t].push(u[t]);z>k&&(s=new Date(l),s=AmCharts.changeDate(s,B,E,!0),s=AmCharts.resetDateToMin(s,B,E,d),y[t]=s.getTime());if(z==k)for(var F in p)p.hasOwnProperty(F)&&(u[t][F]=p[F]);u[t][g]=new Date(l)}else for(B=0;B<w;B++)s=n[B].toField,v=u[t],q==x-1&&(v[g]=new Date(l)),r=Number(A[s]),isNaN(r)||(isNaN(v[s+"Low"])&&(v[s+"Low"]=r),r<v[s+"Low"]&&(v[s+"Low"]=r),isNaN(v[s+"High"])&&(v[s+"High"]=r),
66
+ r>v[s+"High"]&&(v[s+"High"]=r),v[s+"Close"]=r,E=AmCharts.getDecimals(v[s+"Sum"]),C=AmCharts.getDecimals(r),v[s+"Sum"]+=r,v[s+"Sum"]=AmCharts.roundTo(v[s+"Sum"],Math.max(E,C)),v[s+"Count"]++,v[s+"Average"]=v[s+"Sum"]/v[s+"Count"])}}}a.agregatedDataProviders=h};
67
+ AmCharts.parseEvents=function(a,b,c,d,e,h){var f=a.stockEvents,g=a.agregatedDataProviders,k=b.length,m,q,x,t,y,u,n,w;for(m=0;m<k;m++){u=b[m];y=u.graphs;x=y.length;var p;for(q=0;q<x;q++)t=y[q],t.customBulletField="amCustomBullet"+t.id+"_"+u.id,t.bulletConfigField="amCustomBulletConfig"+t.id+"_"+u.id;for(var l=0;l<f.length;l++)if(n=f[l],p=n.graph,AmCharts.isString(p)&&(p=AmCharts.getObjById(y,p)))n.graph=p}for(var D in g)if(g.hasOwnProperty(D)){p=g[D];var A=AmCharts.extractPeriod(D),z=p.length,s;for(s=
68
+ 0;s<z;s++){var B=p[s];m=B[a.categoryField];w=m instanceof Date;h&&!w&&(m=AmCharts.stringToDate(m,h));var E=m.getTime();y=A.period;var l=A.count,v;v="fff"==y?m.getTime()+1:AmCharts.resetDateToMin(AmCharts.changeDate(new Date(m),A.period,A.count),y,l,d).getTime();for(m=0;m<k;m++)for(u=b[m],y=u.graphs,x=y.length,q=0;q<x;q++){t=y[q];var r={};r.eventDispatcher=e;r.eventObjects=[];r.letters=[];r.descriptions=[];r.shapes=[];r.backgroundColors=[];r.backgroundAlphas=[];r.borderColors=[];r.borderAlphas=[];
69
+ r.colors=[];r.rollOverColors=[];r.showOnAxis=[];for(l=0;l<f.length;l++){n=f[l];w=n.date instanceof Date;h&&!w&&(n.date=AmCharts.stringToDate(n.date,h));w=n.date.getTime();var C=!1;n.graph&&(n.graph.showEventsOnComparedGraphs&&n.graph.comparedGraphs[a.id]&&(C=!0),(t==n.graph||C)&&w>=E&&w<v&&(r.eventObjects.push(n),r.letters.push(n.text),r.descriptions.push(n.description),n.type?r.shapes.push(n.type):r.shapes.push(c.type),void 0!==n.backgroundColor?r.backgroundColors.push(n.backgroundColor):r.backgroundColors.push(c.backgroundColor),
70
+ isNaN(n.backgroundAlpha)?r.backgroundAlphas.push(c.backgroundAlpha):r.backgroundAlphas.push(n.backgroundAlpha),isNaN(n.borderAlpha)?r.borderAlphas.push(c.borderAlpha):r.borderAlphas.push(n.borderAlpha),void 0!==n.borderColor?r.borderColors.push(n.borderColor):r.borderColors.push(c.borderColor),void 0!==n.rollOverColor?r.rollOverColors.push(n.rollOverColor):r.rollOverColors.push(c.rollOverColor),r.colors.push(n.color),!n.panel&&n.graph&&(n.panel=n.graph.chart),r.showOnAxis.push(n.showOnAxis),r.date=
71
+ new Date(n.date)));0<r.shapes.length&&(n="amCustomBullet"+t.id+"_"+u.id,w="amCustomBulletConfig"+t.id+"_"+u.id,B[n]=AmCharts.StackedBullet,B[w]=r)}}}}};AmCharts.StockLegend=AmCharts.Class({inherits:AmCharts.AmLegend,construct:function(a){AmCharts.StockLegend.base.construct.call(this,a);this.cname="StockLegend";this.valueTextComparing="[[percents.value]]%";this.valueTextRegular="[[value]]";AmCharts.applyTheme(this,a,this.cname)},drawLegend:function(){var a=this;AmCharts.StockLegend.base.drawLegend.call(a);var b=a.chart;if(b.allowTurningOff){var c=a.container,d=c.image(b.pathToImages+"xIcon.gif",b.realWidth-17,3,17,17),b=c.image(b.pathToImages+"xIconH.gif",
72
+ b.realWidth-17,3,17,17);b.hide();a.xButtonHover=b;d.mouseup(function(){a.handleXClick()}).mouseover(function(){a.handleXOver()});b.mouseup(function(){a.handleXClick()}).mouseout(function(){a.handleXOut()})}},handleXOver:function(){this.xButtonHover.show()},handleXOut:function(){this.xButtonHover.hide()},handleXClick:function(){var a=this.chart,b=a.stockChart;b.removePanel(a);b.validateNow()}});AmCharts.DataSetSelector=AmCharts.Class({construct:function(a){this.cname="DataSetSelector";this.theme=a;this.createEvents("dataSetSelected","dataSetCompared","dataSetUncompared");this.position="left";this.selectText="Select:";this.comboBoxSelectText="Select...";this.compareText="Compare to:";this.width=180;this.dataProvider=[];this.listHeight=150;this.listCheckBoxSize=14;this.rollOverBackgroundColor="#b2e1ff";this.selectedBackgroundColor="#7fceff";AmCharts.applyTheme(this,a,this.cname)},write:function(a){var b=
73
+ this,c,d=b.theme;a.className="amChartsDataSetSelector";var e=b.width;c=b.position;b.width=void 0;b.position=void 0;AmCharts.applyStyles(a.style,b);b.div=a;b.width=e;b.position=c;a.innerHTML="";var e=b.position,h;h="top"==e||"bottom"==e?!1:!0;b.vertical=h;var f;h&&(f=b.width+"px");var e=b.dataProvider,g,k;if(1<b.countDataSets("showInSelect")){c=document.createTextNode(b.selectText);a.appendChild(c);h&&AmCharts.addBr(a);var m=document.createElement("select");f&&(m.style.width=f);b.selectCB=m;d&&AmCharts.applyStyles(m.style,
74
+ d.DataSetSelect);a.appendChild(m);AmCharts.isNN&&m.addEventListener("change",function(a){b.handleDataSetChange.call(b,a)},!0);AmCharts.isIE&&m.attachEvent("onchange",function(a){b.handleDataSetChange.call(b,a)});for(c=0;c<e.length;c++)if(g=e[c],!0===g.showInSelect){k=document.createElement("option");k.text=g.title;k.value=c;g==b.chart.mainDataSet&&(k.selected=!0);try{m.add(k,null)}catch(q){m.add(k)}}b.offsetHeight=m.offsetHeight}if(0<b.countDataSets("showInCompare")&&1<e.length)if(h?(AmCharts.addBr(a),
75
+ AmCharts.addBr(a)):(c=document.createTextNode(" "),a.appendChild(c)),c=document.createTextNode(b.compareText),a.appendChild(c),k=b.listCheckBoxSize,h){AmCharts.addBr(a);f=document.createElement("div");a.appendChild(f);f.className="amChartsCompareList";d&&AmCharts.applyStyles(f.style,d.DataSetCompareList);f.style.overflow="auto";f.style.overflowX="hidden";f.style.width=b.width-2+"px";f.style.maxHeight=b.listHeight+"px";for(c=0;c<e.length;c++)g=e[c],!0===g.showInCompare&&g!=b.chart.mainDataSet&&(d=
76
+ document.createElement("div"),d.style.padding="4px",d.style.position="relative",d.name="amCBContainer",d.dataSet=g,d.style.height=k+"px",g.compared&&(d.style.backgroundColor=b.selectedBackgroundColor),f.appendChild(d),h=document.createElement("div"),h.style.width=k+"px",h.style.height=k+"px",h.style.position="absolute",h.style.backgroundColor=g.color,d.appendChild(h),h=document.createElement("div"),h.style.width="100%",h.style.position="absolute",h.style.left=k+10+"px",d.appendChild(h),g=document.createTextNode(g.title),
77
+ h.style.whiteSpace="nowrap",h.style.cursor="default",h.appendChild(g),b.addEventListeners(d));AmCharts.addBr(a);AmCharts.addBr(a)}else{d=document.createElement("select");b.compareCB=d;f&&(d.style.width=f);a.appendChild(d);AmCharts.isNN&&d.addEventListener("change",function(a){b.handleCBSelect.call(b,a)},!0);AmCharts.isIE&&d.attachEvent("onchange",function(a){b.handleCBSelect.call(b,a)});k=document.createElement("option");k.text=b.comboBoxSelectText;try{d.add(k,null)}catch(x){d.add(k)}for(c=0;c<e.length;c++)if(g=
78
+ e[c],!0===g.showInCompare&&g!=b.chart.mainDataSet){k=document.createElement("option");k.text=g.title;k.value=c;g.compared&&(k.selected=!0);try{d.add(k,null)}catch(t){d.add(k)}}b.offsetHeight=d.offsetHeight}},addEventListeners:function(a){var b=this;AmCharts.isNN&&(a.addEventListener("mouseover",function(a){b.handleRollOver.call(b,a)},!0),a.addEventListener("mouseout",function(a){b.handleRollOut.call(b,a)},!0),a.addEventListener("click",function(a){b.handleClick.call(b,a)},!0));AmCharts.isIE&&(a.attachEvent("onmouseout",
79
+ function(a){b.handleRollOut.call(b,a)}),a.attachEvent("onmouseover",function(a){b.handleRollOver.call(b,a)}),a.attachEvent("onclick",function(a){b.handleClick.call(b,a)}))},handleDataSetChange:function(){var a=this.selectCB,a=this.dataProvider[a.options[a.selectedIndex].value],b=this.chart;b.mainDataSet=a;b.zoomOutOnDataSetChange&&(b.startDate=void 0,b.endDate=void 0);b.validateData();a={type:"dataSetSelected",dataSet:a,chart:this.chart};this.fire(a.type,a)},handleRollOver:function(a){a=this.getRealDiv(a);
80
+ a.dataSet.compared||(a.style.backgroundColor=this.rollOverBackgroundColor)},handleRollOut:function(a){a=this.getRealDiv(a);a.dataSet.compared||(a.style.removeProperty&&a.style.removeProperty("background-color"),a.style.removeAttribute&&a.style.removeAttribute("backgroundColor"))},handleCBSelect:function(a){var b=this.compareCB,c=this.dataProvider,d,e;for(d=0;d<c.length;d++)e=c[d],e.compared&&(a={type:"dataSetUncompared",dataSet:e}),e.compared=!1;c=b.selectedIndex;0<c&&(e=this.dataProvider[b.options[c].value],
81
+ e.compared||(a={type:"dataSetCompared",dataSet:e}),e.compared=!0);b=this.chart;b.validateData();a.chart=b;this.fire(a.type,a)},handleClick:function(a){a=this.getRealDiv(a).dataSet;!0===a.compared?(a.compared=!1,a={type:"dataSetUncompared",dataSet:a}):(a.compared=!0,a={type:"dataSetCompared",dataSet:a});var b=this.chart;b.validateData();a.chart=b;this.fire(a.type,a)},getRealDiv:function(a){a||(a=window.event);a=a.currentTarget?a.currentTarget:a.srcElement;"amCBContainer"==a.parentNode.name&&(a=a.parentNode);
82
+ return a},countDataSets:function(a){var b=this.dataProvider,c=0,d;for(d=0;d<b.length;d++)!0===b[d][a]&&c++;return c}});AmCharts.StackedBullet=AmCharts.Class({construct:function(){this.fontSize=11;this.stackDown=!1;this.mastHeight=8;this.shapes=[];this.backgroundColors=[];this.backgroundAlphas=[];this.borderAlphas=[];this.borderColors=[];this.colors=[];this.rollOverColors=[];this.showOnAxiss=[];this.textColor="#000000";this.nextY=0;this.size=16},parseConfig:function(){var a=this.bulletConfig;this.eventObjects=a.eventObjects;this.letters=a.letters;this.shapes=a.shapes;this.backgroundColors=a.backgroundColors;this.backgroundAlphas=
80
83
  a.backgroundAlphas;this.borderColors=a.borderColors;this.borderAlphas=a.borderAlphas;this.colors=a.colors;this.rollOverColors=a.rollOverColors;this.date=a.date;this.showOnAxiss=a.showOnAxis;this.axisCoordinate=a.minCoord},write:function(a){this.parseConfig();this.container=a;this.bullets=[];if(this.graph){var b=this.graph.fontSize;b&&(this.fontSize=b)}b=this.letters.length;(this.mastHeight+2*(this.fontSize/2+2))*b>this.availableSpace&&(this.stackDown=!0);this.set=a.set();a=0;var c;for(c=0;c<b;c++)this.shape=
81
- this.shapes[c],this.backgroundColor=this.backgroundColors[c],this.backgroundAlpha=this.backgroundAlphas[c],this.borderAlpha=this.borderAlphas[c],this.borderColor=this.borderColors[c],this.rollOverColor=this.rollOverColors[c],this.showOnAxis=this.showOnAxiss[c],this.color=this.colors[c],this.addLetter(this.letters[c],a,c),this.showOnAxis||a++},addLetter:function(a,b,c){var d=this.container;b=d.set();var e=-1,g=this.stackDown;this.showOnAxis&&(this.stackDown=this.graph.valueAxis.reversed?!0:!1);this.stackDown&&
82
- (e=1);var h=0,f=0,m=0,k,m=this.fontSize,u=this.mastHeight,y=this.shape,r=this.textColor;void 0!==this.color&&(r=this.color);void 0===a&&(a="");a=AmCharts.text(d,a,r,this.chart.fontFamily,this.fontSize);d=a.getBBox();this.labelWidth=r=d.width;this.labelHeight=d.height;d=0;switch(y){case "sign":k=this.drawSign(b);h=u+4+m/2;d=u+m+4;1==e&&(h-=4);break;case "flag":k=this.drawFlag(b);f=r/2+3;h=u+4+m/2;d=u+m+4;1==e&&(h-=4);break;case "pin":k=this.drawPin(b);h=6+m/2;d=m+8;break;case "triangleUp":k=this.drawTriangleUp(b);
83
- h=-m-1;d=m+4;e=-1;break;case "triangleDown":k=this.drawTriangleDown(b);h=m+1;d=m+4;e=-1;break;case "triangleLeft":k=this.drawTriangleLeft(b);f=m;d=m+4;e=-1;break;case "triangleRight":k=this.drawTriangleRight(b);f=-m;e=-1;d=m+4;break;case "arrowUp":k=this.drawArrowUp(b);a.hide();break;case "arrowDown":k=this.drawArrowDown(b);a.hide();d=m+4;break;case "text":e=-1;k=this.drawTextBackground(b,a);h=this.labelHeight+3;d=m+10;break;case "round":k=this.drawCircle(b)}this.bullets[c]=k;this.showOnAxis?(k=isNaN(this.nextAxisY)?
84
- this.axisCoordinate:this.nextY,m=h*e,this.nextAxisY=k+e*d):(k=this.nextY,m=h*e);a.translate(f,m);b.push(a);b.translate(0,k);this.addEventListeners(b,c);this.nextY=k+e*d;this.stackDown=g},addEventListeners:function(a,b){var c=this;a.click(function(){c.handleClick(b)}).mouseover(function(){c.handleMouseOver(b)}).touchend(function(){c.handleMouseOver(b,!0)}).mouseout(function(){c.handleMouseOut(b)})},drawPin:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4;return this.drawRealPolygon(a,
85
- [0,c/2,c/2,-c/2,-c/2,0],[0,b*c/4,b*(c+c/4),b*(c+c/4),b*c/4,0])},drawSign:function(a){var b=-1;this.stackDown&&(b=1);var c=this.mastHeight*b,d=this.fontSize/2+2,e=AmCharts.line(this.container,[0,0],[0,c],this.borderColor,this.borderAlpha,1),g=AmCharts.circle(this.container,d,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);g.translate(0,c+d*b);a.push(e);a.push(g);this.set.push(a);return g},drawFlag:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4,d=this.labelWidth+
84
+ this.shapes[c],this.backgroundColor=this.backgroundColors[c],this.backgroundAlpha=this.backgroundAlphas[c],this.borderAlpha=this.borderAlphas[c],this.borderColor=this.borderColors[c],this.rollOverColor=this.rollOverColors[c],this.showOnAxis=this.showOnAxiss[c],this.color=this.colors[c],this.addLetter(this.letters[c],a,c),this.showOnAxis||a++},addLetter:function(a,b,c){var d=this.container;b=d.set();var e=-1,h=this.stackDown;this.showOnAxis&&(this.stackDown=this.graph.valueAxis.reversed?!0:!1);this.stackDown&&
85
+ (e=1);var f=0,g=0,k=0,m,k=this.fontSize,q=this.mastHeight,x=this.shape,t=this.textColor;void 0!==this.color&&(t=this.color);void 0===a&&(a="");a=AmCharts.text(d,a,t,this.chart.fontFamily,this.fontSize);d=a.getBBox();this.labelWidth=t=d.width;this.labelHeight=d.height;d=0;switch(x){case "sign":m=this.drawSign(b);f=q+4+k/2;d=q+k+4;1==e&&(f-=4);break;case "flag":m=this.drawFlag(b);g=t/2+3;f=q+4+k/2;d=q+k+4;1==e&&(f-=4);break;case "pin":m=this.drawPin(b);f=6+k/2;d=k+8;break;case "triangleUp":m=this.drawTriangleUp(b);
86
+ f=-k-1;d=k+4;e=-1;break;case "triangleDown":m=this.drawTriangleDown(b);f=k+1;d=k+4;e=-1;break;case "triangleLeft":m=this.drawTriangleLeft(b);g=k;d=k+4;e=-1;break;case "triangleRight":m=this.drawTriangleRight(b);g=-k;e=-1;d=k+4;break;case "arrowUp":m=this.drawArrowUp(b);a.hide();break;case "arrowDown":m=this.drawArrowDown(b);a.hide();d=k+4;break;case "text":e=-1;m=this.drawTextBackground(b,a);f=this.labelHeight+3;d=k+10;break;case "round":m=this.drawCircle(b)}this.bullets[c]=m;this.showOnAxis?(m=isNaN(this.nextAxisY)?
87
+ this.axisCoordinate:this.nextY,k=f*e,this.nextAxisY=m+e*d):(m=this.nextY,k=f*e);a.translate(g,k);b.push(a);b.translate(0,m);this.addEventListeners(b,c);this.nextY=m+e*d;this.stackDown=h},addEventListeners:function(a,b){var c=this;a.click(function(){c.handleClick(b)}).mouseover(function(){c.handleMouseOver(b)}).touchend(function(){c.handleMouseOver(b,!0)}).mouseout(function(){c.handleMouseOut(b)})},drawPin:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4;return this.drawRealPolygon(a,
88
+ [0,c/2,c/2,-c/2,-c/2,0],[0,b*c/4,b*(c+c/4),b*(c+c/4),b*c/4,0])},drawSign:function(a){var b=-1;this.stackDown&&(b=1);var c=this.mastHeight*b,d=this.fontSize/2+2,e=AmCharts.line(this.container,[0,0],[0,c],this.borderColor,this.borderAlpha,1),h=AmCharts.circle(this.container,d,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);h.translate(0,c+d*b);a.push(e);a.push(h);this.set.push(a);return h},drawFlag:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4,d=this.labelWidth+
86
89
  6,e=this.mastHeight,b=1==b?b*e:b*e-c,e=AmCharts.line(this.container,[0,0],[0,b],this.borderColor,this.borderAlpha,1),c=AmCharts.polygon(this.container,[0,d,d,0],[0,0,c,c],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);c.translate(0,b);a.push(e);a.push(c);this.set.push(a);return c},drawTriangleUp:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b/2,-b/2,0],[0,b,b,0])},drawArrowUp:function(a){var b=this.size,c=b/2,d=b/4;return this.drawRealPolygon(a,
87
90
  [0,c,d,d,-d,-d,-c,0],[0,c,c,b,b,c,c,0])},drawArrowDown:function(a){var b=this.size,c=b/2,d=b/4;return this.drawRealPolygon(a,[0,c,d,d,-d,-d,-c,0],[0,-c,-c,-b,-b,-c,-c,0])},drawTriangleDown:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b/2,-b/2,0],[0,-b,-b,0])},drawTriangleLeft:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b,b,0],[0,-b/2,b/2])},drawTriangleRight:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,-b,-b,0],[0,-b/2,b/2,0])},drawRealPolygon:function(a,
88
91
  b,c){b=AmCharts.polygon(this.container,b,c,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);a.push(b);this.set.push(a);return b},drawCircle:function(a){shape=AmCharts.circle(this.container,this.fontSize/2,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);a.push(shape);this.set.push(a);return shape},drawTextBackground:function(a,b){var c=b.getBBox(),d=-c.width/2-5,e=c.width/2+5,c=-c.height-12;return this.drawRealPolygon(a,[d,-5,0,5,e,e,d,d],
89
- [-5,-5,0,-5,-5,c,c,-5])},handleMouseOver:function(a,b){b||this.bullets[a].attr({fill:this.rollOverColors[a]});var c=this.eventObjects[a],d={type:"rollOverStockEvent",eventObject:c,graph:this.graph,date:this.date},e=this.bulletConfig.eventDispatcher;d.chart=e;e.fire(d.type,d);c.url&&this.bullets[a].setAttr("cursor","pointer");this.chart.showBalloon(c.description,e.stockEventsSettings.balloonColor,!0)},handleClick:function(a){a=this.eventObjects[a];var b={type:"clickStockEvent",eventObject:a,graph:this.graph,
90
- date:this.date},c=this.bulletConfig.eventDispatcher;b.chart=c;c.fire(b.type,b);b=a.urlTarget;b||(b=c.stockEventsSettings.urlTarget);AmCharts.getURL(a.url,b)},handleMouseOut:function(a){this.bullets[a].attr({fill:this.backgroundColors[a]});a={type:"rollOutStockEvent",eventObject:this.eventObjects[a],graph:this.graph,date:this.date};var b=this.bulletConfig.eventDispatcher;a.chart=b;b.fire(a.type,a)}});
92
+ [-5,-5,0,-5,-5,c,c,-5])},handleMouseOver:function(a,b){b||this.bullets[a].attr({fill:this.rollOverColors[a]});var c=this.eventObjects[a],d={type:"rollOverStockEvent",eventObject:c,graph:this.graph,date:this.date},e=this.bulletConfig.eventDispatcher;d.chart=e;e.fire(d.type,d);c.url&&this.bullets[a].setAttr("cursor","pointer");this.chart.showBalloon(AmCharts.fixNewLines(c.description),e.stockEventsSettings.balloonColor,!0)},handleClick:function(a){a=this.eventObjects[a];var b={type:"clickStockEvent",
93
+ eventObject:a,graph:this.graph,date:this.date},c=this.bulletConfig.eventDispatcher;b.chart=c;c.fire(b.type,b);b=a.urlTarget;b||(b=c.stockEventsSettings.urlTarget);AmCharts.getURL(a.url,b)},handleMouseOut:function(a){this.bullets[a].attr({fill:this.backgroundColors[a]});a={type:"rollOutStockEvent",eventObject:this.eventObjects[a],graph:this.graph,date:this.date};var b=this.bulletConfig.eventDispatcher;a.chart=b;b.fire(a.type,a)}});
@@ -1,274 +1,371 @@
1
+ ###############################################################################################################################
2
+
3
+ Since version 3.4.3, change log moved to: http://www.amcharts.com/javascript-charts/changelog/
4
+
5
+ #### 3.4.2 ####################################################################################################################
6
+
7
+ Bug fix: if pie slice had no label, the external method rollOverSlice(index) was not working
8
+
9
+ Bug fix: x switch of the legend position adjusted
10
+
11
+ Bug fix: when autoWrap for category axis was set to true, in some cases axis title was cut.
12
+
13
+ markPeriodChange was set to true in CategoryAxesSettings.
14
+
15
+ #### 3.4.1 ####################################################################################################################
16
+
17
+ "patterns" theme added.
18
+
19
+ themes were updated a bit.
20
+
21
+ labels of angular gauge axis adjusted.
22
+
23
+ when scrolling serial/stock charts with mousewheel (chart.mouseWheelScrollEnabled must be set to true), if user press shift
24
+ button, the chart will zoom-in or zoom-out;
25
+
26
+ adjustment property added to ChartCursor. Default value is 0, if you set it to -1, the balloon will show near previous, if
27
+ you set it to 1 - near next data point.
28
+
29
+ #### 3.4.0 ####################################################################################################################
30
+
31
+ Link to amCharts.com site in a free version was made less noticable - it uses chart's font color and font size and you can
32
+ adjust it's position using creditsPosition property of AmChart. Possible values are: top-left, top-right, bottom-right and
33
+ bottom-left. This will help you to achieve better layout of a chart.
34
+
35
+ We fixed typo in chart cursors property - it was showNextAvalable and now is showNextAvailable. The old one won't work.
36
+
37
+ Since now you can scroll serial and stock charts with mouse wheel. To enable this, set chart.mouseWheelScrollEnabled = true
38
+ (default is false)
39
+
40
+ moved event added to chart cursor. It is dispatched every time the mouse is moved. The event object has the following
41
+ properties: x, y (coordinates of the cursor), target (reference to cursor), chart, zooming.
42
+
43
+ axisX and axisY properties added to AxisBase. They are read-only and returns x and y positions of the axis.
44
+
45
+ unit and unitPosition (with possible values left and right) added to GaugeAxis class.
46
+
47
+ autoWrap property added to CategoryAxis, with default value false. If you set it to true, the axis labels will be wrapped
48
+ if they won't fit in the allocated space.
49
+
50
+ minHorizontalGap (default 75) and minVerticalGap (35) properties added to AxisBase. They are used to calculate the number of
51
+ gridLines when autoGridCount is true. You can modify these values to have more or less grid lines.
52
+
53
+
54
+ #### 3.3.6 ####################################################################################################################
55
+
56
+ # Bug fix - charts with legend could fail if there was a google analytics script in the page.
57
+
58
+ # stepDirection property added to AmGraph. If you set it to "left", step line graph will draw the step to the left of the
59
+ date/category.
60
+
61
+ #### 3.3.5 ####################################################################################################################
62
+
63
+ # Bug fix - 3D pie chart was not rendered in IE8 and older (since 3.3.4 version only)
64
+
65
+ # Candlestick graphs can display patterns
66
+
67
+ # Old listeners are removed automatically if the same listener was added, this helps to avoid duplicate calls of event
68
+ handlers
69
+
70
+ # \n in labelText of AmGraph is now properly displayed as new line.
71
+
72
+ #### 3.3.4 ####################################################################################################################
73
+
74
+ # export as image script fixed - bullets of charts with scrollbars were not exported.
75
+
76
+ # dataContext property added to SerialDataItem. It holds reference to original data object and might be used when using
77
+ labelFunction to format custom balloon text and in some other cases.
78
+
79
+ # XY chart can display bullets with patterns (if valueField is set).
80
+
81
+
82
+ #### 3.3.3 ####################################################################################################################
83
+
84
+ # hideBalloonTime property added to AmChart class, default value is 150 (milliseconds). It sets time after which balloon is
85
+ hidden if user rolls-out of the object. Increasing the time might help to prevent balloon flickering while moving the
86
+ mouse over the object.
87
+
88
+ # useLineColorForBulletBorder property added to AmGraph. Might help in some situations, especially when using themes.
89
+
90
+ # 3D charts now look a lot better with patterns.
91
+
92
+ # endWidth property added to GaugeArrow (default 0). This will allow having more modern, rectangular arrows.
93
+
94
+ # facePattern property added to AmAngularGauge. You can fill gauge's face with some pattern using it.
95
+
96
+ # bug fix: new lines were ignored in balloons
97
+
1
98
  #### 3.3.2 ####################################################################################################################
2
99
 
3
- # You can now set theme for all the charts on your page by setting:
4
- AmCharts.theme = AmCharts.themes.light; // or some other theme
5
- If you are creating charts using JavaScript API, not JSON, then this is quite a comfortable way, as you won't need to
6
- pass theme to each object you create.
100
+ # You can now set theme for all the charts on your page by setting:
101
+ AmCharts.theme = AmCharts.themes.light; // or some other theme
102
+ If you are creating charts using JavaScript API, not JSON, then this is quite a comfortable way, as you won't need to
103
+ pass theme to each object you create.
7
104
 
8
- # bug fix: rendered event was fired only on first render, now it is fired each time the chart is rendered after
9
- chart.validateNow(); method is called. This bug caused the export buttons to dissapear after the validateNow() method.
105
+ # bug fix: rendered event was fired only on first render, now it is fired each time the chart is rendered after
106
+ chart.validateNow(); method is called. This bug caused the export buttons to dissapear after the validateNow() method.
10
107
 
11
- # chartCursror.showNextAvalable property added (default is false). If true, the graph will display balloon on next
12
- available data point if currently hovered item doesn't have value for this graph.
108
+ # chartCursror.showNextAvalable property added (default is false). If true, the graph will display balloon on next
109
+ available data point if currently hovered item doesn't have value for this graph.
13
110
 
14
- # graph.periodSpan property added (default is 1). This property can be used by step graphs - you can set how many periods
15
- one horizontal line should span.
111
+ # graph.periodSpan property added (default is 1). This property can be used by step graphs - you can set how many periods
112
+ one horizontal line should span.
16
113
 
17
- # "end" option added to graph.pointPosition property.
114
+ # "end" option added to graph.pointPosition property.
18
115
 
19
116
 
20
117
  #### 3.3.1 ####################################################################################################################
21
118
 
22
- # bug fix - \n was replaced with <br> in category axis and the tag was displayed
23
- # bug fix - if lineColorField or dashLengthField or fillColorsField was set, the graph could loose the setting if zoomed.
119
+ # bug fix - \n was replaced with <br> in category axis and the tag was displayed
120
+ # bug fix - if lineColorField or dashLengthField or fillColorsField was set, the graph could loose the setting if zoomed.
24
121
 
25
122
  #### 3.3.0 ####################################################################################################################
26
123
 
27
- # Since this version amCharts and amMap support themes. This means that instead of seting every property for each graph
28
- or axis or any other object, you can set new defaults in a theme file. This will make devs' life a lot easier.
124
+ # Since this version amCharts and amMap support themes. This means that instead of seting every property for each graph
125
+ or axis or any other object, you can set new defaults in a theme file. This will make devs' life a lot easier.
29
126
 
30
- Currently you can find three themes in amcharts/themes folder - dark.js, light.js and chalk.js To set a theme for a chart,
31
- simply set theme property to the name of the file: theme:"light". Note, this will work only if you are creating chart
32
- using JSON config. If you do it in old way (JSON config is supported since v 3.2.0), you should pass theme object for
33
- each new object you build, for example: var graph = new AmCharts.AmGraph(AmCharts.themes.light);
127
+ Currently you can find three themes in amcharts/themes folder - dark.js, light.js and chalk.js To set a theme for a chart,
128
+ simply set theme property to the name of the file: theme:"light". Note, this will work only if you are creating chart
129
+ using JSON config. If you do it in old way (JSON config is supported since v 3.2.0), you should pass theme object for
130
+ each new object you build, for example: var graph = new AmCharts.AmGraph(AmCharts.themes.light);
34
131
 
35
- We will be adding more themes soon. Check _usingThemes.html file in samples folder to see themes in action.
132
+ We will be adding more themes soon. Check _usingThemes.html file in samples folder to see themes in action.
36
133
 
37
- # patterns property added to AmSlicedChart and AmCoordinateChart - instead of setting a pattern for a slice/graph, you can
38
- pass array of patterns using this property.
134
+ # patterns property added to AmSlicedChart and AmCoordinateChart - instead of setting a pattern for a slice/graph, you can
135
+ pass array of patterns using this property.
39
136
 
40
- # you can now control zoom-out buttons with the following new properties of AmRectangularChart:
137
+ # you can now control zoom-out buttons with the following new properties of AmRectangularChart:
41
138
 
42
- zoomOutButtonImageSize
43
- zoomOutButtonImage
44
- zoomOutButtonColor
45
- zoomOutButtonAlpha
46
- zoomOutButtonRollOverAlpha
47
- zoomOutButtonPadding
139
+ zoomOutButtonImageSize
140
+ zoomOutButtonImage
141
+ zoomOutButtonColor
142
+ zoomOutButtonAlpha
143
+ zoomOutButtonRollOverAlpha
144
+ zoomOutButtonPadding
48
145
 
49
- # some minor bugs fixed
146
+ # some minor bugs fixed
50
147
 
51
148
  #### 3.2.0 ####################################################################################################################
52
149
 
53
150
 
54
- # AmCharts.makeChart(divID, chartConfig); method added. divID is id of a div where your chart should appear. chartConfig is
55
- JSON object with chart configuration. Check examples with _JSON_ prefix in samples folder to see this in action.
151
+ # AmCharts.makeChart(divID, chartConfig); method added. divID is id of a div where your chart should appear. chartConfig is
152
+ JSON object with chart configuration. Check examples with _JSON_ prefix in samples folder to see this in action.
56
153
 
57
- # type property added to AmChart class. It is required to specify type to one of the following, when creating charts from
58
- JSON config: serial, xy, radar, pie, gauge, funnel, map, stock
154
+ # type property added to AmChart class. It is required to specify type to one of the following, when creating charts from
155
+ JSON config: serial, xy, radar, pie, gauge, funnel, map, stock
59
156
 
60
- # a possibility to export charts as image/pdf/svg added for all modern browsers except IE9 (IE10 is supported). The
61
- exporting doesn't require any server side software and is made using js libraries only. Check samples with
62
- _exporting_ prefix to see this in action. Exporting to SVG doesn't work very properly with stock chart or charts with
63
- legend (will offer saving multiple files).
157
+ # a possibility to export charts as image/pdf/svg added for all modern browsers except IE9 (IE10 is supported). The
158
+ exporting doesn't require any server side software and is made using js libraries only. Check samples with
159
+ _exporting_ prefix to see this in action. Exporting to SVG doesn't work very properly with stock chart or charts with
160
+ legend (will offer saving multiple files).
64
161
 
65
- # You can set any legend items via legend.data property, for example:
66
- legend.data = [{title:"first", color:"#CC0000", value:50}, {title:"second", color:"#00CC00", value:100}];
67
- This allows creating any legend items you want. Call chart.legend.validateNow(); if you change legend's data at run time.
162
+ # You can set any legend items via legend.data property, for example:
163
+ legend.data = [{title:"first", color:"#CC0000", value:50}, {title:"second", color:"#00CC00", value:100}];
164
+ This allows creating any legend items you want. Call chart.legend.validateNow(); if you change legend's data at run time.
68
165
 
69
- # AmAngularGauge supports legend now
166
+ # AmAngularGauge supports legend now
70
167
 
71
- # bug fix - if a chart with scrollbar was rotated after the chart is created, the scrollbar's graph was shifted to a wrong
72
- position.
168
+ # bug fix - if a chart with scrollbar was rotated after the chart is created, the scrollbar's graph was shifted to a wrong
169
+ position.
73
170
 
74
- # bug fix - column graph type wasn't displayed in chart scrollbar (since 3.1.0)
171
+ # bug fix - column graph type wasn't displayed in chart scrollbar (since 3.1.0)
75
172
 
76
- # gridAboveGraphs property added to AmCoordinate chart. This allow to show grid lines above your graphs, as world-famous
77
- data visualization guru Edward Tufte suggests. Note, this won't work properly with 3D charts.
173
+ # gridAboveGraphs property added to AmCoordinate chart. This allow to show grid lines above your graphs, as world-famous
174
+ data visualization guru Edward Tufte suggests. Note, this won't work properly with 3D charts.
78
175
 
79
- # negative axis labels rotation possible. You can use values from -90 to -1 for labelRotation property since now.
176
+ # negative axis labels rotation possible. You can use values from -90 to -1 for labelRotation property since now.
80
177
 
81
- # bug fix: step line with changing line color was rendered incorrectly if some values were missing.
178
+ # bug fix: step line with changing line color was rendered incorrectly if some values were missing.
82
179
 
83
- # bug fix: labelPosition "inside" and "middle" for bar charts fixed.
180
+ # bug fix: labelPosition "inside" and "middle" for bar charts fixed.
84
181
 
85
- # bug fix: AmAngularGauge chart wasn't firing "rendered" event.
182
+ # bug fix: AmAngularGauge chart wasn't firing "rendered" event.
86
183
 
87
184
 
88
185
  #### 3.1.1 ####################################################################################################################
89
186
 
90
- # FireFox error messages about style declarations fixed
187
+ # FireFox error messages about style declarations fixed
91
188
 
92
- # Bug fix: maxWidth property of AmBalloon was ignored
189
+ # Bug fix: maxWidth property of AmBalloon was ignored
93
190
 
94
- # Some other minor bugs fixed
191
+ # Some other minor bugs fixed
95
192
 
96
193
 
97
194
  #### 3.1.0 ####################################################################################################################
98
195
 
99
- Great new features added - charts now support patterns (can fill bars, lines and slices with images) and can simulate
100
- hand drawn charts - the lines will be a bit distorted and produce a nice effect. Check our new inspiring samples at
101
- http://www.amcharts.com/inspiration/ to see new possibilities in action.
196
+ Great new features added - charts now support patterns (can fill bars, lines and slices with images) and can simulate
197
+ hand drawn charts - the lines will be a bit distorted and produce a nice effect. Check our new inspiring samples at
198
+ http://www.amcharts.com/inspiration/ to see new possibilities in action.
102
199
 
103
- # patterns
104
- Patterns can be set for entire graphs or for individual columns/slices. In case you want to set pattern for a graph, use
105
- pattern property of AmGraph. If you want to set individual pattern for a column or slice, describe patterns in chart's
106
- data and set patternField for a graph or pie/funnel chart. Value of pattern should be object with url, width, height of an
107
- image, optionally it might have x, y, randomX and randomY values. For example:
200
+ # patterns
201
+ Patterns can be set for entire graphs or for individual columns/slices. In case you want to set pattern for a graph, use
202
+ pattern property of AmGraph. If you want to set individual pattern for a column or slice, describe patterns in chart's
203
+ data and set patternField for a graph or pie/funnel chart. Value of pattern should be object with url, width, height of an
204
+ image, optionally it might have x, y, randomX and randomY values. For example:
108
205
 
109
- graph.pattern = {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4};
206
+ graph.pattern = {"url":"../amcharts/patterns/black/pattern1.png", "width":4, "height":4};
110
207
 
111
- check amcharts/patterns folder for some patterns. You can create your own patterns and use them.
208
+ check amcharts/patterns folder for some patterns. You can create your own patterns and use them.
112
209
 
113
- Note, x, y, randomX and randomY properties won't work with IE8 and older.
210
+ Note, x, y, randomX and randomY properties won't work with IE8 and older.
114
211
 
115
- Check handDrawnChart.html, pieWithPatterns.html or columnWithPatterns.html examples to see this in action.
212
+ Check handDrawnChart.html, pieWithPatterns.html or columnWithPatterns.html examples to see this in action.
116
213
 
117
- Note, 3D bar/Pie charts won't work properly with patterns.
214
+ Note, 3D bar/Pie charts won't work properly with patterns.
118
215
 
119
- # hand-drawn style
120
- if you set chart.handDrawn = true, the lines of a chart will be distorted and will produce hand-drawn effect.
121
- You can also modify chart.handDrawScatter (default value is 2) and chart.handDrawThickness (default value 1) values for
122
- more scattered view.
216
+ # hand-drawn style
217
+ if you set chart.handDrawn = true, the lines of a chart will be distorted and will produce hand-drawn effect.
218
+ You can also modify chart.handDrawScatter (default value is 2) and chart.handDrawThickness (default value 1) values for
219
+ more scattered view.
123
220
 
124
- # offsetY and offsetX properties added to AmBalloon. Specifies the distance from the mouse position to balloon's pointer.
125
- You might want to increase distance when using hand drawn style.
221
+ # offsetY and offsetX properties added to AmBalloon. Specifies the distance from the mouse position to balloon's pointer.
222
+ You might want to increase distance when using hand drawn style.
126
223
 
127
- # Some minor problems fixed
224
+ # Some minor problems fixed
128
225
 
129
226
  #### 3.0.1 ####################################################################################################################
130
227
 
131
- Some very minor bugs which usually pop right after big release fixed.
228
+ Some very minor bugs which usually pop right after big release fixed.
132
229
 
133
230
  #### 3.0.0 ####################################################################################################################
134
231
 
135
232
  **** Several files ****
136
233
 
137
- As not all users require all type of charts, we spilt the js file into several files - one main amcharts.js file, plus
138
- a separate js file for each chart type. This means you can include only the charts you need. If you are worried about
139
- number of requests, you can simply copy/paste the source of the charts you use to the main file.
234
+ As not all users require all type of charts, we spilt the js file into several files - one main amcharts.js file, plus
235
+ a separate js file for each chart type. This means you can include only the charts you need. If you are worried about
236
+ number of requests, you can simply copy/paste the source of the charts you use to the main file.
140
237
 
141
238
  **** Upgrading / 100% backwards compatibility ****
142
239
 
143
- Although we changed some default values in order to improve usability of the charts, the only thing you should worry
144
- about when upgrading from v2 to v3 is the feature mention above you should include two or more js files in order your
145
- charts to work. If you dont like the changed defaults, you can always set them to the previous values in your chart
146
- setup.
240
+ Although we changed some default values in order to improve usability of the charts, the only thing you should worry
241
+ about when upgrading from v2 to v3 is the feature mention above you should include two or more js files in order your
242
+ charts to work. If you dont like the changed defaults, you can always set them to the previous values in your chart
243
+ setup.
147
244
 
148
245
  **** New chart types ****
149
246
 
150
- # Funnel / Pyramid chart.
151
- Check funnelChart.html and pyramidChart.html examples. As this chart type has a lot of in common
152
- with pie chart, we created one base class for these chart types - AmSlicedChart. AmPieChart and AmFunnelChart now extend
153
- this class. Visit our online class reference for properties and methods of AmFunnelChart.
247
+ # Funnel / Pyramid chart.
248
+ Check funnelChart.html and pyramidChart.html examples. As this chart type has a lot of in common
249
+ with pie chart, we created one base class for these chart types - AmSlicedChart. AmPieChart and AmFunnelChart now extend
250
+ this class. Visit our online class reference for properties and methods of AmFunnelChart.
154
251
 
155
- # Angular Gauge
156
- Supports multiple axes and multiple arrows. Check the following examples: angularGauge.html,
157
- angularGaugeWithTwoAxes.html, clock.html, clockWithTwoFaces.html. Visit our online class reference for properties and
158
- methods of classes used by this chart type.
252
+ # Angular Gauge
253
+ Supports multiple axes and multiple arrows. Check the following examples: angularGauge.html,
254
+ angularGaugeWithTwoAxes.html, clock.html, clockWithTwoFaces.html. Visit our online class reference for properties and
255
+ methods of classes used by this chart type.
159
256
 
160
257
  *** New chart types made with new possibilities of Serial/XY charts ***
161
258
 
162
- We added lots of new features to our charts and with these features you can create new chart types, like:
259
+ We added lots of new features to our charts and with these features you can create new chart types, like:
163
260
 
164
- # Horizontal or vertical bullet chart - bulletChart.html
261
+ # Horizontal or vertical bullet chart - bulletChart.html
165
262
 
166
- # Waterfall chart - waterFallChart.html
263
+ # Waterfall chart - waterFallChart.html
167
264
 
168
- # Step chart without risers - lineStepNoRisers.html
265
+ # Step chart without risers - lineStepNoRisers.html
169
266
 
170
- # Error chart (both Serial and XY) - errorChart.html
267
+ # Error chart (both Serial and XY) - errorChart.html
171
268
 
172
269
  *** Other new features ***
173
270
 
174
- # Possibility to show minor grid for both Category and Value axis. minorGridEnabled (default value false) and
175
- minorGridAlpha (default 0.07) properties added to AxisBase class.
176
- Example: lineWithScrollAndZoom.html
271
+ # Possibility to show minor grid for both Category and Value axis. minorGridEnabled (default value false) and
272
+ minorGridAlpha (default 0.07) properties added to AxisBase class.
273
+ Example: lineWithScrollAndZoom.html
177
274
 
178
275
 
179
- # Possibility to change line graphs' line/fill color on any data point to create highlighted sections of the graph.
180
- To achieve this, you should set lineColorField and/or fillColorsField for your graph and have a field in your data
181
- which would contain color values at a point where you want the graph to change it's color.
182
- Example: lineWithChangingColor.html
276
+ # Possibility to change line graphs' line/fill color on any data point to create highlighted sections of the graph.
277
+ To achieve this, you should set lineColorField and/or fillColorsField for your graph and have a field in your data
278
+ which would contain color values at a point where you want the graph to change it's color.
279
+ Example: lineWithChangingColor.html
183
280
 
184
281
 
185
- # Possibility to switch line from solid to dashed. Columns can also have dashed outline. To achieve this, you should set
186
- dashLengthField for your graph and have a field in your data which would contain dashLength value at a point where you
187
- want the graph to change from solid to dashed or vice versa.
188
- Example: lineWithDifferentBulletSizes.html and columnAndLineMix.html
282
+ # Possibility to switch line from solid to dashed. Columns can also have dashed outline. To achieve this, you should set
283
+ dashLengthField for your graph and have a field in your data which would contain dashLength value at a point where you
284
+ want the graph to change from solid to dashed or vice versa.
285
+ Example: lineWithDifferentBulletSizes.html and columnAndLineMix.html
189
286
 
190
287
 
191
- # Date strings in data now supported. Even if your chart parses dates, you can pass them as strings in your data all you
192
- need to do is to set data date format and the chart will parse dates to date objects. This means that now data for
193
- date-based chart can be in legit JSON format. dataDateFormat property added to AmSerialChart and AmStockChart.
194
- Example: lineWithChangingColor.html, lineWithTrendLines.html and some more.
288
+ # Date strings in data now supported. Even if your chart parses dates, you can pass them as strings in your data all you
289
+ need to do is to set data date format and the chart will parse dates to date objects. This means that now data for
290
+ date-based chart can be in legit JSON format. dataDateFormat property added to AmSerialChart and AmStockChart.
291
+ Example: lineWithChangingColor.html, lineWithTrendLines.html and some more.
195
292
 
196
293
 
197
- # When moving chart cursor over the chart, hovered bullets can change their size. If a graph has bullets and you added
198
- ChartCursor to the chart, bullets will become bigger when char cursor is over them. graphBulletSize property with
199
- default value 1.7 added to ChartCursor. If you want to disable this feature, set the value to 1.
200
- Example: lineWithLogarithmicValueAxis.html, lineWithScrollAndZoom.html and some more.
294
+ # When moving chart cursor over the chart, hovered bullets can change their size. If a graph has bullets and you added
295
+ ChartCursor to the chart, bullets will become bigger when char cursor is over them. graphBulletSize property with
296
+ default value 1.7 added to ChartCursor. If you want to disable this feature, set the value to 1.
297
+ Example: lineWithLogarithmicValueAxis.html, lineWithScrollAndZoom.html and some more.
201
298
 
202
299
 
203
- # Legend can now display period value. When user is not hovering the chart, legend can show sum, average, open, close, low
204
- or high values of selected period. periodValueText added to AmLegend and legendPeriodValueText added to AmGraph to
205
- achieve this. The tags should be made out of two parts - the name of a field (value / open / close / high / low) and the
206
- value of the period you want to be show - open / close / high / low / sum / average / count. For example: [[value.sum]]
207
- means that sum of all data points of value field in the selected period will be displayed.
208
- Example: area100PercentStacked.html and areaStacked.html
300
+ # Legend can now display period value. When user is not hovering the chart, legend can show sum, average, open, close, low
301
+ or high values of selected period. periodValueText added to AmLegend and legendPeriodValueText added to AmGraph to
302
+ achieve this. The tags should be made out of two parts - the name of a field (value / open / close / high / low) and the
303
+ value of the period you want to be show - open / close / high / low / sum / average / count. For example: [[value.sum]]
304
+ means that sum of all data points of value field in the selected period will be displayed.
305
+ Example: area100PercentStacked.html and areaStacked.html
209
306
 
210
- To achieve the same with stock chart, we added periodValueTextRegular and periodValueTextComparing proprties to
211
- StockLegend. To show percent period values, you should add "percent." prefix for your tag, for example:
212
- [[percents.value.close]] means that last percent value of a period will be displayed.
213
- Example: stockMultiplePanels.html and stockMultipleDataSets.html
307
+ To achieve the same with stock chart, we added periodValueTextRegular and periodValueTextComparing proprties to
308
+ StockLegend. To show percent period values, you should add "percent." prefix for your tag, for example:
309
+ [[percents.value.close]] means that last percent value of a period will be displayed.
310
+ Example: stockMultiplePanels.html and stockMultipleDataSets.html
214
311
 
215
312
 
216
- # Legend markers can now mirror graphs settings, displaying a line and a real bullet as in the graph itself.
217
- useGraphSettings property with default value false was added to AmLegend. Note, we also removed "line" and "dashedLine"
218
- marker types because of this - use the useGraphSettings feature in case you need lines as markers in the legend.
219
- Example: lineWithDifferentBulletSizes.html and lineWithMultipleValueAxes.html
313
+ # Legend markers can now mirror graphs settings, displaying a line and a real bullet as in the graph itself.
314
+ useGraphSettings property with default value false was added to AmLegend. Note, we also removed "line" and "dashedLine"
315
+ marker types because of this - use the useGraphSettings feature in case you need lines as markers in the legend.
316
+ Example: lineWithDifferentBulletSizes.html and lineWithMultipleValueAxes.html
220
317
 
221
318
 
222
- # Legend now supports custom markers (images). customMarker property was added to AmGraph. You should set path to the image
223
- which should be displayed in the legend.
319
+ # Legend now supports custom markers (images). customMarker property was added to AmGraph. You should set path to the image
320
+ which should be displayed in the legend.
224
321
 
225
322
 
226
- # Diamond bullet type added. Set graph.bullet = "diamond" to use it.
323
+ # Diamond bullet type added. Set graph.bullet = "diamond" to use it.
227
324
 
228
325
 
229
- # Dynamic bullet size based on value axis / Error chart.
230
- Error chart is a regular serial or XY chart with bullet type set to "errorX" or "errorY". The graph should know which axis
231
- should be used to determine the size of this bullet - that's when graph.bulletAxis property should be set. Besides that,
232
- you should also set graph.errorField. You can also use other bullet types with this feature too. For example, if you set
233
- bulletAxis for XY chart, the size of a bullet will change as you zoom the chart.
234
- Example: errorChart.html
326
+ # Dynamic bullet size based on value axis / Error chart.
327
+ Error chart is a regular serial or XY chart with bullet type set to "errorX" or "errorY". The graph should know which axis
328
+ should be used to determine the size of this bullet - that's when graph.bulletAxis property should be set. Besides that,
329
+ you should also set graph.errorField. You can also use other bullet types with this feature too. For example, if you set
330
+ bulletAxis for XY chart, the size of a bullet will change as you zoom the chart.
331
+ Example: errorChart.html
235
332
 
236
333
 
237
- # You can specify custom column width for each graph individually. columnWidth property added to AmGraph. Note, you set
238
- relative width here (0 - 1), not width in pixels.
239
- Example: bulletChart.html
334
+ # You can specify custom column width for each graph individually. columnWidth property added to AmGraph. Note, you set
335
+ relative width here (0 - 1), not width in pixels.
336
+ Example: bulletChart.html
240
337
 
241
338
 
242
- # Columns can be overlaid on other columns, without making axis as stacked. clustered property added to AmGraph. In case you
243
- want to place graph's columns in front of other columns, set it to false.
244
- Example: bulletChart.html
339
+ # Columns can be overlaid on other columns, without making axis as stacked. clustered property added to AmGraph. In case you
340
+ want to place graph's columns in front of other columns, set it to false.
341
+ Example: bulletChart.html
245
342
 
246
343
 
247
- # Resize grips were made bigger to make life easier for users on touch devices.
344
+ # Resize grips were made bigger to make life easier for users on touch devices.
248
345
 
249
346
 
250
- # Balloons can now display any HTML and CSS inside them. This means you can add images, format text or display just about
251
- any HTML/CSS content. Because of this new feature, we removed textShadow property of AmBalloon in this version.
252
- Example: areaStacked.html, barStacked.html and many other.
347
+ # Balloons can now display any HTML and CSS inside them. This means you can add images, format text or display just about
348
+ any HTML/CSS content. Because of this new feature, we removed textShadow property of AmBalloon in this version.
349
+ Example: areaStacked.html, barStacked.html and many other.
253
350
 
254
351
 
255
- # Balloon now can animate from point to point and also fade out when user moves away from the chart. animationDuration and
256
- fadeOutDuration properties added to AmBalloon, with default values 0.3. animationDuration property was also added to
257
- ChartCursor, so that the cursor line would also animate to its position.
258
- Example: any chart with balloon.
352
+ # Balloon now can animate from point to point and also fade out when user moves away from the chart. animationDuration and
353
+ fadeOutDuration properties added to AmBalloon, with default values 0.3. animationDuration property was also added to
354
+ ChartCursor, so that the cursor line would also animate to its position.
355
+ Example: any chart with balloon.
259
356
 
260
357
 
261
- # Balloon now can display shadow. shadowColor (default #000000) and shadowAlpha (default 0.4) added to AmBalloon.
262
- Example: any chart with balloon.
358
+ # Balloon now can display shadow. shadowColor (default #000000) and shadowAlpha (default 0.4) added to AmBalloon.
359
+ Example: any chart with balloon.
263
360
 
264
361
 
265
- # Some default values of AmBalloon changed for a better usability - adjustBorderColor to true, cornerRadius to 0,
266
- pointerWidth to 6, color to #000000.
267
- Example: any chart with balloon.
362
+ # Some default values of AmBalloon changed for a better usability - adjustBorderColor to true, cornerRadius to 0,
363
+ pointerWidth to 6, color to #000000.
364
+ Example: any chart with balloon.
268
365
 
269
366
 
270
- # Stock chart can display scrollbar on top of the chart.
271
- Example: stockIntradayData.html
367
+ # Stock chart can display scrollbar on top of the chart.
368
+ Example: stockIntradayData.html
272
369
 
273
370
 
274
371
 
@@ -860,27 +957,27 @@ some minor bugs fixed.
860
957
  2.3.0
861
958
  Fixes in Flash version:
862
959
 
863
- Since the release of Flash Player 11, calling setSettings could cause browser
864
- crash. This problem fixed in this version. You only need to overwrite swf files.
960
+ Since the release of Flash Player 11, calling setSettings could cause browser
961
+ crash. This problem fixed in this version. You only need to overwrite swf files.
865
962
 
866
963
  Fixes in JavaScript version:
867
964
 
868
- Rollover balloon with cornerRadius set to 0 was distorted when it's close to the
869
- plot area's top.
965
+ Rollover balloon with cornerRadius set to 0 was distorted when it's close to the
966
+ plot area's top.
870
967
 
871
- amClickGraphItem event wasn't working for Radar Chart.
968
+ amClickGraphItem event wasn't working for Radar Chart.
872
969
 
873
- graph.showBalloon = false was ignored.
970
+ graph.showBalloon = false was ignored.
874
971
 
875
- The last item in chart.colors array was ignored.
972
+ The last item in chart.colors array was ignored.
876
973
 
877
- 3D stacked bar charts had layer order problems.
974
+ 3D stacked bar charts had layer order problems.
878
975
 
879
976
  New features in JavaScript version:
880
977
 
881
- minBulletSize property added to AmGraph. Might be useful for XY chart.
978
+ minBulletSize property added to AmGraph. Might be useful for XY chart.
882
979
 
883
- animateAgain() method added to all charts. Will trigger animation.
980
+ animateAgain() method added to all charts. Will trigger animation.
884
981
 
885
982
  2.2.1
886
983
  Changes were made in JavaScript version only.