Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
commit 74fb55076dd210a1cdc9675167a65c8a45b4fc68 2 parents 9bac832 + 080cbbb
Satyen Desai authored
View
41 build/charts-base/charts-base-debug.js
@@ -11680,7 +11680,11 @@ ChartBase.ATTRS = {
setter: function(val)
{
- this.get("contentBox").setAttribute("ariaLabel", val);
+ var cb = this.get("contentBox");
+ if(cb)
+ {
+ cb.setAttribute("aria-label", val);
+ }
return val;
}
},
@@ -12115,9 +12119,10 @@ ChartBase.prototype = {
renderUI: function()
{
var tt = this.get("tooltip"),
+ bb = this.get("boundingBox"),
cb = this.get("contentBox");
//move the position = absolute logic to a class file
- this.get("boundingBox").setStyle("position", "absolute");
+ bb.setStyle("position", "absolute");
cb.setStyle("position", "absolute");
this._addAxes();
this._addSeries();
@@ -12125,7 +12130,7 @@ ChartBase.prototype = {
{
this._addTooltip();
}
- this._setAriaElements(cb);
+ this._setAriaElements(bb, cb);
},
/**
@@ -12135,21 +12140,25 @@ ChartBase.prototype = {
* @param {Node} cb Reference to the Chart's `contentBox` attribute.
* @private
*/
- _setAriaElements: function(cb)
+ _setAriaElements: function(bb, cb)
{
var description = this._getAriaOffscreenNode(),
id = this.get("id") + "_description",
liveRegion = this._getAriaOffscreenNode();
- cb.set("role", "img");
- cb._node.setAttribute("aria-label", this.get("ariaLabel"));
- cb._node.setAttribute("aria-describedby", id);
cb.set("tabIndex", 0);
+ cb.set("role", "img");
+ cb.setAttribute("aria-label", this.get("ariaLabel"));
+ cb.setAttribute("aria-describedby", id);
description.set("id", id);
+ description.set("tabIndex", -1);
description.appendChild(DOCUMENT.createTextNode(this.get("ariaDescription")));
liveRegion.set("id", "live-region");
+ liveRegion.set("aria-live", "polite");
+ liveRegion.set("aria-atomic", "true");
liveRegion.set("role", "status");
- cb.appendChild(description);
- cb.appendChild(liveRegion);
+ bb.setAttribute("role", "application");
+ bb.appendChild(description);
+ bb.appendChild(liveRegion);
this._description = description;
this._liveRegion = liveRegion;
},
@@ -12163,13 +12172,14 @@ ChartBase.prototype = {
*/
_getAriaOffscreenNode: function()
{
- var node = Y.one(DOCUMENT.createElement("div"));
+ var node = Y.Node.create("<div></div>"),
+ ie = Y.UA.ie,
+ clipRect = (ie && ie < 8) ? "rect(1px 1px 1px 1px)" : "rect(1px, 1px, 1px, 1px)";
node.setStyle("position", "absolute");
node.setStyle("height", "1px");
node.setStyle("width", "1px");
node.setStyle("overflow", "hidden");
- node.setStyle("clip", "rect(1px 1px 1px 1px)");
- node.setStyle("clip", "rect(1px, 1px, 1px, 1px)");
+ node.setStyle("clip", clipRect);
return node;
},
@@ -12847,12 +12857,13 @@ Y.CartesianChart = Y.Base.create("cartesianChart", Y.Widget, [Y.ChartBase], {
*/
renderUI: function()
{
- var cb = this.get("contentBox"),
+ var bb = this.get("boundingBox"),
+ cb = this.get("contentBox"),
tt = this.get("tooltip"),
overlay,
overlayClass = _getClassName("overlay");
//move the position = absolute logic to a class file
- this.get("boundingBox").setStyle("position", "absolute");
+ bb.setStyle("position", "absolute");
cb.setStyle("position", "absolute");
this._addAxes();
this._addGridlines();
@@ -12874,7 +12885,7 @@ Y.CartesianChart = Y.Base.create("cartesianChart", Y.Widget, [Y.ChartBase], {
this._overlay.addClass(overlayClass);
this._overlay.setStyle("zIndex", 4);
}
- this._setAriaElements(cb);
+ this._setAriaElements(bb, cb);
this._redraw();
},
View
14 build/charts-base/charts-base-min.js
@@ -12,10 +12,10 @@ D.fill.color=this._getDefaultColor(this.get("graphOrder"),"fill");D.border.color
},setter:function(D){this.set("styles",{marker:D});}},line:{lazyAdd:false,getter:function(){return this.get("styles").line;},setter:function(D){this.set("styles",{line:D});}},area:{lazyAdd:false,getter:function(){return this.get("styles").area;},setter:function(D){this.set("styles",{area:D});}}}});b.StackedComboSeries=b.Base.create("stackedComboSeries",b.ComboSeries,[b.StackingUtil],{setAreaData:function(){b.StackedComboSeries.superclass.setAreaData.apply(this);this._stackCoordinates.apply(this);},drawSeries:function(){if(this.get("showAreaFill")){this.drawFill.apply(this,this._getStackedClosingPoints());}if(this.get("showLines")){this.drawLines();}if(this.get("showMarkers")){this.drawPlots();}}},{ATTRS:{type:{value:"stackedCombo"},showAreaFill:{value:true}}});b.ComboSplineSeries=b.Base.create("comboSplineSeries",b.ComboSeries,[b.CurveUtil],{drawSeries:function(){if(this.get("showAreaFill")){this.drawAreaSpline();}if(this.get("showLines")){this.drawSpline();}if(this.get("showMarkers")){this.drawPlots();}}},{ATTRS:{type:{value:"comboSpline"}}});b.StackedComboSplineSeries=b.Base.create("stackedComboSplineSeries",b.StackedComboSeries,[b.CurveUtil],{drawSeries:function(){if(this.get("showAreaFill")){this.drawStackedAreaSpline();}if(this.get("showLines")){this.drawSpline();}if(this.get("showMarkers")){this.drawPlots();}}},{ATTRS:{type:{value:"stackedComboSpline"},showAreaFill:{value:true}}});b.StackedLineSeries=b.Base.create("stackedLineSeries",b.LineSeries,[b.StackingUtil],{setAreaData:function(){b.StackedLineSeries.superclass.setAreaData.apply(this);this._stackCoordinates.apply(this);}},{ATTRS:{type:{value:"stackedLine"}}});b.StackedAreaSeries=b.Base.create("stackedAreaSeries",b.AreaSeries,[b.StackingUtil],{setAreaData:function(){b.StackedAreaSeries.superclass.setAreaData.apply(this);this._stackCoordinates.apply(this);},drawSeries:function(){this.drawFill.apply(this,this._getStackedClosingPoints());}},{ATTRS:{type:{value:"stackedArea"}}});b.StackedColumnSeries=b.Base.create("stackedColumnSeries",b.ColumnSeries,[b.StackingUtil],{drawSeries:function(){if(this.get("xcoords").length<1){return;}var V=q.isNumber,ad=b.clone(this.get("styles").marker),U=ad.width,ac=ad.height,W=this.get("xcoords"),ae=this.get("ycoords"),aa=0,ab=W.length,X=ae[0],I=this.get("type"),G=this.get("graph"),R=G.seriesTypes[I],P,Z=this.get("order"),T=this.get("graphOrder"),J,Q,E,O,M,S,Y,F=Z===0,H=ab*U,L={width:[],height:[]},N=[],K=[],D=this.get("groupMarkers");if(q.isArray(ad.fill.color)){E=ad.fill.color.concat();}if(q.isArray(ad.border.color)){O=ad.border.color.concat();}this._createMarkerCache();if(H>this.get("width")){P=this.width/H;U*=P;U=Math.max(U,1);}if(!F){M=R[Z-1];S=M.get("negativeBaseValues");Y=M.get("positiveBaseValues");if(!S||!Y){F=true;Y=[];S=[];}}else{S=[];Y=[];}this.set("negativeBaseValues",S);this.set("positiveBaseValues",Y);for(aa=0;aa<ab;++aa){J=W[aa];X=ae[aa];if(!V(X)||!V(J)){if(F){S[aa]=this._bottomOrigin;Y[aa]=this._bottomOrigin;}this._markers.push(null);continue;}if(F){ac=Math.abs(this._bottomOrigin-X);if(X<this._bottomOrigin){Y[aa]=X;S[aa]=this._bottomOrigin;}else{if(X>this._bottomOrigin){Y[aa]=this._bottomOrigin;S[aa]=X;X-=ac;}else{Y[aa]=X;S[aa]=X;}}}else{if(X>this._bottomOrigin){X+=(S[aa]-this._bottomOrigin);ac=X-S[aa];S[aa]=X;X-=ac;}else{if(X<=this._bottomOrigin){X=Y[aa]-(this._bottomOrigin-X);ac=Y[aa]-X;Y[aa]=X;}}}if(!isNaN(ac)&&ac>0){J-=U/2;if(D){L.width[aa]=U;L.height[aa]=ac;N.push(J);K.push(X);}else{ad.width=U;ad.height=ac;ad.x=J;ad.y=X;if(E){ad.fill.color=E[aa%E.length];}if(O){ad.border.color=O[aa%O.length];}Q=this.getMarker(ad,T,aa);}}else{if(!D){this._markers.push(null);}}}if(D){this._createGroupMarker({fill:ad.fill,border:ad.border,dimensions:L,xvalues:N,yvalues:K,shape:ad.shape});}else{this._clearMarkerCache();}},updateMarkerState:function(K,I){if(this._markers&&this._markers[I]){var M,F,D=this._getState(K),L=this.get("xcoords"),J=this._markers[I],H=0,E,G;M=this.get("styles").marker;H=M.width*0.5;F=D=="off"||!M[D]?b.clone(M):b.clone(M[D]);F.height=J.get("height");F.x=(L[I]-H);F.y=J.get("y");F.id=J.get("id");E=F.fill.color;G=F.border.color;if(q.isArray(E)){F.fill.color=E[I%E.length];}else{F.fill.color=this._getItemColor(F.fill.color,I);}if(q.isArray(G)){F.border.color=G[I%G.length];}else{F.border.color=this._getItemColor(F.border.color,I);}J.set(F);}},_getPlotDefaults:function(){var D={fill:{type:"solid",alpha:1,colors:null,alphas:null,ratios:null},border:{weight:0,alpha:1},width:24,height:24,shape:"rect",padding:{top:0,left:0,right:0,bottom:0}};D.fill.color=this._getDefaultColor(this.get("graphOrder"),"fill");D.border.color=this._getDefaultColor(this.get("graphOrder"),"border");return D;}},{ATTRS:{type:{value:"stackedColumn"},negativeBaseValues:{value:null},positiveBaseValues:{value:null}}});b.StackedBarSeries=b.Base.create("stackedBarSeries",b.BarSeries,[b.StackingUtil],{drawSeries:function(){if(this.get("xcoords").length<1){return;}var U=q.isNumber,ac=b.clone(this.get("styles").marker),T=ac.width,ab=ac.height,V=this.get("xcoords"),ae=this.get("ycoords"),Z=0,aa=V.length,W=ae[0],H=this.get("type"),G=this.get("graph"),Q=G.seriesTypes[H],O,Y=this.get("order"),S=this.get("graphOrder"),I,P,L,R,X,E,N,F=Y===0,ad=aa*ab,K={width:[],height:[]},M=[],J=[],D=this.get("groupMarkers");if(q.isArray(ac.fill.color)){E=ac.fill.color.concat();}if(q.isArray(ac.border.color)){N=ac.border.color.concat();}this._createMarkerCache();if(ad>this.get("height")){O=this.height/ad;ab*=O;ab=Math.max(ab,1);}if(!F){L=Q[Y-1];R=L.get("negativeBaseValues");X=L.get("positiveBaseValues");if(!R||!X){F=true;X=[];R=[];}}else{R=[];X=[];}this.set("negativeBaseValues",R);this.set("positiveBaseValues",X);for(Z=0;Z<aa;++Z){W=ae[Z];I=V[Z];if(!U(W)||!U(I)){if(F){X[Z]=this._leftOrigin;R[Z]=this._leftOrigin;}this._markers.push(null);continue;}if(F){T=Math.abs(I-this._leftOrigin);if(I>this._leftOrigin){X[Z]=I;R[Z]=this._leftOrigin;I-=T;}else{if(I<this._leftOrigin){X[Z]=this._leftOrigin;R[Z]=I;}else{X[Z]=I;R[Z]=this._leftOrigin;}}}else{if(I<this._leftOrigin){I=R[Z]-(this._leftOrigin-V[Z]);
T=R[Z]-I;R[Z]=I;}else{if(I>=this._leftOrigin){I+=(X[Z]-this._leftOrigin);T=I-X[Z];X[Z]=I;I-=T;}}}if(!isNaN(T)&&T>0){W-=ab/2;if(D){K.width[Z]=T;K.height[Z]=ab;M.push(I);J.push(W);}else{ac.width=T;ac.height=ab;ac.x=I;ac.y=W;if(E){ac.fill.color=E[Z%E.length];}if(N){ac.border.color=N[Z%N.length];}P=this.getMarker(ac,S,Z);}}else{if(!D){this._markers.push(null);}}}if(D){this._createGroupMarker({fill:ac.fill,border:ac.border,dimensions:K,xvalues:M,yvalues:J,shape:ac.shape});}else{this._clearMarkerCache();}},updateMarkerState:function(L,I){if(this._markers[I]){var D=this._getState(L),H=this.get("ycoords"),J=this._markers[I],M=this.get("styles").marker,K=M.height,F=D=="off"||!M[D]?b.clone(M):b.clone(M[D]),E,G;F.y=(H[I]-K/2);F.x=J.get("x");F.width=J.get("width");F.id=J.get("id");E=F.fill.color;G=F.border.color;if(q.isArray(E)){F.fill.color=E[I%E.length];}else{F.fill.color=this._getItemColor(F.fill.color,I);}if(q.isArray(G)){F.border.color=G[I%G.length];}else{F.border.color=this._getItemColor(F.border.color,I);}J.set(F);}},_getPlotDefaults:function(){var D={fill:{type:"solid",alpha:1,colors:null,alphas:null,ratios:null},border:{weight:0,alpha:1},width:24,height:24,shape:"rect",padding:{top:0,left:0,right:0,bottom:0}};D.fill.color=this._getDefaultColor(this.get("graphOrder"),"fill");D.border.color=this._getDefaultColor(this.get("graphOrder"),"border");return D;}},{ATTRS:{type:{value:"stackedBar"},direction:{value:"vertical"},negativeBaseValues:{value:null},positiveBaseValues:{value:null}}});b.PieSeries=b.Base.create("pieSeries",b.MarkerSeries,[],{_map:null,_image:null,_setMap:function(){var F="pieHotSpotMapi_"+Math.round(100000*Math.random()),D=this.get("graph").get("contentBox"),E;if(this._image){D.removeChild(this._image);while(this._areaNodes&&this._areaNodes.length>0){E=this._areaNodes.shift();this._map.removeChild(E);}D.removeChild(this._map);}this._image=g.createElement("img");this._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAABCAYAAAD9yd/wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABJJREFUeNpiZGBgSGPAAgACDAAIkABoFyloZQAAAABJRU5ErkJggg==";D.appendChild(this._image);this._image.setAttribute("usemap","#"+F);this._image.style.zIndex=3;this._image.style.opacity=0;this._image.setAttribute("alt","imagemap");this._map=g.createElement("map");this._map.style.zIndex=5;D.appendChild(this._map);this._map.setAttribute("name",F);this._map.setAttribute("id",F);this._areaNodes=[];},_categoryDisplayName:null,_valueDisplayName:null,addListeners:function(){var D=this.get("categoryAxis"),E=this.get("valueAxis");if(D){D.after("dataReady",b.bind(this._categoryDataChangeHandler,this));D.after("dataUpdate",b.bind(this._categoryDataChangeHandler,this));}if(E){E.after("dataReady",b.bind(this._valueDataChangeHandler,this));E.after("dataUpdate",b.bind(this._valueDataChangeHandler,this));}this.after("categoryAxisChange",this.categoryAxisChangeHandler);this.after("valueAxisChange",this.valueAxisChangeHandler);this.after("stylesChange",this._updateHandler);},validate:function(){this.draw();this._renderered=true;},_categoryAxisChangeHandler:function(D){var E=this.get("categoryAxis");E.after("dataReady",b.bind(this._categoryDataChangeHandler,this));E.after("dataUpdate",b.bind(this._categoryDataChangeHandler,this));},_valueAxisChangeHandler:function(D){var E=this.get("valueAxis");E.after("dataReady",b.bind(this._valueDataChangeHandler,this));E.after("dataUpdate",b.bind(this._valueDataChangeHandler,this));},GUID:"pieseries",_categoryDataChangeHandler:function(D){if(this._rendered&&this.get("categoryKey")&&this.get("valueKey")){this.draw();}},_valueDataChangeHandler:function(D){if(this._rendered&&this.get("categoryKey")&&this.get("valueKey")){this.draw();}},draw:function(){var F=this.get("graph"),D=F.get("width"),E=F.get("height");if(isFinite(D)&&isFinite(E)&&D>0&&E>0){this._rendered=true;if(this._drawing){this._callLater=true;return;}this._drawing=true;this._callLater=false;this.drawSeries();this._drawing=false;if(this._callLater){this.draw();}else{this.fire("drawingComplete");}}},drawPlots:function(){var F=this.get("valueAxis").getDataByKey(this.get("valueKey")).concat(),G=this.get("categoryAxis").getDataByKey(this.get("categoryKey")).concat(),J=0,ai=F.length,R=this.get("styles").marker,D=R.fill.colors,aj=R.fill.alphas||["1"],N=R.border.colors,H=[R.border.weight],I=[R.border.alpha],ak=H.concat(),T=N.concat(),V=I.concat(),af,ah,W=R.padding,E=this.get("graph"),P=Math.min(E.get("width"),E.get("height")),U=P-(W.left+W.right),ae=P-(W.top+W.bottom),ac=-90,O=U/2,X=ae/2,K=Math.min(O,X),ad=0,aa,ag=0,Z,ab,L,S,M,Q=this.get("graphOrder"),Y=b.Graphic.NAME=="canvasGraphic";for(;ad<ai;++ad){aa=parseFloat(F[ad]);F.push(aa);if(!isNaN(aa)){J+=aa;}}af=D?D.concat():null;ah=aj?aj.concat():null;this._createMarkerCache();if(Y){this._setMap();this._image.width=U;this._image.height=ae;}for(ad=0;ad<ai;ad++){aa=F[ad];if(J===0){ag=360/F.length;}else{ag=360*(aa/J);}ag=Math.round(ag);if(af&&af.length<1){af=D.concat();}if(ah&&ah.length<1){ah=aj.concat();}if(ak&&ak.length<1){ak=H.concat();}if(ak&&T.length<1){T=N.concat();}if(V&&V.length<1){V=I.concat();}L=ak?ak.shift():null;Z=T?T.shift():null;ab=V?V.shift():null;ac+=ag;S={border:{color:Z,weight:L,alpha:ab},fill:{color:af?af.shift():this._getDefaultColor(ad,"slice"),alpha:ah?ah.shift():null},type:"pieslice",arc:ag,radius:K,startAngle:ac,cx:O,cy:X,width:U,height:ae};M=this.getMarker(S,Q,ad);if(Y){this._addHotspot(S,Q,ad);}}this._clearMarkerCache();},_addHotspot:function(G,T,H){var Q=g.createElement("area"),S=1,M=G.cx,K=G.cy,J=G.arc,R=G.startAngle-J,P=G.startAngle,E=G.radius,N=M+Math.cos(R/180*Math.PI)*E,L=K+Math.sin(R/180*Math.PI)*E,V=M+Math.cos(P/180*Math.PI)*E,U=K+Math.sin(P/180*Math.PI)*E,Y=Math.floor(J/10)-1,F=(J/(Math.floor(J/10))/180)*Math.PI,I=Math.atan((L-K)/(N-M)),X=M+", "+K+", "+N+", "+L,W,O,D;for(S=1;S<=Y;++S){D=F*S;W=Math.cos(I+D);O=Math.sin(I+D);if(R<=90){X+=", "+(M+(E*Math.cos(I+(F*S))));X+=", "+(K+(E*Math.sin(I+(F*S))));}else{X+=", "+(M-(E*Math.cos(I+(F*S))));X+=", "+(K-(E*Math.sin(I+(F*S))));
}}X+=", "+V+", "+U;X+=", "+M+", "+K;this._map.appendChild(Q);Q.setAttribute("class",n);Q.setAttribute("id","hotSpot_"+T+"_"+H);Q.setAttribute("shape","polygon");Q.setAttribute("coords",X);this._areaNodes.push(Q);},updateMarkerState:function(H,F){if(this._markers[F]){var J=this._getState(H),E,G,D=this._markers[F],I=this.get("styles").marker;E=J=="off"||!I[J]?I:I[J];G=this._mergeStyles(E,{});G.fill.color=G.fill.colors[F%G.fill.colors.length];G.fill.alpha=G.fill.alphas[F%G.fill.alphas.length];D.set(G);}},_createMarker:function(H,D,G){var I=this.get("graphic"),F,E=b.clone(H);I.set("autoDraw",false);F=I.addShape(E);F.addClass(n);return F;},_clearMarkerCache:function(){var D=this._markerCache.length,F=0,E;for(;F<D;++F){E=this._markerCache[F];if(E){E.destroy();}}this._markerCache=[];},_getPlotDefaults:function(){var D={padding:{top:0,left:0,right:0,bottom:0},fill:{alphas:["1"]},border:{weight:0,alpha:1}};D.fill.colors=this._defaultSliceColors;D.border.colors=this._defaultBorderColors;return D;},_defaultLineColors:["#426ab3","#d09b2c","#000000","#b82837","#b384b5","#ff7200","#779de3","#cbc8ba","#7ed7a6","#007a6c"],_defaultFillColors:["#6084d0","#eeb647","#6c6b5f","#d6484f","#ce9ed1","#ff9f3b","#93b7ff","#e0ddd0","#94ecba","#309687"],_defaultBorderColors:["#205096","#b38206","#000000","#94001e","#9d6fa0","#e55b00","#5e85c9","#adab9e","#6ac291","#006457"],_defaultSliceColors:["#66007f","#a86f41","#295454","#996ab2","#e8cdb7","#90bdbd","#000000","#c3b8ca","#968373","#678585"],_getDefaultColor:function(G,H){var E={line:this._defaultLineColors,fill:this._defaultFillColors,border:this._defaultBorderColors,slice:this._defaultSliceColors},F=E[H],D=F.length;G=G||0;if(G>=D){G=G%D;}H=H||"fill";return E[H][G];}},{ATTRS:{type:{value:"pie"},order:{},graph:{},categoryAxis:{value:null,validator:function(D){return D!==this.get("categoryAxis");}},valueAxis:{value:null,validator:function(D){return D!==this.get("valueAxis");}},categoryKey:{value:null,validator:function(D){return D!==this.get("categoryKey");}},valueKey:{value:null,validator:function(D){return D!==this.get("valueKey");}},categoryDisplayName:{setter:function(D){this._categoryDisplayName=D;return D;},getter:function(){return this._categoryDisplayName||this.get("categoryKey");}},valueDisplayName:{setter:function(D){this._valueDisplayName=D;return D;},getter:function(){return this._valueDisplayName||this.get("valueKey");}},slices:null}});b.Gridlines=b.Base.create("gridlines",b.Base,[b.Renderer],{_path:null,remove:function(){var D=this._path;if(D){D.destroy();}},draw:function(){if(this.get("axis")&&this.get("graph")){this._drawGridlines();}},_drawGridlines:function(){var R,D=this.get("axis"),L=D.get("position"),O,I=0,F,M=this.get("direction"),P=this.get("graph"),N=P.get("width"),K=P.get("height"),Q=this.get("styles").line,H=Q.color,J=Q.weight,G=Q.alpha,E=M=="vertical"?this._verticalLine:this._horizontalLine;if(isFinite(N)&&isFinite(K)&&N>0&&K>0){if(L!="none"&&D&&D.get("tickPoints")){O=D.get("tickPoints");F=O.length;}else{O=[];F=D.get("styles").majorUnit.count;for(;I<F;++I){O[I]={x:N*(I/(F-1)),y:K*(I/(F-1))};}I=0;}R=P.get("gridlines");R.set("width",N);R.set("height",K);R.set("stroke",{weight:J,color:H,opacity:G});for(;I<F;++I){E(R,O[I],N,K);}R.end();}},_horizontalLine:function(G,F,D,E){G.moveTo(0,F.y);G.lineTo(D,F.y);},_verticalLine:function(G,F,D,E){G.moveTo(F.x,0);G.lineTo(F.x,E);},_getDefaultStyles:function(){var D={line:{color:"#f0efe9",weight:1,alpha:1}};return D;}},{ATTRS:{direction:{},axis:{},graph:{}}});b.Graph=b.Base.create("graph",b.Widget,[b.Renderer],{bindUI:function(){var D=this.get("boundingBox");D.setStyle("position","absolute");this.after("widthChange",this._sizeChangeHandler);this.after("heightChange",this._sizeChangeHandler);this.after("stylesChange",this._updateStyles);},syncUI:function(){var D,G,H,L=this.get("seriesCollection"),I,J=0,K=L.length,E=this.get("horizontalGridlines"),F=this.get("verticalGridlines");if(this.get("showBackground")){D=this.get("background");G=this.get("contentBox");H=this.get("styles").background;H.stroke=H.border;H.stroke.opacity=H.stroke.alpha;H.fill.opacity=H.fill.alpha;H.width=this.get("width");H.height=this.get("height");H.type=H.shape;D.set(H);}for(;J<K;++J){I=L[J];if(I instanceof b.CartesianSeries){I.render();}}if(E&&E instanceof b.Gridlines){E.draw();}if(F&&F instanceof b.Gridlines){F.draw();}},seriesTypes:null,getSeriesByIndex:function(F){var D=this.get("seriesCollection"),E;if(D&&D.length>F){E=D[F];}return E;},getSeriesByKey:function(F){var E=this._seriesDictionary,D;if(E&&E.hasOwnProperty(F)){D=E[F];}return D;},addDispatcher:function(D){if(!this._dispatchers){this._dispatchers=[];}this._dispatchers.push(D);},_seriesCollection:null,_seriesDictionary:null,_parseSeriesCollection:function(H){if(!H){return;}var E=H.length,G=0,F,D;if(!this.get("seriesCollection")){this._seriesCollection=[];}if(!this._seriesDictionary){this._seriesDictionary={};}if(!this.seriesTypes){this.seriesTypes=[];}for(;G<E;++G){F=H[G];if(!(F instanceof b.CartesianSeries)&&!(F instanceof b.PieSeries)){this._createSeries(F);continue;}this._addSeries(F);}E=this.get("seriesCollection").length;for(G=0;G<E;++G){F=this.get("seriesCollection")[G];D=F.get("direction")=="horizontal"?"yKey":"xKey";this._seriesDictionary[F.get(D)]=F;}},_addSeries:function(F){var G=F.get("type"),I=this.get("seriesCollection"),H=I.length,E=this.seriesTypes,D;if(!F.get("graph")){F.set("graph",this);}I.push(F);if(!E.hasOwnProperty(G)){this.seriesTypes[G]=[];}D=this.seriesTypes[G];F.set("graphOrder",H);F.set("order",D.length);D.push(F);this.addDispatcher(F);F.after("drawingComplete",b.bind(this._drawingCompleteHandler,this));this.fire("seriesAdded",F);},_createSeries:function(H){var I=H.type,J=this.get("seriesCollection"),F=this.seriesTypes,E,D,G;H.graph=this;if(!F.hasOwnProperty(I)){F[I]=[];}E=F[I];H.graph=this;H.order=E.length;H.graphOrder=J.length;D=this._getSeries(H.type);G=new D(H);this.addDispatcher(G);G.after("drawingComplete",b.bind(this._drawingCompleteHandler,this));
-E.push(G);J.push(G);},_seriesMap:{line:b.LineSeries,column:b.ColumnSeries,bar:b.BarSeries,area:b.AreaSeries,candlestick:b.CandlestickSeries,ohlc:b.OHLCSeries,stackedarea:b.StackedAreaSeries,stackedline:b.StackedLineSeries,stackedcolumn:b.StackedColumnSeries,stackedbar:b.StackedBarSeries,markerseries:b.MarkerSeries,spline:b.SplineSeries,areaspline:b.AreaSplineSeries,stackedspline:b.StackedSplineSeries,stackedareaspline:b.StackedAreaSplineSeries,stackedmarkerseries:b.StackedMarkerSeries,pie:b.PieSeries,combo:b.ComboSeries,stackedcombo:b.StackedComboSeries,combospline:b.ComboSplineSeries,stackedcombospline:b.StackedComboSplineSeries},_getSeries:function(D){var E;if(q.isString(D)){E=this._seriesMap[D];}else{E=D;}return E;},_markerEventHandler:function(I){var G=I.type,D=I.currentTarget,H=D.getAttribute("id").split("_"),F=this.getSeriesByIndex(H[1]),E=H[2];F.updateMarkerState(G,E);},_dispatchers:null,_updateStyles:function(){var E=this.get("styles").background,D=E.border;D.opacity=D.alpha;E.stroke=D;E.fill.opacity=E.fill.alpha;this.get("background").set(E);this._sizeChangeHandler();},_sizeChangeHandler:function(J){var D=this.get("horizontalGridlines"),K=this.get("verticalGridlines"),E=this.get("width"),H=this.get("height"),G=this.get("styles").background,I,F;if(G&&G.border){I=G.border.weight||0;}if(this.get("showBackground")){F=this.get("background");if(E&&H){F.set("width",E);F.set("height",H);}}if(this._gridlines){this._gridlines.clear();}if(D&&D instanceof b.Gridlines){D.draw();}if(K&&K instanceof b.Gridlines){K.draw();}this._drawSeries();},_drawSeries:function(){if(this._drawing){this._callLater=true;return;}var F,E,D,G=this.get("graphic");G.set("autoDraw",false);this._callLater=false;this._drawing=true;F=this.get("seriesCollection");E=0;D=F.length;for(;E<D;++E){F[E].draw();if((!F[E].get("xcoords")||!F[E].get("ycoords"))&&!F[E] instanceof b.PieSeries){this._callLater=true;break;}}this._drawing=false;if(this._callLater){this._drawSeries();}},_drawingCompleteHandler:function(F){var E=F.currentTarget,G,D=b.Array.indexOf(this._dispatchers,E);if(D>-1){this._dispatchers.splice(D,1);}if(this._dispatchers.length<1){G=this.get("graphic");if(!G.get("autoDraw")){G._redraw();}this.fire("chartRendered");}},_getDefaultStyles:function(){var D={background:{shape:"rect",fill:{color:"#faf9f2"},border:{color:"#dad8c9",weight:1}}};return D;},destructor:function(){if(this._graphic){this._graphic.destroy();}if(this._background){this._background.get("graphic").destroy();}if(this._gridlines){this._gridlines.get("graphic").destroy();}}},{ATTRS:{x:{setter:function(D){this.get("boundingBox").setStyle("left",D+"px");return D;}},y:{setter:function(D){this.get("boundingBox").setStyle("top",D+"px");return D;}},chart:{},seriesCollection:{getter:function(){return this._seriesCollection;},setter:function(D){this._parseSeriesCollection(D);return this._seriesCollection;}},showBackground:{value:true},seriesDictionary:{readOnly:true,getter:function(){return this._seriesDictionary;}},horizontalGridlines:{value:null,setter:function(E){var D=this.get("horizontalGridlines");if(D&&D instanceof b.Gridlines){D.remove();}if(E instanceof b.Gridlines){D=E;E.set("graph",this);return E;}else{if(E&&E.axis){D=new b.Gridlines({direction:"horizontal",axis:E.axis,graph:this,styles:E.styles});return D;}}}},verticalGridlines:{value:null,setter:function(E){var D=this.get("verticalGridlines");if(D&&D instanceof b.Gridlines){D.remove();}if(E instanceof b.Gridlines){D=E;E.set("graph",this);return E;}else{if(E&&E.axis){D=new b.Gridlines({direction:"vertical",axis:E.axis,graph:this,styles:E.styles});return D;}}}},background:{getter:function(){if(!this._background){this._backgroundGraphic=new b.Graphic({render:this.get("contentBox")});this._backgroundGraphic.get("node").style.zIndex=0;this._background=this._backgroundGraphic.addShape({type:"rect"});}return this._background;}},gridlines:{readOnly:true,getter:function(){if(!this._gridlines){this._gridlinesGraphic=new b.Graphic({render:this.get("contentBox")});this._gridlinesGraphic.get("node").style.zIndex=1;this._gridlines=this._gridlinesGraphic.addShape({type:"path"});}return this._gridlines;}},graphic:{readOnly:true,getter:function(){if(!this._graphic){this._graphic=new b.Graphic({render:this.get("contentBox")});this._graphic.get("node").style.zIndex=2;this._graphic.set("autoDraw",false);}return this._graphic;}},groupMarkers:{value:false}}});function o(){}o.ATTRS={ariaLabel:{value:"Chart Application",setter:function(D){this.get("contentBox").setAttribute("ariaLabel",D);return D;}},ariaDescription:{value:"Use the up and down keys to navigate between series. Use the left and right keys to navigate through items in a series.",setter:function(D){if(this._description){this._description.setContent("");this._description.appendChild(g.createTextNode(D));}return D;}},tooltip:{valueFn:"_getTooltip",setter:function(D){return this._updateTooltip(D);}},categoryKey:{value:"category"},categoryType:{value:"category"},interactionType:{value:"marker"},dataProvider:{setter:function(D){return this._setDataValues(D);}},seriesKeys:{},axesCollection:{},graph:{valueFn:"_getGraph"},groupMarkers:{value:false,setter:function(D){if(this.get("graph")){this.get("graph").set("groupMarkers",D);}return D;}}};o.prototype={_itemRendered:function(D){this._itemRenderQueue=this._itemRenderQueue.splice(1+b.Array.indexOf(this._itemRenderQueue,D.currentTarget),1);if(this._itemRenderQueue.length<1){this._redraw();}},_getGraph:function(){var D=new b.Graph({chart:this,groupMarkers:this.get("groupMarkers")});D.after("chartRendered",b.bind(function(E){this.fire("chartRendered");},this));return D;},getSeries:function(F){var D=null,E=this.get("graph");if(E){if(q.isNumber(F)){D=E.getSeriesByIndex(F);}else{D=E.getSeriesByKey(F);}}return D;},getAxisByKey:function(F){var D,E=this.get("axes");if(E&&E.hasOwnProperty(F)){D=E[F];}return D;},getCategoryAxis:function(){var E,D=this.get("categoryKey"),F=this.get("axes");if(F.hasOwnProperty(D)){E=F[D];}return E;
-},_direction:"horizontal",_dataProvider:null,_setDataValues:function(I){if(q.isArray(I[0])){var H,K=[],F=I[0],G=0,E=F.length,J,D=I.length;for(;G<E;++G){H={category:F[G]};for(J=1;J<D;++J){H["series"+J]=I[J][G];}K[G]=H;}return K;}return I;},_seriesCollection:null,_setSeriesCollection:function(D){this._seriesCollection=D;},_getAxisClass:function(D){return this._axisClass[D];},_axisClass:{stacked:b.StackedAxis,numeric:b.NumericAxis,category:b.CategoryAxis,time:b.TimeAxis},_axes:null,initializer:function(){this._itemRenderQueue=[];this._seriesIndex=-1;this._itemIndex=-1;this.after("dataProviderChange",this._dataProviderChangeHandler);},renderUI:function(){var E=this.get("tooltip"),D=this.get("contentBox");this.get("boundingBox").setStyle("position","absolute");D.setStyle("position","absolute");this._addAxes();this._addSeries();if(E&&E.show){this._addTooltip();}this._setAriaElements(D);},_setAriaElements:function(E){var F=this._getAriaOffscreenNode(),G=this.get("id")+"_description",D=this._getAriaOffscreenNode();E.set("role","img");E._node.setAttribute("aria-label",this.get("ariaLabel"));E._node.setAttribute("aria-describedby",G);E.set("tabIndex",0);F.set("id",G);F.appendChild(g.createTextNode(this.get("ariaDescription")));D.set("id","live-region");D.set("role","status");E.appendChild(F);E.appendChild(D);this._description=F;this._liveRegion=D;},_getAriaOffscreenNode:function(){var D=b.one(g.createElement("div"));D.setStyle("position","absolute");D.setStyle("height","1px");D.setStyle("width","1px");D.setStyle("overflow","hidden");D.setStyle("clip","rect(1px 1px 1px 1px)");D.setStyle("clip","rect(1px, 1px, 1px, 1px)");return D;},syncUI:function(){this._redraw();},bindUI:function(){this.after("tooltipChange",b.bind(this._tooltipChangeHandler,this));this.after("widthChange",this._sizeChanged);this.after("heightChange",this._sizeChanged);var K=this.get("tooltip"),E="mouseout",L="mouseover",F=this.get("contentBox"),D=this.get("interactionType"),I=0,J,H="."+n,G=((v&&("ontouchstart" in v))&&!(b.UA.chrome&&b.UA.chrome<6));b.on("keydown",b.bind(function(O){var N=O.keyCode,M=parseFloat(N),P;if(M>36&&M<41){O.halt();P=this._getAriaMessage(M);this._liveRegion.setContent("");this._liveRegion.appendChild(g.createTextNode(P));}},this),this.get("contentBox"));if(D=="marker"){E=K.hideEvent;L=K.showEvent;if(G){b.delegate("touchend",b.bind(this._markerEventDispatcher,this),F,H);b.on("touchend",b.bind(function(M){M.halt(true);if(this._activeMarker){this._activeMarker=null;this.hideTooltip(M);}},this));}else{b.delegate("mouseenter",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mousedown",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mouseup",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mouseleave",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("click",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mousemove",b.bind(this._positionTooltip,this),F,H);}}else{if(D=="planar"){if(G){this._overlay.on("touchend",b.bind(this._planarEventDispatcher,this));}else{this._overlay.on("mousemove",b.bind(this._planarEventDispatcher,this));this.on("mouseout",this.hideTooltip);}}}if(K){this.on("markerEvent:touchend",b.bind(function(N){var M=N.series.get("markers")[N.index];if(this._activeMarker&&M===this._activeMarker){this._activeMarker=null;this.hideTooltip(N);}else{this._activeMarker=M;K.markerEventHandler.apply(this,[N]);}},this));if(E&&L&&E==L){this.on(D+"Event:"+E,this.toggleTooltip);}else{if(L){this.on(D+"Event:"+L,K[D+"EventHandler"]);}if(E){if(q.isArray(E)){J=E.length;for(;I<J;++I){this.on(D+"Event:"+E[I],this.hideTooltip);}}this.on(D+"Event:"+E,this.hideTooltip);}}}},_markerEventDispatcher:function(K){var M=K.type,D=this.get("contentBox"),Q=K.currentTarget,P=Q.getAttribute("id").split("_"),J=P.pop(),H=P.pop(),I=this.getSeries(parseInt(H,10)),L=this.getSeriesItems(I,J),F=K&&K.hasOwnProperty("changedTouches"),G=F?K.changedTouches[0].pageX:K.pageX,E=F?K.changedTouches[0].pageY:K.pageY,O=G-D.getX(),N=E-D.getY();if(M=="mouseenter"){M="mouseover";}else{if(M=="mouseleave"){M="mouseout";}}I.updateMarkerState(M,J);K.halt();this.fire("markerEvent:"+M,{originEvent:K,pageX:G,pageY:E,categoryItem:L.category,valueItem:L.value,node:Q,x:O,y:N,series:I,index:J,seriesIndex:H});},_dataProviderChangeHandler:function(H){var E=this.get("dataProvider"),G=this.get("axes"),D,F;this._seriesIndex=-1;this._itemIndex=-1;if(G){for(D in G){if(G.hasOwnProperty(D)){F=G[D];if(F instanceof b.Axis){if(F.get("position")!="none"){this._addToAxesRenderQueue(F);}F.set("dataProvider",E);}}}}},toggleTooltip:function(E){var D=this.get("tooltip");if(D.visible){this.hideTooltip();}else{D.markerEventHandler.apply(this,[E]);}},_showTooltip:function(G,D,H){var E=this.get("tooltip"),F=E.node;if(G){E.visible=true;E.setTextFunction(F,G);F.setStyle("top",H+"px");F.setStyle("left",D+"px");F.setStyle("visibility","visible");}},_positionTooltip:function(H){var F=this.get("tooltip"),G=F.node,E=this.get("contentBox"),D=(H.pageX+10)-E.getX(),I=(H.pageY+10)-E.getY();if(G){G.setStyle("left",D+"px");G.setStyle("top",I+"px");}},hideTooltip:function(){var D=this.get("tooltip"),E=D.node;D.visible=false;E.set("innerHTML","");E.setStyle("left",-10000);E.setStyle("top",-10000);E.setStyle("visibility","hidden");},_addTooltip:function(){var E=this.get("tooltip"),G=this.get("id")+"_tooltip",D=this.get("contentBox"),F=g.getElementById(G);if(F){D.removeChild(F);}E.node.set("id",G);E.node.setStyle("visibility","hidden");D.appendChild(E.node);},_updateTooltip:function(I){var F=this._tooltip,D,H,G,E={markerLabelFunction:"markerLabelFunction",planarLabelFunction:"planarLabelFunction",setTextFunction:"setTextFunction",showEvent:"showEvent",hideEvent:"hideEvent",markerEventHandler:"markerEventHandler",planarEventHandler:"planarEventHandler",show:"show"};if(q.isObject(I)){H=I.styles;G=b.one(I.node)||F.node;if(H){for(D in H){if(H.hasOwnProperty(D)){G.setStyle(D,H[D]);}}}for(D in E){if(I.hasOwnProperty(D)){F[D]=I[D];}}F.node=G;}return F;},_getTooltip:function(){var E=g.createElement("div"),D={setTextFunction:this._setText,markerLabelFunction:this._tooltipLabelFunction,planarLabelFunction:this._planarLabelFunction,show:true,hideEvent:"mouseout",showEvent:"mouseover",markerEventHandler:function(G){var F=this.get("tooltip"),H=F.markerLabelFunction.apply(this,[G.categoryItem,G.valueItem,G.index,G.series,G.seriesIndex]);
-this._showTooltip(H,G.x+10,G.y+10);},planarEventHandler:function(G){var F=this.get("tooltip"),I,H=this.get("categoryAxis");I=F.planarLabelFunction.apply(this,[H,G.valueItem,G.index,G.items,G.seriesIndex]);this._showTooltip(I,G.x+10,G.y+10);}};E=b.one(E);E.set("id",this.get("id")+"_tooltip");E.setStyle("fontSize","85%");E.setStyle("opacity","0.83");E.setStyle("position","absolute");E.setStyle("paddingTop","2px");E.setStyle("paddingRight","5px");E.setStyle("paddingBottom","4px");E.setStyle("paddingLeft","2px");E.setStyle("backgroundColor","#fff");E.setStyle("border","1px solid #dbdccc");E.setStyle("pointerEvents","none");E.setStyle("zIndex",3);E.setStyle("whiteSpace","noWrap");E.setStyle("visibility","hidden");D.node=b.one(E);this._tooltip=D;return D;},_planarLabelFunction:function(K,P,M,I,G){var E=g.createElement("div"),N,J=0,L=I.length,F,D,O,H;if(K){D=K.get("labelFunction").apply(this,[K.getKeyValueAt(this.get("categoryKey"),M),K.get("labelFormat")]);if(q.isString(D)){D=g.createTextNode(D);}E.appendChild(D);}for(;J<L;++J){H=I[J];if(H.get("visible")){N=P[J];F=N.axis;O=F.get("labelFunction").apply(this,[F.getKeyValueAt(N.key,M),F.get("labelFormat")]);E.appendChild(g.createElement("br"));E.appendChild(g.createTextNode(N.displayName));E.appendChild(g.createTextNode(": "));if(q.isString(O)){O=g.createTextNode(O);}E.appendChild(O);}}return E;},_tooltipLabelFunction:function(K,E,H,G,F){var J=g.createElement("div"),D=K.axis.get("labelFunction").apply(this,[K.value,K.axis.get("labelFormat")]),I=E.axis.get("labelFunction").apply(this,[E.value,E.axis.get("labelFormat")]);J.appendChild(g.createTextNode(K.displayName));J.appendChild(g.createTextNode(": "));if(q.isString(D)){D=g.createTextNode(D);}J.appendChild(D);J.appendChild(g.createElement("br"));J.appendChild(g.createTextNode(E.displayName));J.appendChild(g.createTextNode(": "));if(q.isString(I)){I=g.createTextNode(I);}J.appendChild(I);return J;},_tooltipChangeHandler:function(H){if(this.get("tooltip")){var F=this.get("tooltip"),G=F.node,E=F.show,D=this.get("contentBox");if(G&&E){if(!D.contains(G)){this._addTooltip();}}}},_setText:function(D,E){D.setContent("");if(q.isNumber(E)){E=E+"";}else{if(!E){E="";}}if(m(E)){E=g.createTextNode(E);}D.appendChild(E);}};b.ChartBase=o;b.CartesianChart=b.Base.create("cartesianChart",b.Widget,[b.ChartBase],{renderUI:function(){var D=this.get("contentBox"),G=this.get("tooltip"),E,F=c("overlay");this.get("boundingBox").setStyle("position","absolute");D.setStyle("position","absolute");this._addAxes();this._addGridlines();this._addSeries();if(G&&G.show){this._addTooltip();}this.get("styles");if(this.get("interactionType")=="planar"){E=g.createElement("div");this.get("contentBox").appendChild(E);this._overlay=b.one(E);this._overlay.setStyle("position","absolute");this._overlay.setStyle("background","#fff");this._overlay.setStyle("opacity",0);this._overlay.addClass(F);this._overlay.setStyle("zIndex",4);}this._setAriaElements(D);this._redraw();},_planarEventDispatcher:function(Z){var G=this.get("graph"),K=this.get("boundingBox"),T=G.get("contentBox"),Q=Z&&Z.hasOwnProperty("changedTouches"),F=Q?Z.changedTouches[0].pageX:Z.pageX,D=Q?Z.changedTouches[0].pageY:Z.pageY,O=F-K.getX(),N=D-K.getY(),L={x:F-T.getX(),y:D-T.getY()},E=G.get("seriesCollection"),P,X=0,M,J=this._selectedIndex,ab,S=[],H=[],R=[],ac=this.get("direction"),ad,aa,V,U,I,Y,W;Z.halt(true);if(ac=="horizontal"){aa="x";V="y";}else{V="x";aa="y";}U=L[aa];if(E){Y=E.length;while(X<Y&&!I){if(E[X]){I=E[X].get(aa+"MarkerPlane");}X++;}}if(I){Y=I.length;for(X=0;X<Y;++X){if(U<=I[X].end&&U>=I[X].start){M=X;break;}}Y=E.length;for(X=0;X<Y;++X){P=E[X];W=P.get(V+"coords");ad=P.get("markers");if(ad&&!isNaN(J)&&J>-1){P.updateMarkerState("mouseout",J);}if(W&&W[M]>-1){if(ad&&!isNaN(M)&&M>-1){P.updateMarkerState("mouseover",M);}ab=this.getSeriesItems(P,M);H.push(ab.category);R.push(ab.value);S.push(P);}}this._selectedIndex=M;if(M>-1){this.fire("planarEvent:mouseover",{categoryItem:H,valueItem:R,x:O,y:N,pageX:F,pageY:D,items:S,index:M,originEvent:Z});}else{this.fire("planarEvent:mouseout");}}},_type:"combo",_itemRenderQueue:null,_addToAxesRenderQueue:function(D){if(!this._itemRenderQueue){this._itemRenderQueue=[];}if(b.Array.indexOf(this._itemRenderQueue,D)<0){this._itemRenderQueue.push(D);}},_addToAxesCollection:function(D,F){var E=this.get(D+"AxesCollection");if(!E){E=[];this.set(D+"AxesCollection",E);}E.push(F);},_getDefaultSeriesCollection:function(){return this._parseSeriesCollection();},_parseSeriesCollection:function(W){var M=this.get("direction"),D=W||[],T,Q,O=[],J,I=this.get("seriesKeys").concat(),S,H,P,G=this.get("type"),U,L,V,E,F=this.get("categoryKey"),R=this.get("showMarkers"),N=this.get("showAreaFill"),K=this.get("showLines");if(M=="vertical"){T="yAxis";L="yKey";Q="xAxis";V="xKey";}else{T="xAxis";L="xKey";Q="yAxis";V="yKey";}P=D.length;for(S=0;S<P;++S){U=this._getBaseAttribute(D[S],V);if(U){H=b.Array.indexOf(I,U);if(H>-1){I.splice(H,1);}O.push(U);}}if(I.length>0){O=O.concat(I);}P=O.length;for(S=0;S<P;++S){J=D[S]||{type:G};if(J instanceof b.CartesianSeries){this._parseSeriesAxes(J);continue;}J[L]=J[L]||F;J[V]=J[V]||I.shift();J[T]=this._getCategoryAxis();J[Q]=this._getSeriesAxis(J[V]);J.type=J.type||G;if((J.type=="combo"||J.type=="stackedcombo"||J.type=="combospline"||J.type=="stackedcombospline")){if(N!==null){J.showAreaFill=(J.showAreaFill!==null&&J.showAreaFill!==undefined)?J.showAreaFill:N;}if(R!==null){J.showMarkers=(J.showMarkers!==null&&J.showMarkers!==undefined)?J.showMarkers:R;}if(K!==null){J.showLines=(J.showLines!==null&&J.showLines!==undefined)?J.showLines:K;}}D[S]=J;}if(W){E=this.get("graph");E.set("seriesCollection",D);D=E.get("seriesCollection");}return D;},_parseSeriesAxes:function(E){var I=this.get("axes"),G=E.get("xAxis"),D=E.get("yAxis"),H=b.Axis,F;if(G&&!(G instanceof H)&&q.isString(G)&&I.hasOwnProperty(G)){F=I[G];if(F instanceof H){E.set("xAxis",F);}}if(D&&!(D instanceof H)&&q.isString(D)&&I.hasOwnProperty(D)){F=I[D];if(F instanceof H){E.set("yAxis",F);}}},_getCategoryAxis:function(){var D,E=this.get("axes"),F=this.get("categoryAxisName")||this.get("categoryKey");
-D=E[F];return D;},_getSeriesAxis:function(E,I){var H=this.get("axes"),D,G,F;if(H){if(I&&H.hasOwnProperty(I)){F=H[I];}else{for(D in H){if(H.hasOwnProperty(D)){G=H[D].get("keys");if(G&&G.hasOwnProperty(E)){F=H[D];break;}}}}}return F;},_getBaseAttribute:function(E,D){if(E instanceof b.Base){return E.get(D);}if(E.hasOwnProperty(D)){return E[D];}return null;},_setBaseAttribute:function(E,D,F){if(E instanceof b.Base){E.set(D,F);}else{E[D]=F;}},_setAxes:function(E){var I=this._parseAxes(E),M={},G={edgeOffset:"edgeOffset",position:"position",overlapGraph:"overlapGraph",labelFunction:"labelFunction",labelFunctionScope:"labelFunctionScope",labelFormat:"labelFormat",maximum:"maximum",minimum:"minimum",roundingMethod:"roundingMethod",alwaysShowZero:"alwaysShowZero",title:"title",width:"width",height:"height"},H=this.get("dataProvider"),P,J,Q,F,K,O,N,D,L;for(J in I){if(I.hasOwnProperty(J)){O=I[J];if(O instanceof b.Axis){F=O;}else{F=null;D={};D.dataProvider=O.dataProvider||H;D.keys=O.keys;if(O.hasOwnProperty("roundingUnit")){D.roundingUnit=O.roundingUnit;}Q=O.position;if(O.styles){D.styles=O.styles;}D.position=O.position;for(P in G){if(G.hasOwnProperty(P)&&O.hasOwnProperty(P)){D[P]=O[P];}}if(E){F=this.getAxisByKey(J);}if(F&&F instanceof b.Axis){K=F.get("position");if(Q!=K){if(K!="none"){L=this.get(K+"AxesCollection");L.splice(b.Array.indexOf(L,F),1);}if(Q!="none"){this._addToAxesCollection(Q,F);}}F.setAttrs(D);}else{N=this._getAxisClass(O.type);F=new N(D);F.after("axisRendered",b.bind(this._itemRendered,this));}}if(F){L=this.get(Q+"AxesCollection");if(L&&b.Array.indexOf(L,F)>0){F.set("overlapGraph",false);}M[J]=F;}}}return M;},_addAxes:function(){var I=this.get("axes"),E,G,J,D=this.get("width"),F=this.get("height"),H=b.Node.one(this._parentNode);if(!this._axesCollection){this._axesCollection=[];}for(E in I){if(I.hasOwnProperty(E)){G=I[E];if(G instanceof b.Axis){if(!D){this.set("width",H.get("offsetWidth"));D=this.get("width");}if(!F){this.set("height",H.get("offsetHeight"));F=this.get("height");}this._addToAxesRenderQueue(G);J=G.get("position");if(!this.get(J+"AxesCollection")){this.set(J+"AxesCollection",[G]);}else{this.get(J+"AxesCollection").push(G);}this._axesCollection.push(G);if(G.get("keys").hasOwnProperty(this.get("categoryKey"))){this.set("categoryAxis",G);}G.render(this.get("contentBox"));}}}},_addSeries:function(){var D=this.get("graph"),E=this.get("seriesCollection");D.render(this.get("contentBox"));},_addGridlines:function(){var N=this.get("graph"),E=this.get("horizontalGridlines"),F=this.get("verticalGridlines"),M=this.get("direction"),O=this.get("leftAxesCollection"),I=this.get("rightAxesCollection"),K=this.get("bottomAxesCollection"),G=this.get("topAxesCollection"),H,D=this.get("categoryAxis"),L,J;if(this._axesCollection){H=this._axesCollection.concat();H.splice(b.Array.indexOf(H,D),1);}if(E){if(O&&O[0]){L=O[0];}else{if(I&&I[0]){L=I[0];}else{L=M=="horizontal"?D:H[0];}}if(!this._getBaseAttribute(E,"axis")&&L){this._setBaseAttribute(E,"axis",L);}if(this._getBaseAttribute(E,"axis")){N.set("horizontalGridlines",E);}}if(F){if(K&&K[0]){J=K[0];}else{if(G&&G[0]){J=G[0];}else{J=M=="vertical"?D:H[0];}}if(!this._getBaseAttribute(F,"axis")&&J){this._setBaseAttribute(F,"axis",J);}if(this._getBaseAttribute(F,"axis")){N.set("verticalGridlines",F);}}},_getAllKeys:function(I){var F=0,D=I.length,H,E,G={};for(;F<D;++F){H=I[F];for(E in H){if(H.hasOwnProperty(E)){G[E]=true;}}}return G;},_getDefaultAxes:function(){return this._parseAxes();},_parseAxes:function(V){var N=this.get("categoryKey"),E,T,P,G={},R=[],F=this.get("categoryAxisName")||this.get("categoryKey"),D=this.get("valueAxisName"),H=this.get("seriesKeys")||[],W,U,M,K,Q,O,S=this.get("dataProvider"),X=this.get("direction"),L,I,J=[],Y=this.get("stacked")?"stacked":"numeric";if(X=="vertical"){L="bottom";I="left";}else{L="left";I="bottom";}if(V){for(W in V){if(V.hasOwnProperty(W)){E=V[W];P=this._getBaseAttribute(E,"keys");T=this._getBaseAttribute(E,"type");if(T=="time"||T=="category"){F=W;this.set("categoryAxisName",W);if(q.isArray(P)&&P.length>0){N=P[0];this.set("categoryKey",N);}G[W]=E;}else{if(W==F){G[W]=E;}else{G[W]=E;if(W!=D&&P&&q.isArray(P)){K=P.length;for(M=0;M<K;++M){R.push(P[M]);}J.push(G[W]);}if(!(this._getBaseAttribute(G[W],"type"))){this._setBaseAttribute(G[W],"type",Y);}if(!(this._getBaseAttribute(G[W],"position"))){this._setBaseAttribute(G[W],"position",this._getDefaultAxisPosition(G[W],J,L));}}}}}}if(H.length<1){O=this._getAllKeys(S);for(W in O){if(O.hasOwnProperty(W)&&W!=N&&b.Array.indexOf(R,W)==-1){H.push(W);}}}Q=b.Array.indexOf(H,N);if(Q>-1){H.splice(Q,1);}U=R.length;for(W=0;W<U;++W){Q=b.Array.indexOf(H,R[W]);if(Q>-1){H.splice(Q,1);}}if(!G.hasOwnProperty(F)){G[F]={};}if(!(this._getBaseAttribute(G[F],"keys"))){this._setBaseAttribute(G[F],"keys",[N]);}if(!(this._getBaseAttribute(G[F],"position"))){this._setBaseAttribute(G[F],"position",I);}if(!(this._getBaseAttribute(G[F],"type"))){this._setBaseAttribute(G[F],"type",this.get("categoryType"));}if(!G.hasOwnProperty(D)&&H&&H.length>0){G[D]={keys:H};J.push(G[D]);}if(R.length>0){if(H.length>0){H=R.concat(H);}else{H=R;}}if(G.hasOwnProperty(D)){if(!(this._getBaseAttribute(G[D],"position"))){this._setBaseAttribute(G[D],"position",this._getDefaultAxisPosition(G[D],J,L));}if(!(this._getBaseAttribute(G[D],"type"))){this._setBaseAttribute(G[D],"type",Y);}if(!(this._getBaseAttribute(G[D],"keys"))){this._setBaseAttribute(G[D],"keys",H);}}this.set("seriesKeys",H);return G;},_getDefaultAxisPosition:function(G,E,D){var H=this.get("direction"),F=b.Array.indexOf(E,G);if(E[F-1]&&E[F-1].position){if(H=="horizontal"){if(E[F-1].position=="left"){D="right";}else{if(E[F-1].position=="right"){D="left";}}}else{if(E[F-1].position=="bottom"){D="top";}else{D="bottom";}}}return D;},getSeriesItems:function(I,H){var J=I.get("xAxis"),F=I.get("yAxis"),G=I.get("xKey"),E=I.get("yKey"),K,D;if(this.get("direction")=="vertical"){K={axis:F,key:E,value:F.getKeyValueAt(E,H)};D={axis:J,key:G,value:J.getKeyValueAt(G,H)};}else{D={axis:F,key:E,value:F.getKeyValueAt(E,H)};
-K={axis:J,key:G,value:J.getKeyValueAt(G,H)};}K.displayName=I.get("categoryDisplayName");D.displayName=I.get("valueDisplayName");K.value=K.axis.getKeyValueAt(K.key,H);D.value=D.axis.getKeyValueAt(D.key,H);return{category:K,value:D};},_sizeChanged:function(G){if(this._axesCollection){var F=this._axesCollection,E=0,D=F.length;for(;E<D;++E){this._addToAxesRenderQueue(F[E]);}this._redraw();}},_getTopOverflow:function(I,G,E){var F=0,D,J=0,H;if(I){D=I.length;for(;F<D;++F){H=I[F];J=Math.max(J,Math.abs(H.getMaxLabelBounds().top)-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}if(G){F=0;D=G.length;for(;F<D;++F){H=G[F];J=Math.max(J,Math.abs(H.getMaxLabelBounds().top)-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}return J;},_getRightOverflow:function(I,F,H){var E=0,D,J=0,G;if(I){D=I.length;for(;E<D;++E){G=I[E];J=Math.max(J,G.getMaxLabelBounds().right-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}if(F){E=0;D=F.length;for(;E<D;++E){G=F[E];J=Math.max(J,G.getMaxLabelBounds().right-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}return J;},_getLeftOverflow:function(I,F,H){var E=0,D,J=0,G;if(I){D=I.length;for(;E<D;++E){G=I[E];J=Math.max(J,Math.abs(G.getMinLabelBounds().left)-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}if(F){E=0;D=F.length;for(;E<D;++E){G=F[E];J=Math.max(J,Math.abs(G.getMinLabelBounds().left)-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}return J;},_getBottomOverflow:function(I,G,E){var F=0,D,J=0,H;if(I){D=I.length;for(;F<D;++F){H=I[F];J=Math.max(J,H.getMinLabelBounds().bottom-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}if(G){F=0;D=G.length;for(;F<D;++F){H=G[F];J=Math.max(J,H.getMinLabelBounds().bottom-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}return J;},_redraw:function(){if(this._drawing){this._callLater=true;return;}this._drawing=true;this._callLater=false;var Q=this.get("width"),aa=this.get("height"),Y=0,I=0,ae=0,E=0,D=this.get("leftAxesCollection"),O=this.get("rightAxesCollection"),P=this.get("topAxesCollection"),ad=this.get("bottomAxesCollection"),Z=0,W,J,G="visible",H=this.get("graph"),L,R,X,V,M,N,ac,ab,U=this.get("allowContentOverflow"),S,F,ag,T,K,af={};if(D){ag=[];W=D.length;for(Z=W-1;Z>-1;--Z){ag.unshift(Y);Y+=D[Z].get("width");}}if(O){F=[];W=O.length;Z=0;for(Z=W-1;Z>-1;--Z){I+=O[Z].get("width");F.unshift(Q-I);}}if(P){T=[];W=P.length;for(Z=W-1;Z>-1;--Z){T.unshift(ae);ae+=P[Z].get("height");}}if(ad){K=[];W=ad.length;for(Z=W-1;Z>-1;--Z){E+=ad[Z].get("height");K.unshift(aa-E);}}M=Q-(Y+I);N=aa-(E+ae);af.left=Y;af.top=ae;af.bottom=aa-E;af.right=Q-I;if(!U){L=this._getTopOverflow(D,O);R=this._getBottomOverflow(D,O);X=this._getLeftOverflow(ad,P);V=this._getRightOverflow(ad,P);S=L-ae;if(S>0){af.top=L;if(T){Z=0;W=T.length;for(;Z<W;++Z){T[Z]+=S;}}}S=R-E;if(S>0){af.bottom=aa-R;if(K){Z=0;W=K.length;for(;Z<W;++Z){K[Z]-=S;}}}S=X-Y;if(S>0){af.left=X;if(ag){Z=0;W=ag.length;for(;Z<W;++Z){ag[Z]+=S;}}}S=V-I;if(S>0){af.right=Q-V;if(F){Z=0;W=F.length;for(;Z<W;++Z){F[Z]-=S;}}}}M=af.right-af.left;N=af.bottom-af.top;ac=af.left;ab=af.top;if(P){W=P.length;Z=0;for(;Z<W;Z++){J=P[Z];if(J.get("width")!==M){J.set("width",M);}J.get("boundingBox").setStyle("left",ac+"px");J.get("boundingBox").setStyle("top",T[Z]+"px");}if(J._hasDataOverflow()){G="hidden";}}if(ad){W=ad.length;Z=0;for(;Z<W;Z++){J=ad[Z];if(J.get("width")!==M){J.set("width",M);}J.get("boundingBox").setStyle("left",ac+"px");J.get("boundingBox").setStyle("top",K[Z]+"px");}if(J._hasDataOverflow()){G="hidden";}}if(D){W=D.length;Z=0;for(;Z<W;++Z){J=D[Z];J.get("boundingBox").setStyle("top",ab+"px");J.get("boundingBox").setStyle("left",ag[Z]+"px");if(J.get("height")!==N){J.set("height",N);}}if(J._hasDataOverflow()){G="hidden";}}if(O){W=O.length;Z=0;for(;Z<W;++Z){J=O[Z];J.get("boundingBox").setStyle("top",ab+"px");J.get("boundingBox").setStyle("left",F[Z]+"px");if(J.get("height")!==N){J.set("height",N);}}if(J._hasDataOverflow()){G="hidden";}}this._drawing=false;if(this._callLater){this._redraw();return;}if(H){H.get("boundingBox").setStyle("left",ac+"px");H.get("boundingBox").setStyle("top",ab+"px");H.set("width",M);H.set("height",N);H.get("boundingBox").setStyle("overflow",G);}if(this._overlay){this._overlay.setStyle("left",ac+"px");this._overlay.setStyle("top",ab+"px");this._overlay.setStyle("width",M+"px");this._overlay.setStyle("height",N+"px");}},destructor:function(){var H=this.get("graph"),F=0,D,I=this.get("seriesCollection"),E=this._axesCollection,G=this.get("tooltip").node;if(this._description){this._description.empty();this._description.remove(true);}if(this._liveRegion){this._liveRegion.empty();this._liveRegion.remove(true);}D=I?I.length:0;for(;F<D;++F){if(I[F] instanceof b.CartesianSeries){I[F].destroy(true);}}D=E?E.length:0;for(F=0;F<D;++F){if(E[F] instanceof b.Axis){E[F].destroy(true);}}if(H){H.destroy(true);}if(G){G.empty();G.remove(true);}if(this._overlay){this._overlay.empty();this._overlay.remove(true);}},_getAriaMessage:function(N){var G="",J,M,F,L,I=this._seriesIndex,D=this._itemIndex,H=this.get("seriesCollection"),K=H.length,E;if(N%2===0){if(K>1){if(N===38){I=I<1?K-1:I-1;}else{if(N===40){I=I>=K-1?0:I+1;}}this._itemIndex=-1;}else{I=0;}this._seriesIndex=I;J=this.getSeries(parseInt(I,10));G="This is the "+J.get("valueDisplayName")+" series. Move the left and right arrows to navigate through the series items.";}else{if(I>-1){G="";J=this.getSeries(parseInt(I,10));}else{I=0;this._seriesIndex=I;J=this.getSeries(parseInt(I,10));G="This is the "+J.get("valueDisplayName")+" series.";}E=J._dataLength?J._dataLength:0;if(N===37){D=D>0?D-1:E-1;}else{if(N===39){D=D>=E-1?0:D+1;}}this._itemIndex=D;M=this.getSeriesItems(J,D);F=M.category;L=M.value;G+="Item "+(D+1)+" of "+E+". ";if(F&&L&&F.value&&L.value){G+=F.displayName+" is "+F.axis.formatLabel.apply(this,[F.value,F.axis.get("labelFormat")]);G+=L.displayName+" is "+L.axis.formatLabel.apply(this,[L.value,L.axis.get("labelFormat")]);}else{G+="No data available.";}}return G;}},{ATTRS:{allowContentOverflow:{value:false},axesStyles:{getter:function(){var F=this.get("axes"),D,E=this._axesStyles;
-if(F){for(D in F){if(F.hasOwnProperty(D)&&F[D] instanceof b.Axis){if(!E){E={};}E[D]=F[D].get("styles");}}}return E;},setter:function(F){var E=this.get("axes"),D;for(D in F){if(F.hasOwnProperty(D)&&E.hasOwnProperty(D)){this._setBaseAttribute(E[D],"styles",F[D]);}}}},seriesStyles:{getter:function(){var E=this._seriesStyles,F=this.get("graph"),G,D;if(F){G=F.get("seriesDictionary");if(G){E={};for(D in G){if(G.hasOwnProperty(D)){E[D]=G[D].get("styles");}}}}return E;},setter:function(G){var E,D,F;if(q.isArray(G)){F=this.get("seriesCollection");E=0;D=G.length;for(;E<D;++E){this._setBaseAttribute(F[E],"styles",G[E]);}}else{for(E in G){if(G.hasOwnProperty(E)){F=this.getSeries(E);this._setBaseAttribute(F,"styles",G[E]);}}}}},graphStyles:{getter:function(){var D=this.get("graph");if(D){return(D.get("styles"));}return this._graphStyles;},setter:function(E){var D=this.get("graph");this._setBaseAttribute(D,"styles",E);}},styles:{getter:function(){var D={axes:this.get("axesStyles"),series:this.get("seriesStyles"),graph:this.get("graphStyles")};return D;},setter:function(D){if(D.hasOwnProperty("axes")){if(this.get("axesStyles")){this.set("axesStyles",D.axes);}else{this._axesStyles=D.axes;}}if(D.hasOwnProperty("series")){if(this.get("seriesStyles")){this.set("seriesStyles",D.series);}else{this._seriesStyles=D.series;}}if(D.hasOwnProperty("graph")){this.set("graphStyles",D.graph);}}},axes:{valueFn:"_getDefaultAxes",setter:function(D){return this._setAxes(D);}},seriesCollection:{valueFn:"_getDefaultSeriesCollection",setter:function(D){return this._parseSeriesCollection(D);}},leftAxesCollection:{},bottomAxesCollection:{},rightAxesCollection:{},topAxesCollection:{},stacked:{value:false},direction:{getter:function(){var D=this.get("type");if(D=="bar"){return"vertical";}else{if(D=="column"){return"horizontal";}}return this._direction;},setter:function(D){this._direction=D;return this._direction;}},showAreaFill:{},showMarkers:{},showLines:{},categoryAxisName:{},valueAxisName:{value:"values"},horizontalGridlines:{getter:function(){var D=this.get("graph");if(D){return D.get("horizontalGridlines");}return this._horizontalGridlines;},setter:function(E){var D=this.get("graph");if(E&&!q.isObject(E)){E={};}if(D){D.set("horizontalGridlines",E);}else{this._horizontalGridlines=E;}}},verticalGridlines:{getter:function(){var D=this.get("graph");if(D){return D.get("verticalGridlines");}return this._verticalGridlines;},setter:function(E){var D=this.get("graph");if(E&&!q.isObject(E)){E={};}if(D){D.set("verticalGridlines",E);}else{this._verticalGridlines=E;}}},type:{getter:function(){if(this.get("stacked")){return"stacked"+this._type;}return this._type;},setter:function(D){if(this._type=="bar"){if(D!="bar"){this.set("direction","horizontal");}}else{if(D=="bar"){this.set("direction","vertical");}}this._type=D;return this._type;}},categoryAxis:{}}});b.PieChart=b.Base.create("pieChart",b.Widget,[b.ChartBase],{_getSeriesCollection:function(){if(this._seriesCollection){return this._seriesCollection;}var I=this.get("axes"),K=[],J,G=0,F,L=this.get("type"),N,D="categoryAxis",H="categoryKey",E="valueAxis",M="valueKey";if(I){J=I.values.get("keyCollection");N=I.category.get("keyCollection")[0];F=J.length;for(;G<F;++G){K[G]={type:L};K[G][D]="category";K[G][E]="values";K[G][H]=N;K[G][M]=J[G];}}this._seriesCollection=K;return K;},_parseAxes:function(G){if(!this._axes){this._axes={};}var H,M,F,K,D,J,L=this.get("type"),N=this.get("width"),I=this.get("height"),E=b.Node.one(this._parentNode);if(!N){this.set("width",E.get("offsetWidth"));N=this.get("width");}if(!I){this.set("height",E.get("offsetHeight"));I=this.get("height");}for(H in G){if(G.hasOwnProperty(H)){K=G[H];M=L=="pie"?"none":K.position;J=this._getAxisClass(K.type);D={dataProvider:this.get("dataProvider")};if(K.hasOwnProperty("roundingUnit")){D.roundingUnit=K.roundingUnit;}D.keys=K.keys;D.width=N;D.height=I;D.position=M;D.styles=K.styles;F=new J(D);F.on("axisRendered",b.bind(this._itemRendered,this));this._axes[H]=F;}}},_addAxes:function(){var G=this.get("axes"),D,E,F;if(!G){this.set("axes",this._getDefaultAxes());G=this.get("axes");}if(!this._axesCollection){this._axesCollection=[];}for(D in G){if(G.hasOwnProperty(D)){E=G[D];F=E.get("position");if(!this.get(F+"AxesCollection")){this.set(F+"AxesCollection",[E]);}else{this.get(F+"AxesCollection").push(E);}this._axesCollection.push(E);}}},_addSeries:function(){var D=this.get("graph"),E=this.get("seriesCollection");this._parseSeriesAxes(E);D.set("showBackground",false);D.set("width",this.get("width"));D.set("height",this.get("height"));D.set("seriesCollection",E);this._seriesCollection=D.get("seriesCollection");D.render(this.get("contentBox"));},_parseSeriesAxes:function(I){var E=0,D=I.length,G,H=this.get("axes"),F;for(;E<D;++E){G=I[E];if(G){if(G instanceof b.PieSeries){F=G.get("categoryAxis");if(F&&!(F instanceof b.Axis)){G.set("categoryAxis",H[F]);}F=G.get("valueAxis");if(F&&!(F instanceof b.Axis)){G.set("valueAxis",H[F]);}continue;}G.categoryAxis=H.category;G.valueAxis=H.values;if(!G.type){G.type=this.get("type");}}}},_getDefaultAxes:function(){var H=this.get("categoryKey"),E=this.get("seriesKeys")||[],D="numeric",G,F=this.get("dataProvider")[0];if(E.length<1){for(G in F){if(G!=H){E.push(G);}}if(E.length>0){this.set("seriesKeys",E);}}return{values:{keys:E,type:D},category:{keys:[H],type:this.get("categoryType")}};},getSeriesItems:function(F,E){var G={axis:F.get("categoryAxis"),key:F.get("categoryKey"),displayName:F.get("categoryDisplayName")},D={axis:F.get("valueAxis"),key:F.get("valueKey"),displayName:F.get("valueDisplayName")};G.value=G.axis.getKeyValueAt(G.key,E);D.value=D.axis.getKeyValueAt(D.key,E);return{category:G,value:D};},_sizeChanged:function(D){this._redraw();},_redraw:function(){var F=this.get("graph"),D=this.get("width"),E=this.get("height"),G;if(F){G=Math.min(D,E);F.set("width",G);F.set("height",G);}},_tooltipLabelFunction:function(K,D,G,F,E){var J=g.createElement("div"),H=F.getTotalValues(),I=Math.round((D.value/H)*10000)/100;
-J.appendChild(g.createTextNode(K.displayName+": "+K.axis.get("labelFunction").apply(this,[K.value,K.axis.get("labelFormat")])));J.appendChild(g.createElement("br"));J.appendChild(g.createTextNode(D.displayName+": "+D.axis.get("labelFunction").apply(this,[D.value,D.axis.get("labelFormat")])));J.appendChild(g.createElement("br"));J.appendChild(g.createTextNode(I+"%"));return J;},_getAriaMessage:function(P){var F="",E,M,J,L,I=0,D=this._itemIndex,G=this.get("seriesCollection"),K,N,O,H;J=this.getSeries(parseInt(I,10));H=J.get("markers");K=H&&H.length?H.length:0;if(P===37){D=D>0?D-1:K-1;}else{if(P===39){D=D>=K-1?0:D+1;}}this._itemIndex=D;M=this.getSeriesItems(J,D);E=M.category;L=M.value;N=J.getTotalValues();O=Math.round((L.value/N)*10000)/100;F="Item "+(D+1)+" of "+K+". ";if(E&&L){F+=E.displayName+" is "+E.axis.formatLabel.apply(this,[E.value,E.axis.get("labelFormat")]);F+=L.displayName+" is "+L.axis.formatLabel.apply(this,[L.value,L.axis.get("labelFormat")]);F+=L.displayName+" is "+O+"% of the total.";}else{F+="No data available.";}return F;}},{ATTRS:{ariaDescription:{value:"Use the left and right keys to navigate through items in the chart.",setter:function(D){if(this._description){this._description.setContent("");this._description.appendChild(g.createTextNode(D));}return D;}},axes:{getter:function(){return this._axes;},setter:function(D){this._parseAxes(D);}},seriesCollection:{getter:function(){return this._getSeriesCollection();},setter:function(D){return this._setSeriesCollection(D);}},type:{value:"pie"}}});},"@VERSION@",{requires:["dom","datatype-number","datatype-date","event-custom","event-mouseenter","event-touch","widget","widget-position","widget-stack","graphics"]});
+E.push(G);J.push(G);},_seriesMap:{line:b.LineSeries,column:b.ColumnSeries,bar:b.BarSeries,area:b.AreaSeries,candlestick:b.CandlestickSeries,ohlc:b.OHLCSeries,stackedarea:b.StackedAreaSeries,stackedline:b.StackedLineSeries,stackedcolumn:b.StackedColumnSeries,stackedbar:b.StackedBarSeries,markerseries:b.MarkerSeries,spline:b.SplineSeries,areaspline:b.AreaSplineSeries,stackedspline:b.StackedSplineSeries,stackedareaspline:b.StackedAreaSplineSeries,stackedmarkerseries:b.StackedMarkerSeries,pie:b.PieSeries,combo:b.ComboSeries,stackedcombo:b.StackedComboSeries,combospline:b.ComboSplineSeries,stackedcombospline:b.StackedComboSplineSeries},_getSeries:function(D){var E;if(q.isString(D)){E=this._seriesMap[D];}else{E=D;}return E;},_markerEventHandler:function(I){var G=I.type,D=I.currentTarget,H=D.getAttribute("id").split("_"),F=this.getSeriesByIndex(H[1]),E=H[2];F.updateMarkerState(G,E);},_dispatchers:null,_updateStyles:function(){var E=this.get("styles").background,D=E.border;D.opacity=D.alpha;E.stroke=D;E.fill.opacity=E.fill.alpha;this.get("background").set(E);this._sizeChangeHandler();},_sizeChangeHandler:function(J){var D=this.get("horizontalGridlines"),K=this.get("verticalGridlines"),E=this.get("width"),H=this.get("height"),G=this.get("styles").background,I,F;if(G&&G.border){I=G.border.weight||0;}if(this.get("showBackground")){F=this.get("background");if(E&&H){F.set("width",E);F.set("height",H);}}if(this._gridlines){this._gridlines.clear();}if(D&&D instanceof b.Gridlines){D.draw();}if(K&&K instanceof b.Gridlines){K.draw();}this._drawSeries();},_drawSeries:function(){if(this._drawing){this._callLater=true;return;}var F,E,D,G=this.get("graphic");G.set("autoDraw",false);this._callLater=false;this._drawing=true;F=this.get("seriesCollection");E=0;D=F.length;for(;E<D;++E){F[E].draw();if((!F[E].get("xcoords")||!F[E].get("ycoords"))&&!F[E] instanceof b.PieSeries){this._callLater=true;break;}}this._drawing=false;if(this._callLater){this._drawSeries();}},_drawingCompleteHandler:function(F){var E=F.currentTarget,G,D=b.Array.indexOf(this._dispatchers,E);if(D>-1){this._dispatchers.splice(D,1);}if(this._dispatchers.length<1){G=this.get("graphic");if(!G.get("autoDraw")){G._redraw();}this.fire("chartRendered");}},_getDefaultStyles:function(){var D={background:{shape:"rect",fill:{color:"#faf9f2"},border:{color:"#dad8c9",weight:1}}};return D;},destructor:function(){if(this._graphic){this._graphic.destroy();}if(this._background){this._background.get("graphic").destroy();}if(this._gridlines){this._gridlines.get("graphic").destroy();}}},{ATTRS:{x:{setter:function(D){this.get("boundingBox").setStyle("left",D+"px");return D;}},y:{setter:function(D){this.get("boundingBox").setStyle("top",D+"px");return D;}},chart:{},seriesCollection:{getter:function(){return this._seriesCollection;},setter:function(D){this._parseSeriesCollection(D);return this._seriesCollection;}},showBackground:{value:true},seriesDictionary:{readOnly:true,getter:function(){return this._seriesDictionary;}},horizontalGridlines:{value:null,setter:function(E){var D=this.get("horizontalGridlines");if(D&&D instanceof b.Gridlines){D.remove();}if(E instanceof b.Gridlines){D=E;E.set("graph",this);return E;}else{if(E&&E.axis){D=new b.Gridlines({direction:"horizontal",axis:E.axis,graph:this,styles:E.styles});return D;}}}},verticalGridlines:{value:null,setter:function(E){var D=this.get("verticalGridlines");if(D&&D instanceof b.Gridlines){D.remove();}if(E instanceof b.Gridlines){D=E;E.set("graph",this);return E;}else{if(E&&E.axis){D=new b.Gridlines({direction:"vertical",axis:E.axis,graph:this,styles:E.styles});return D;}}}},background:{getter:function(){if(!this._background){this._backgroundGraphic=new b.Graphic({render:this.get("contentBox")});this._backgroundGraphic.get("node").style.zIndex=0;this._background=this._backgroundGraphic.addShape({type:"rect"});}return this._background;}},gridlines:{readOnly:true,getter:function(){if(!this._gridlines){this._gridlinesGraphic=new b.Graphic({render:this.get("contentBox")});this._gridlinesGraphic.get("node").style.zIndex=1;this._gridlines=this._gridlinesGraphic.addShape({type:"path"});}return this._gridlines;}},graphic:{readOnly:true,getter:function(){if(!this._graphic){this._graphic=new b.Graphic({render:this.get("contentBox")});this._graphic.get("node").style.zIndex=2;this._graphic.set("autoDraw",false);}return this._graphic;}},groupMarkers:{value:false}}});function o(){}o.ATTRS={ariaLabel:{value:"Chart Application",setter:function(E){var D=this.get("contentBox");if(D){D.setAttribute("aria-label",E);}return E;}},ariaDescription:{value:"Use the up and down keys to navigate between series. Use the left and right keys to navigate through items in a series.",setter:function(D){if(this._description){this._description.setContent("");this._description.appendChild(g.createTextNode(D));}return D;}},tooltip:{valueFn:"_getTooltip",setter:function(D){return this._updateTooltip(D);}},categoryKey:{value:"category"},categoryType:{value:"category"},interactionType:{value:"marker"},dataProvider:{setter:function(D){return this._setDataValues(D);}},seriesKeys:{},axesCollection:{},graph:{valueFn:"_getGraph"},groupMarkers:{value:false,setter:function(D){if(this.get("graph")){this.get("graph").set("groupMarkers",D);}return D;}}};o.prototype={_itemRendered:function(D){this._itemRenderQueue=this._itemRenderQueue.splice(1+b.Array.indexOf(this._itemRenderQueue,D.currentTarget),1);if(this._itemRenderQueue.length<1){this._redraw();}},_getGraph:function(){var D=new b.Graph({chart:this,groupMarkers:this.get("groupMarkers")});D.after("chartRendered",b.bind(function(E){this.fire("chartRendered");},this));return D;},getSeries:function(F){var D=null,E=this.get("graph");if(E){if(q.isNumber(F)){D=E.getSeriesByIndex(F);}else{D=E.getSeriesByKey(F);}}return D;},getAxisByKey:function(F){var D,E=this.get("axes");if(E&&E.hasOwnProperty(F)){D=E[F];}return D;},getCategoryAxis:function(){var E,D=this.get("categoryKey"),F=this.get("axes");if(F.hasOwnProperty(D)){E=F[D];
+}return E;},_direction:"horizontal",_dataProvider:null,_setDataValues:function(I){if(q.isArray(I[0])){var H,K=[],F=I[0],G=0,E=F.length,J,D=I.length;for(;G<E;++G){H={category:F[G]};for(J=1;J<D;++J){H["series"+J]=I[J][G];}K[G]=H;}return K;}return I;},_seriesCollection:null,_setSeriesCollection:function(D){this._seriesCollection=D;},_getAxisClass:function(D){return this._axisClass[D];},_axisClass:{stacked:b.StackedAxis,numeric:b.NumericAxis,category:b.CategoryAxis,time:b.TimeAxis},_axes:null,initializer:function(){this._itemRenderQueue=[];this._seriesIndex=-1;this._itemIndex=-1;this.after("dataProviderChange",this._dataProviderChangeHandler);},renderUI:function(){var E=this.get("tooltip"),F=this.get("boundingBox"),D=this.get("contentBox");F.setStyle("position","absolute");D.setStyle("position","absolute");this._addAxes();this._addSeries();if(E&&E.show){this._addTooltip();}this._setAriaElements(F,D);},_setAriaElements:function(G,E){var F=this._getAriaOffscreenNode(),H=this.get("id")+"_description",D=this._getAriaOffscreenNode();E.set("tabIndex",0);E.set("role","img");E.setAttribute("aria-label",this.get("ariaLabel"));E.setAttribute("aria-describedby",H);F.set("id",H);F.set("tabIndex",-1);F.appendChild(g.createTextNode(this.get("ariaDescription")));D.set("id","live-region");D.set("aria-live","polite");D.set("aria-atomic","true");D.set("role","status");G.setAttribute("role","application");G.appendChild(F);G.appendChild(D);this._description=F;this._liveRegion=D;},_getAriaOffscreenNode:function(){var E=b.Node.create("<div></div>"),F=b.UA.ie,D=(F&&F<8)?"rect(1px 1px 1px 1px)":"rect(1px, 1px, 1px, 1px)";E.setStyle("position","absolute");E.setStyle("height","1px");E.setStyle("width","1px");E.setStyle("overflow","hidden");E.setStyle("clip",D);return E;},syncUI:function(){this._redraw();},bindUI:function(){this.after("tooltipChange",b.bind(this._tooltipChangeHandler,this));this.after("widthChange",this._sizeChanged);this.after("heightChange",this._sizeChanged);var K=this.get("tooltip"),E="mouseout",L="mouseover",F=this.get("contentBox"),D=this.get("interactionType"),I=0,J,H="."+n,G=((v&&("ontouchstart" in v))&&!(b.UA.chrome&&b.UA.chrome<6));b.on("keydown",b.bind(function(O){var N=O.keyCode,M=parseFloat(N),P;if(M>36&&M<41){O.halt();P=this._getAriaMessage(M);this._liveRegion.setContent("");this._liveRegion.appendChild(g.createTextNode(P));}},this),this.get("contentBox"));if(D=="marker"){E=K.hideEvent;L=K.showEvent;if(G){b.delegate("touchend",b.bind(this._markerEventDispatcher,this),F,H);b.on("touchend",b.bind(function(M){M.halt(true);if(this._activeMarker){this._activeMarker=null;this.hideTooltip(M);}},this));}else{b.delegate("mouseenter",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mousedown",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mouseup",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mouseleave",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("click",b.bind(this._markerEventDispatcher,this),F,H);b.delegate("mousemove",b.bind(this._positionTooltip,this),F,H);}}else{if(D=="planar"){if(G){this._overlay.on("touchend",b.bind(this._planarEventDispatcher,this));}else{this._overlay.on("mousemove",b.bind(this._planarEventDispatcher,this));this.on("mouseout",this.hideTooltip);}}}if(K){this.on("markerEvent:touchend",b.bind(function(N){var M=N.series.get("markers")[N.index];if(this._activeMarker&&M===this._activeMarker){this._activeMarker=null;this.hideTooltip(N);}else{this._activeMarker=M;K.markerEventHandler.apply(this,[N]);}},this));if(E&&L&&E==L){this.on(D+"Event:"+E,this.toggleTooltip);}else{if(L){this.on(D+"Event:"+L,K[D+"EventHandler"]);}if(E){if(q.isArray(E)){J=E.length;for(;I<J;++I){this.on(D+"Event:"+E[I],this.hideTooltip);}}this.on(D+"Event:"+E,this.hideTooltip);}}}},_markerEventDispatcher:function(K){var M=K.type,D=this.get("contentBox"),Q=K.currentTarget,P=Q.getAttribute("id").split("_"),J=P.pop(),H=P.pop(),I=this.getSeries(parseInt(H,10)),L=this.getSeriesItems(I,J),F=K&&K.hasOwnProperty("changedTouches"),G=F?K.changedTouches[0].pageX:K.pageX,E=F?K.changedTouches[0].pageY:K.pageY,O=G-D.getX(),N=E-D.getY();if(M=="mouseenter"){M="mouseover";}else{if(M=="mouseleave"){M="mouseout";}}I.updateMarkerState(M,J);K.halt();this.fire("markerEvent:"+M,{originEvent:K,pageX:G,pageY:E,categoryItem:L.category,valueItem:L.value,node:Q,x:O,y:N,series:I,index:J,seriesIndex:H});},_dataProviderChangeHandler:function(H){var E=this.get("dataProvider"),G=this.get("axes"),D,F;this._seriesIndex=-1;this._itemIndex=-1;if(G){for(D in G){if(G.hasOwnProperty(D)){F=G[D];if(F instanceof b.Axis){if(F.get("position")!="none"){this._addToAxesRenderQueue(F);}F.set("dataProvider",E);}}}}},toggleTooltip:function(E){var D=this.get("tooltip");if(D.visible){this.hideTooltip();}else{D.markerEventHandler.apply(this,[E]);}},_showTooltip:function(G,D,H){var E=this.get("tooltip"),F=E.node;if(G){E.visible=true;E.setTextFunction(F,G);F.setStyle("top",H+"px");F.setStyle("left",D+"px");F.setStyle("visibility","visible");}},_positionTooltip:function(H){var F=this.get("tooltip"),G=F.node,E=this.get("contentBox"),D=(H.pageX+10)-E.getX(),I=(H.pageY+10)-E.getY();if(G){G.setStyle("left",D+"px");G.setStyle("top",I+"px");}},hideTooltip:function(){var D=this.get("tooltip"),E=D.node;D.visible=false;E.set("innerHTML","");E.setStyle("left",-10000);E.setStyle("top",-10000);E.setStyle("visibility","hidden");},_addTooltip:function(){var E=this.get("tooltip"),G=this.get("id")+"_tooltip",D=this.get("contentBox"),F=g.getElementById(G);if(F){D.removeChild(F);}E.node.set("id",G);E.node.setStyle("visibility","hidden");D.appendChild(E.node);},_updateTooltip:function(I){var F=this._tooltip,D,H,G,E={markerLabelFunction:"markerLabelFunction",planarLabelFunction:"planarLabelFunction",setTextFunction:"setTextFunction",showEvent:"showEvent",hideEvent:"hideEvent",markerEventHandler:"markerEventHandler",planarEventHandler:"planarEventHandler",show:"show"};if(q.isObject(I)){H=I.styles;G=b.one(I.node)||F.node;if(H){for(D in H){if(H.hasOwnProperty(D)){G.setStyle(D,H[D]);
+}}}for(D in E){if(I.hasOwnProperty(D)){F[D]=I[D];}}F.node=G;}return F;},_getTooltip:function(){var E=g.createElement("div"),D={setTextFunction:this._setText,markerLabelFunction:this._tooltipLabelFunction,planarLabelFunction:this._planarLabelFunction,show:true,hideEvent:"mouseout",showEvent:"mouseover",markerEventHandler:function(G){var F=this.get("tooltip"),H=F.markerLabelFunction.apply(this,[G.categoryItem,G.valueItem,G.index,G.series,G.seriesIndex]);this._showTooltip(H,G.x+10,G.y+10);},planarEventHandler:function(G){var F=this.get("tooltip"),I,H=this.get("categoryAxis");I=F.planarLabelFunction.apply(this,[H,G.valueItem,G.index,G.items,G.seriesIndex]);this._showTooltip(I,G.x+10,G.y+10);}};E=b.one(E);E.set("id",this.get("id")+"_tooltip");E.setStyle("fontSize","85%");E.setStyle("opacity","0.83");E.setStyle("position","absolute");E.setStyle("paddingTop","2px");E.setStyle("paddingRight","5px");E.setStyle("paddingBottom","4px");E.setStyle("paddingLeft","2px");E.setStyle("backgroundColor","#fff");E.setStyle("border","1px solid #dbdccc");E.setStyle("pointerEvents","none");E.setStyle("zIndex",3);E.setStyle("whiteSpace","noWrap");E.setStyle("visibility","hidden");D.node=b.one(E);this._tooltip=D;return D;},_planarLabelFunction:function(K,P,M,I,G){var E=g.createElement("div"),N,J=0,L=I.length,F,D,O,H;if(K){D=K.get("labelFunction").apply(this,[K.getKeyValueAt(this.get("categoryKey"),M),K.get("labelFormat")]);if(q.isString(D)){D=g.createTextNode(D);}E.appendChild(D);}for(;J<L;++J){H=I[J];if(H.get("visible")){N=P[J];F=N.axis;O=F.get("labelFunction").apply(this,[F.getKeyValueAt(N.key,M),F.get("labelFormat")]);E.appendChild(g.createElement("br"));E.appendChild(g.createTextNode(N.displayName));E.appendChild(g.createTextNode(": "));if(q.isString(O)){O=g.createTextNode(O);}E.appendChild(O);}}return E;},_tooltipLabelFunction:function(K,E,H,G,F){var J=g.createElement("div"),D=K.axis.get("labelFunction").apply(this,[K.value,K.axis.get("labelFormat")]),I=E.axis.get("labelFunction").apply(this,[E.value,E.axis.get("labelFormat")]);J.appendChild(g.createTextNode(K.displayName));J.appendChild(g.createTextNode(": "));if(q.isString(D)){D=g.createTextNode(D);}J.appendChild(D);J.appendChild(g.createElement("br"));J.appendChild(g.createTextNode(E.displayName));J.appendChild(g.createTextNode(": "));if(q.isString(I)){I=g.createTextNode(I);}J.appendChild(I);return J;},_tooltipChangeHandler:function(H){if(this.get("tooltip")){var F=this.get("tooltip"),G=F.node,E=F.show,D=this.get("contentBox");if(G&&E){if(!D.contains(G)){this._addTooltip();}}}},_setText:function(D,E){D.setContent("");if(q.isNumber(E)){E=E+"";}else{if(!E){E="";}}if(m(E)){E=g.createTextNode(E);}D.appendChild(E);}};b.ChartBase=o;b.CartesianChart=b.Base.create("cartesianChart",b.Widget,[b.ChartBase],{renderUI:function(){var H=this.get("boundingBox"),D=this.get("contentBox"),G=this.get("tooltip"),E,F=c("overlay");H.setStyle("position","absolute");D.setStyle("position","absolute");this._addAxes();this._addGridlines();this._addSeries();if(G&&G.show){this._addTooltip();}this.get("styles");if(this.get("interactionType")=="planar"){E=g.createElement("div");this.get("contentBox").appendChild(E);this._overlay=b.one(E);this._overlay.setStyle("position","absolute");this._overlay.setStyle("background","#fff");this._overlay.setStyle("opacity",0);this._overlay.addClass(F);this._overlay.setStyle("zIndex",4);}this._setAriaElements(H,D);this._redraw();},_planarEventDispatcher:function(Z){var G=this.get("graph"),K=this.get("boundingBox"),T=G.get("contentBox"),Q=Z&&Z.hasOwnProperty("changedTouches"),F=Q?Z.changedTouches[0].pageX:Z.pageX,D=Q?Z.changedTouches[0].pageY:Z.pageY,O=F-K.getX(),N=D-K.getY(),L={x:F-T.getX(),y:D-T.getY()},E=G.get("seriesCollection"),P,X=0,M,J=this._selectedIndex,ab,S=[],H=[],R=[],ac=this.get("direction"),ad,aa,V,U,I,Y,W;Z.halt(true);if(ac=="horizontal"){aa="x";V="y";}else{V="x";aa="y";}U=L[aa];if(E){Y=E.length;while(X<Y&&!I){if(E[X]){I=E[X].get(aa+"MarkerPlane");}X++;}}if(I){Y=I.length;for(X=0;X<Y;++X){if(U<=I[X].end&&U>=I[X].start){M=X;break;}}Y=E.length;for(X=0;X<Y;++X){P=E[X];W=P.get(V+"coords");ad=P.get("markers");if(ad&&!isNaN(J)&&J>-1){P.updateMarkerState("mouseout",J);}if(W&&W[M]>-1){if(ad&&!isNaN(M)&&M>-1){P.updateMarkerState("mouseover",M);}ab=this.getSeriesItems(P,M);H.push(ab.category);R.push(ab.value);S.push(P);}}this._selectedIndex=M;if(M>-1){this.fire("planarEvent:mouseover",{categoryItem:H,valueItem:R,x:O,y:N,pageX:F,pageY:D,items:S,index:M,originEvent:Z});}else{this.fire("planarEvent:mouseout");}}},_type:"combo",_itemRenderQueue:null,_addToAxesRenderQueue:function(D){if(!this._itemRenderQueue){this._itemRenderQueue=[];}if(b.Array.indexOf(this._itemRenderQueue,D)<0){this._itemRenderQueue.push(D);}},_addToAxesCollection:function(D,F){var E=this.get(D+"AxesCollection");if(!E){E=[];this.set(D+"AxesCollection",E);}E.push(F);},_getDefaultSeriesCollection:function(){return this._parseSeriesCollection();},_parseSeriesCollection:function(W){var M=this.get("direction"),D=W||[],T,Q,O=[],J,I=this.get("seriesKeys").concat(),S,H,P,G=this.get("type"),U,L,V,E,F=this.get("categoryKey"),R=this.get("showMarkers"),N=this.get("showAreaFill"),K=this.get("showLines");if(M=="vertical"){T="yAxis";L="yKey";Q="xAxis";V="xKey";}else{T="xAxis";L="xKey";Q="yAxis";V="yKey";}P=D.length;for(S=0;S<P;++S){U=this._getBaseAttribute(D[S],V);if(U){H=b.Array.indexOf(I,U);if(H>-1){I.splice(H,1);}O.push(U);}}if(I.length>0){O=O.concat(I);}P=O.length;for(S=0;S<P;++S){J=D[S]||{type:G};if(J instanceof b.CartesianSeries){this._parseSeriesAxes(J);continue;}J[L]=J[L]||F;J[V]=J[V]||I.shift();J[T]=this._getCategoryAxis();J[Q]=this._getSeriesAxis(J[V]);J.type=J.type||G;if((J.type=="combo"||J.type=="stackedcombo"||J.type=="combospline"||J.type=="stackedcombospline")){if(N!==null){J.showAreaFill=(J.showAreaFill!==null&&J.showAreaFill!==undefined)?J.showAreaFill:N;}if(R!==null){J.showMarkers=(J.showMarkers!==null&&J.showMarkers!==undefined)?J.showMarkers:R;}if(K!==null){J.showLines=(J.showLines!==null&&J.showLines!==undefined)?J.showLines:K;
+}}D[S]=J;}if(W){E=this.get("graph");E.set("seriesCollection",D);D=E.get("seriesCollection");}return D;},_parseSeriesAxes:function(E){var I=this.get("axes"),G=E.get("xAxis"),D=E.get("yAxis"),H=b.Axis,F;if(G&&!(G instanceof H)&&q.isString(G)&&I.hasOwnProperty(G)){F=I[G];if(F instanceof H){E.set("xAxis",F);}}if(D&&!(D instanceof H)&&q.isString(D)&&I.hasOwnProperty(D)){F=I[D];if(F instanceof H){E.set("yAxis",F);}}},_getCategoryAxis:function(){var D,E=this.get("axes"),F=this.get("categoryAxisName")||this.get("categoryKey");D=E[F];return D;},_getSeriesAxis:function(E,I){var H=this.get("axes"),D,G,F;if(H){if(I&&H.hasOwnProperty(I)){F=H[I];}else{for(D in H){if(H.hasOwnProperty(D)){G=H[D].get("keys");if(G&&G.hasOwnProperty(E)){F=H[D];break;}}}}}return F;},_getBaseAttribute:function(E,D){if(E instanceof b.Base){return E.get(D);}if(E.hasOwnProperty(D)){return E[D];}return null;},_setBaseAttribute:function(E,D,F){if(E instanceof b.Base){E.set(D,F);}else{E[D]=F;}},_setAxes:function(E){var I=this._parseAxes(E),M={},G={edgeOffset:"edgeOffset",position:"position",overlapGraph:"overlapGraph",labelFunction:"labelFunction",labelFunctionScope:"labelFunctionScope",labelFormat:"labelFormat",maximum:"maximum",minimum:"minimum",roundingMethod:"roundingMethod",alwaysShowZero:"alwaysShowZero",title:"title",width:"width",height:"height"},H=this.get("dataProvider"),P,J,Q,F,K,O,N,D,L;for(J in I){if(I.hasOwnProperty(J)){O=I[J];if(O instanceof b.Axis){F=O;}else{F=null;D={};D.dataProvider=O.dataProvider||H;D.keys=O.keys;if(O.hasOwnProperty("roundingUnit")){D.roundingUnit=O.roundingUnit;}Q=O.position;if(O.styles){D.styles=O.styles;}D.position=O.position;for(P in G){if(G.hasOwnProperty(P)&&O.hasOwnProperty(P)){D[P]=O[P];}}if(E){F=this.getAxisByKey(J);}if(F&&F instanceof b.Axis){K=F.get("position");if(Q!=K){if(K!="none"){L=this.get(K+"AxesCollection");L.splice(b.Array.indexOf(L,F),1);}if(Q!="none"){this._addToAxesCollection(Q,F);}}F.setAttrs(D);}else{N=this._getAxisClass(O.type);F=new N(D);F.after("axisRendered",b.bind(this._itemRendered,this));}}if(F){L=this.get(Q+"AxesCollection");if(L&&b.Array.indexOf(L,F)>0){F.set("overlapGraph",false);}M[J]=F;}}}return M;},_addAxes:function(){var I=this.get("axes"),E,G,J,D=this.get("width"),F=this.get("height"),H=b.Node.one(this._parentNode);if(!this._axesCollection){this._axesCollection=[];}for(E in I){if(I.hasOwnProperty(E)){G=I[E];if(G instanceof b.Axis){if(!D){this.set("width",H.get("offsetWidth"));D=this.get("width");}if(!F){this.set("height",H.get("offsetHeight"));F=this.get("height");}this._addToAxesRenderQueue(G);J=G.get("position");if(!this.get(J+"AxesCollection")){this.set(J+"AxesCollection",[G]);}else{this.get(J+"AxesCollection").push(G);}this._axesCollection.push(G);if(G.get("keys").hasOwnProperty(this.get("categoryKey"))){this.set("categoryAxis",G);}G.render(this.get("contentBox"));}}}},_addSeries:function(){var D=this.get("graph"),E=this.get("seriesCollection");D.render(this.get("contentBox"));},_addGridlines:function(){var N=this.get("graph"),E=this.get("horizontalGridlines"),F=this.get("verticalGridlines"),M=this.get("direction"),O=this.get("leftAxesCollection"),I=this.get("rightAxesCollection"),K=this.get("bottomAxesCollection"),G=this.get("topAxesCollection"),H,D=this.get("categoryAxis"),L,J;if(this._axesCollection){H=this._axesCollection.concat();H.splice(b.Array.indexOf(H,D),1);}if(E){if(O&&O[0]){L=O[0];}else{if(I&&I[0]){L=I[0];}else{L=M=="horizontal"?D:H[0];}}if(!this._getBaseAttribute(E,"axis")&&L){this._setBaseAttribute(E,"axis",L);}if(this._getBaseAttribute(E,"axis")){N.set("horizontalGridlines",E);}}if(F){if(K&&K[0]){J=K[0];}else{if(G&&G[0]){J=G[0];}else{J=M=="vertical"?D:H[0];}}if(!this._getBaseAttribute(F,"axis")&&J){this._setBaseAttribute(F,"axis",J);}if(this._getBaseAttribute(F,"axis")){N.set("verticalGridlines",F);}}},_getAllKeys:function(I){var F=0,D=I.length,H,E,G={};for(;F<D;++F){H=I[F];for(E in H){if(H.hasOwnProperty(E)){G[E]=true;}}}return G;},_getDefaultAxes:function(){return this._parseAxes();},_parseAxes:function(V){var N=this.get("categoryKey"),E,T,P,G={},R=[],F=this.get("categoryAxisName")||this.get("categoryKey"),D=this.get("valueAxisName"),H=this.get("seriesKeys")||[],W,U,M,K,Q,O,S=this.get("dataProvider"),X=this.get("direction"),L,I,J=[],Y=this.get("stacked")?"stacked":"numeric";if(X=="vertical"){L="bottom";I="left";}else{L="left";I="bottom";}if(V){for(W in V){if(V.hasOwnProperty(W)){E=V[W];P=this._getBaseAttribute(E,"keys");T=this._getBaseAttribute(E,"type");if(T=="time"||T=="category"){F=W;this.set("categoryAxisName",W);if(q.isArray(P)&&P.length>0){N=P[0];this.set("categoryKey",N);}G[W]=E;}else{if(W==F){G[W]=E;}else{G[W]=E;if(W!=D&&P&&q.isArray(P)){K=P.length;for(M=0;M<K;++M){R.push(P[M]);}J.push(G[W]);}if(!(this._getBaseAttribute(G[W],"type"))){this._setBaseAttribute(G[W],"type",Y);}if(!(this._getBaseAttribute(G[W],"position"))){this._setBaseAttribute(G[W],"position",this._getDefaultAxisPosition(G[W],J,L));}}}}}}if(H.length<1){O=this._getAllKeys(S);for(W in O){if(O.hasOwnProperty(W)&&W!=N&&b.Array.indexOf(R,W)==-1){H.push(W);}}}Q=b.Array.indexOf(H,N);if(Q>-1){H.splice(Q,1);}U=R.length;for(W=0;W<U;++W){Q=b.Array.indexOf(H,R[W]);if(Q>-1){H.splice(Q,1);}}if(!G.hasOwnProperty(F)){G[F]={};}if(!(this._getBaseAttribute(G[F],"keys"))){this._setBaseAttribute(G[F],"keys",[N]);}if(!(this._getBaseAttribute(G[F],"position"))){this._setBaseAttribute(G[F],"position",I);}if(!(this._getBaseAttribute(G[F],"type"))){this._setBaseAttribute(G[F],"type",this.get("categoryType"));}if(!G.hasOwnProperty(D)&&H&&H.length>0){G[D]={keys:H};J.push(G[D]);}if(R.length>0){if(H.length>0){H=R.concat(H);}else{H=R;}}if(G.hasOwnProperty(D)){if(!(this._getBaseAttribute(G[D],"position"))){this._setBaseAttribute(G[D],"position",this._getDefaultAxisPosition(G[D],J,L));}if(!(this._getBaseAttribute(G[D],"type"))){this._setBaseAttribute(G[D],"type",Y);}if(!(this._getBaseAttribute(G[D],"keys"))){this._setBaseAttribute(G[D],"keys",H);}}this.set("seriesKeys",H);return G;},_getDefaultAxisPosition:function(G,E,D){var H=this.get("direction"),F=b.Array.indexOf(E,G);
+if(E[F-1]&&E[F-1].position){if(H=="horizontal"){if(E[F-1].position=="left"){D="right";}else{if(E[F-1].position=="right"){D="left";}}}else{if(E[F-1].position=="bottom"){D="top";}else{D="bottom";}}}return D;},getSeriesItems:function(I,H){var J=I.get("xAxis"),F=I.get("yAxis"),G=I.get("xKey"),E=I.get("yKey"),K,D;if(this.get("direction")=="vertical"){K={axis:F,key:E,value:F.getKeyValueAt(E,H)};D={axis:J,key:G,value:J.getKeyValueAt(G,H)};}else{D={axis:F,key:E,value:F.getKeyValueAt(E,H)};K={axis:J,key:G,value:J.getKeyValueAt(G,H)};}K.displayName=I.get("categoryDisplayName");D.displayName=I.get("valueDisplayName");K.value=K.axis.getKeyValueAt(K.key,H);D.value=D.axis.getKeyValueAt(D.key,H);return{category:K,value:D};},_sizeChanged:function(G){if(this._axesCollection){var F=this._axesCollection,E=0,D=F.length;for(;E<D;++E){this._addToAxesRenderQueue(F[E]);}this._redraw();}},_getTopOverflow:function(I,G,E){var F=0,D,J=0,H;if(I){D=I.length;for(;F<D;++F){H=I[F];J=Math.max(J,Math.abs(H.getMaxLabelBounds().top)-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}if(G){F=0;D=G.length;for(;F<D;++F){H=G[F];J=Math.max(J,Math.abs(H.getMaxLabelBounds().top)-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}return J;},_getRightOverflow:function(I,F,H){var E=0,D,J=0,G;if(I){D=I.length;for(;E<D;++E){G=I[E];J=Math.max(J,G.getMaxLabelBounds().right-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}if(F){E=0;D=F.length;for(;E<D;++E){G=F[E];J=Math.max(J,G.getMaxLabelBounds().right-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}return J;},_getLeftOverflow:function(I,F,H){var E=0,D,J=0,G;if(I){D=I.length;for(;E<D;++E){G=I[E];J=Math.max(J,Math.abs(G.getMinLabelBounds().left)-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}if(F){E=0;D=F.length;for(;E<D;++E){G=F[E];J=Math.max(J,Math.abs(G.getMinLabelBounds().left)-(G.getEdgeOffset(G.get("styles").majorTicks.count,H)*0.5));}}return J;},_getBottomOverflow:function(I,G,E){var F=0,D,J=0,H;if(I){D=I.length;for(;F<D;++F){H=I[F];J=Math.max(J,H.getMinLabelBounds().bottom-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}if(G){F=0;D=G.length;for(;F<D;++F){H=G[F];J=Math.max(J,H.getMinLabelBounds().bottom-(H.getEdgeOffset(H.get("styles").majorTicks.count,E)*0.5));}}return J;},_redraw:function(){if(this._drawing){this._callLater=true;return;}this._drawing=true;this._callLater=false;var Q=this.get("width"),aa=this.get("height"),Y=0,I=0,ae=0,E=0,D=this.get("leftAxesCollection"),O=this.get("rightAxesCollection"),P=this.get("topAxesCollection"),ad=this.get("bottomAxesCollection"),Z=0,W,J,G="visible",H=this.get("graph"),L,R,X,V,M,N,ac,ab,U=this.get("allowContentOverflow"),S,F,ag,T,K,af={};if(D){ag=[];W=D.length;for(Z=W-1;Z>-1;--Z){ag.unshift(Y);Y+=D[Z].get("width");}}if(O){F=[];W=O.length;Z=0;for(Z=W-1;Z>-1;--Z){I+=O[Z].get("width");F.unshift(Q-I);}}if(P){T=[];W=P.length;for(Z=W-1;Z>-1;--Z){T.unshift(ae);ae+=P[Z].get("height");}}if(ad){K=[];W=ad.length;for(Z=W-1;Z>-1;--Z){E+=ad[Z].get("height");K.unshift(aa-E);}}M=Q-(Y+I);N=aa-(E+ae);af.left=Y;af.top=ae;af.bottom=aa-E;af.right=Q-I;if(!U){L=this._getTopOverflow(D,O);R=this._getBottomOverflow(D,O);X=this._getLeftOverflow(ad,P);V=this._getRightOverflow(ad,P);S=L-ae;if(S>0){af.top=L;if(T){Z=0;W=T.length;for(;Z<W;++Z){T[Z]+=S;}}}S=R-E;if(S>0){af.bottom=aa-R;if(K){Z=0;W=K.length;for(;Z<W;++Z){K[Z]-=S;}}}S=X-Y;if(S>0){af.left=X;if(ag){Z=0;W=ag.length;for(;Z<W;++Z){ag[Z]+=S;}}}S=V-I;if(S>0){af.right=Q-V;if(F){Z=0;W=F.length;for(;Z<W;++Z){F[Z]-=S;}}}}M=af.right-af.left;N=af.bottom-af.top;ac=af.left;ab=af.top;if(P){W=P.length;Z=0;for(;Z<W;Z++){J=P[Z];if(J.get("width")!==M){J.set("width",M);}J.get("boundingBox").setStyle("left",ac+"px");J.get("boundingBox").setStyle("top",T[Z]+"px");}if(J._hasDataOverflow()){G="hidden";}}if(ad){W=ad.length;Z=0;for(;Z<W;Z++){J=ad[Z];if(J.get("width")!==M){J.set("width",M);}J.get("boundingBox").setStyle("left",ac+"px");J.get("boundingBox").setStyle("top",K[Z]+"px");}if(J._hasDataOverflow()){G="hidden";}}if(D){W=D.length;Z=0;for(;Z<W;++Z){J=D[Z];J.get("boundingBox").setStyle("top",ab+"px");J.get("boundingBox").setStyle("left",ag[Z]+"px");if(J.get("height")!==N){J.set("height",N);}}if(J._hasDataOverflow()){G="hidden";}}if(O){W=O.length;Z=0;for(;Z<W;++Z){J=O[Z];J.get("boundingBox").setStyle("top",ab+"px");J.get("boundingBox").setStyle("left",F[Z]+"px");if(J.get("height")!==N){J.set("height",N);}}if(J._hasDataOverflow()){G="hidden";}}this._drawing=false;if(this._callLater){this._redraw();return;}if(H){H.get("boundingBox").setStyle("left",ac+"px");H.get("boundingBox").setStyle("top",ab+"px");H.set("width",M);H.set("height",N);H.get("boundingBox").setStyle("overflow",G);}if(this._overlay){this._overlay.setStyle("left",ac+"px");this._overlay.setStyle("top",ab+"px");this._overlay.setStyle("width",M+"px");this._overlay.setStyle("height",N+"px");}},destructor:function(){var H=this.get("graph"),F=0,D,I=this.get("seriesCollection"),E=this._axesCollection,G=this.get("tooltip").node;if(this._description){this._description.empty();this._description.remove(true);}if(this._liveRegion){this._liveRegion.empty();this._liveRegion.remove(true);}D=I?I.length:0;for(;F<D;++F){if(I[F] instanceof b.CartesianSeries){I[F].destroy(true);}}D=E?E.length:0;for(F=0;F<D;++F){if(E[F] instanceof b.Axis){E[F].destroy(true);}}if(H){H.destroy(true);}if(G){G.empty();G.remove(true);}if(this._overlay){this._overlay.empty();this._overlay.remove(true);}},_getAriaMessage:function(N){var G="",J,M,F,L,I=this._seriesIndex,D=this._itemIndex,H=this.get("seriesCollection"),K=H.length,E;if(N%2===0){if(K>1){if(N===38){I=I<1?K-1:I-1;}else{if(N===40){I=I>=K-1?0:I+1;}}this._itemIndex=-1;}else{I=0;}this._seriesIndex=I;J=this.getSeries(parseInt(I,10));G="This is the "+J.get("valueDisplayName")+" series. Move the left and right arrows to navigate through the series items.";}else{if(I>-1){G="";J=this.getSeries(parseInt(I,10));}else{I=0;this._seriesIndex=I;J=this.getSeries(parseInt(I,10));G="This is the "+J.get("valueDisplayName")+" series.";
+}E=J._dataLength?J._dataLength:0;if(N===37){D=D>0?D-1:E-1;}else{if(N===39){D=D>=E-1?0:D+1;}}this._itemIndex=D;M=this.getSeriesItems(J,D);F=M.category;L=M.value;G+="Item "+(D+1)+" of "+E+". ";if(F&&L&&F.value&&L.value){G+=F.displayName+" is "+F.axis.formatLabel.apply(this,[F.value,F.axis.get("labelFormat")]);G+=L.displayName+" is "+L.axis.formatLabel.apply(this,[L.value,L.axis.get("labelFormat")]);}else{G+="No data available.";}}return G;}},{ATTRS:{allowContentOverflow:{value:false},axesStyles:{getter:function(){var F=this.get("axes"),D,E=this._axesStyles;if(F){for(D in F){if(F.hasOwnProperty(D)&&F[D] instanceof b.Axis){if(!E){E={};}E[D]=F[D].get("styles");}}}return E;},setter:function(F){var E=this.get("axes"),D;for(D in F){if(F.hasOwnProperty(D)&&E.hasOwnProperty(D)){this._setBaseAttribute(E[D],"styles",F[D]);}}}},seriesStyles:{getter:function(){var E=this._seriesStyles,F=this.get("graph"),G,D;if(F){G=F.get("seriesDictionary");if(G){E={};for(D in G){if(G.hasOwnProperty(D)){E[D]=G[D].get("styles");}}}}return E;},setter:function(G){var E,D,F;if(q.isArray(G)){F=this.get("seriesCollection");E=0;D=G.length;for(;E<D;++E){this._setBaseAttribute(F[E],"styles",G[E]);}}else{for(E in G){if(G.hasOwnProperty(E)){F=this.getSeries(E);this._setBaseAttribute(F,"styles",G[E]);}}}}},graphStyles:{getter:function(){var D=this.get("graph");if(D){return(D.get("styles"));}return this._graphStyles;},setter:function(E){var D=this.get("graph");this._setBaseAttribute(D,"styles",E);}},styles:{getter:function(){var D={axes:this.get("axesStyles"),series:this.get("seriesStyles"),graph:this.get("graphStyles")};return D;},setter:function(D){if(D.hasOwnProperty("axes")){if(this.get("axesStyles")){this.set("axesStyles",D.axes);}else{this._axesStyles=D.axes;}}if(D.hasOwnProperty("series")){if(this.get("seriesStyles")){this.set("seriesStyles",D.series);}else{this._seriesStyles=D.series;}}if(D.hasOwnProperty("graph")){this.set("graphStyles",D.graph);}}},axes:{valueFn:"_getDefaultAxes",setter:function(D){return this._setAxes(D);}},seriesCollection:{valueFn:"_getDefaultSeriesCollection",setter:function(D){return this._parseSeriesCollection(D);}},leftAxesCollection:{},bottomAxesCollection:{},rightAxesCollection:{},topAxesCollection:{},stacked:{value:false},direction:{getter:function(){var D=this.get("type");if(D=="bar"){return"vertical";}else{if(D=="column"){return"horizontal";}}return this._direction;},setter:function(D){this._direction=D;return this._direction;}},showAreaFill:{},showMarkers:{},showLines:{},categoryAxisName:{},valueAxisName:{value:"values"},horizontalGridlines:{getter:function(){var D=this.get("graph");if(D){return D.get("horizontalGridlines");}return this._horizontalGridlines;},setter:function(E){var D=this.get("graph");if(E&&!q.isObject(E)){E={};}if(D){D.set("horizontalGridlines",E);}else{this._horizontalGridlines=E;}}},verticalGridlines:{getter:function(){var D=this.get("graph");if(D){return D.get("verticalGridlines");}return this._verticalGridlines;},setter:function(E){var D=this.get("graph");if(E&&!q.isObject(E)){E={};}if(D){D.set("verticalGridlines",E);}else{this._verticalGridlines=E;}}},type:{getter:function(){if(this.get("stacked")){return"stacked"+this._type;}return this._type;},setter:function(D){if(this._type=="bar"){if(D!="bar"){this.set("direction","horizontal");}}else{if(D=="bar"){this.set("direction","vertical");}}this._type=D;return this._type;}},categoryAxis:{}}});b.PieChart=b.Base.create("pieChart",b.Widget,[b.ChartBase],{_getSeriesCollection:function(){if(this._seriesCollection){return this._seriesCollection;}var I=this.get("axes"),K=[],J,G=0,F,L=this.get("type"),N,D="categoryAxis",H="categoryKey",E="valueAxis",M="valueKey";if(I){J=I.values.get("keyCollection");N=I.category.get("keyCollection")[0];F=J.length;for(;G<F;++G){K[G]={type:L};K[G][D]="category";K[G][E]="values";K[G][H]=N;K[G][M]=J[G];}}this._seriesCollection=K;return K;},_parseAxes:function(G){if(!this._axes){this._axes={};}var H,M,F,K,D,J,L=this.get("type"),N=this.get("width"),I=this.get("height"),E=b.Node.one(this._parentNode);if(!N){this.set("width",E.get("offsetWidth"));N=this.get("width");}if(!I){this.set("height",E.get("offsetHeight"));I=this.get("height");}for(H in G){if(G.hasOwnProperty(H)){K=G[H];M=L=="pie"?"none":K.position;J=this._getAxisClass(K.type);D={dataProvider:this.get("dataProvider")};if(K.hasOwnProperty("roundingUnit")){D.roundingUnit=K.roundingUnit;}D.keys=K.keys;D.width=N;D.height=I;D.position=M;D.styles=K.styles;F=new J(D);F.on("axisRendered",b.bind(this._itemRendered,this));this._axes[H]=F;}}},_addAxes:function(){var G=this.get("axes"),D,E,F;if(!G){this.set("axes",this._getDefaultAxes());G=this.get("axes");}if(!this._axesCollection){this._axesCollection=[];}for(D in G){if(G.hasOwnProperty(D)){E=G[D];F=E.get("position");if(!this.get(F+"AxesCollection")){this.set(F+"AxesCollection",[E]);}else{this.get(F+"AxesCollection").push(E);}this._axesCollection.push(E);}}},_addSeries:function(){var D=this.get("graph"),E=this.get("seriesCollection");this._parseSeriesAxes(E);D.set("showBackground",false);D.set("width",this.get("width"));D.set("height",this.get("height"));D.set("seriesCollection",E);this._seriesCollection=D.get("seriesCollection");D.render(this.get("contentBox"));},_parseSeriesAxes:function(I){var E=0,D=I.length,G,H=this.get("axes"),F;for(;E<D;++E){G=I[E];if(G){if(G instanceof b.PieSeries){F=G.get("categoryAxis");if(F&&!(F instanceof b.Axis)){G.set("categoryAxis",H[F]);}F=G.get("valueAxis");if(F&&!(F instanceof b.Axis)){G.set("valueAxis",H[F]);}continue;}G.categoryAxis=H.category;G.valueAxis=H.values;if(!G.type){G.type=this.get("type");}}}},_getDefaultAxes:function(){var H=this.get("categoryKey"),E=this.get("seriesKeys")||[],D="numeric",G,F=this.get("dataProvider")[0];if(E.length<1){for(G in F){if(G!=H){E.push(G);}}if(E.length>0){this.set("seriesKeys",E);}}return{values:{keys:E,type:D},category:{keys:[H],type:this.get("categoryType")}};},getSeriesItems:function(F,E){var G={axis:F.get("categoryAxis"),key:F.get("categoryKey"),displayName:F.get("categoryDisplayName")},D={axis:F.get("valueAxis"),key:F.get("valueKey"),displayName:F.get("valueDisplayName")};
+G.value=G.axis.getKeyValueAt(G.key,E);D.value=D.axis.getKeyValueAt(D.key,E);return{category:G,value:D};},_sizeChanged:function(D){this._redraw();},_redraw:function(){var F=this.get("graph"),D=this.get("width"),E=this.get("height"),G;if(F){G=Math.min(D,E);F.set("width",G);F.set("height",G);}},_tooltipLabelFunction:function(K,D,G,F,E){var J=g.createElement("div"),H=F.getTotalValues(),I=Math.round((D.value/H)*10000)/100;J.appendChild(g.createTextNode(K.displayName+": "+K.axis.get("labelFunction").apply(this,[K.value,K.axis.get("labelFormat")])));J.appendChild(g.createElement("br"));J.appendChild(g.createTextNode(D.displayName+": "+D.axis.get("labelFunction").apply(this,[D.value,D.axis.get("labelFormat")])));J.appendChild(g.createElement("br"));J.appendChild(g.createTextNode(I+"%"));return J;},_getAriaMessage:function(P){var F="",E,M,J,L,I=0,D=this._itemIndex,G=this.get("seriesCollection"),K,N,O,H;J=this.getSeries(parseInt(I,10));H=J.get("markers");K=H&&H.length?H.length:0;if(P===37){D=D>0?D-1:K-1;}else{if(P===39){D=D>=K-1?0:D+1;}}this._itemIndex=D;M=this.getSeriesItems(J,D);E=M.category;L=M.value;N=J.getTotalValues();O=Math.round((L.value/N)*10000)/100;F="Item "+(D+1)+" of "+K+". ";if(E&&L){F+=E.displayName+" is "+E.axis.formatLabel.apply(this,[E.value,E.axis.get("labelFormat")]);F+=L.displayName+" is "+L.axis.formatLabel.apply(this,[L.value,L.axis.get("labelFormat")]);F+=L.displayName+" is "+O+"% of the total.";}else{F+="No data available.";}return F;}},{ATTRS:{ariaDescription:{value:"Use the left and right keys to navigate through items in the chart.",setter:function(D){if(this._description){this._description.setContent("");this._description.appendChild(g.createTextNode(D));}return D;}},axes:{getter:function(){return this._axes;},setter:function(D){this._parseAxes(D);}},seriesCollection:{getter:function(){return this._getSeriesCollection();},setter:function(D){return this._setSeriesCollection(D);}},type:{value:"pie"}}});},"@VERSION@",{requires:["dom","datatype-number","datatype-date","event-custom","event-mouseenter","event-touch","widget","widget-position","widget-stack","graphics"]});
View
41 build/charts-base/charts-base.js
@@ -11680,7 +11680,11 @@ ChartBase.ATTRS = {
setter: function(val)
{
- this.get("contentBox").setAttribute("ariaLabel", val);
+ var cb = this.get("contentBox");
+ if(cb)
+ {
+ cb.setAttribute("aria-label", val);
+ }
return val;
}
},
@@ -12115,9 +12119,10 @@ ChartBase.prototype = {
renderUI: function()
{
var tt = this.get("tooltip"),
+ bb = this.get("boundingBox"),
cb = this.get("contentBox");
//move the position = absolute logic to a class file
- this.get("boundingBox").setStyle("position", "absolute");
+ bb.setStyle("position", "absolute");
cb.setStyle("position", "absolute");
this._addAxes();
this._addSeries();
@@ -12125,7 +12130,7 @@ ChartBase.prototype = {
{
this._addTooltip();
}
- this._setAriaElements(cb);
+ this._setAriaElements(bb, cb);
},
/**
@@ -12135,21 +12140,25 @@ ChartBase.prototype = {
* @param {Node} cb Reference to the Chart's `contentBox` attribute.
* @private
*/
- _setAriaElements: function(cb)
+ _setAriaElements: function(bb, cb)
{
var description = this._getAriaOffscreenNode(),
id = this.get("id") + "_description",
liveRegion = this._getAriaOffscreenNode();
- cb.set("role", "img");
- cb._node.setAttribute("aria-label", this.get("ariaLabel"));
- cb._node.setAttribute("aria-describedby", id);
cb.set("tabIndex", 0);
+ cb.set("role", "img");
+ cb.setAttribute("aria-label", this.get("ariaLabel"));
+ cb.setAttribute("aria-describedby", id);
description.set("id", id);
+ description.set("tabIndex", -1);
description.appendChild(DOCUMENT.createTextNode(this.get("ariaDescription")));
liveRegion.set("id", "live-region");
+ liveRegion.set("aria-live", "polite");
+ liveRegion.set("aria-atomic", "true");
liveRegion.set("role", "status");
- cb.appendChild(description);
- cb.appendChild(liveRegion);
+ bb.setAttribute("role", "application");
+ bb.appendChild(description);
+ bb.appendChild(liveRegion);
this._description = description;
this._liveRegion = liveRegion;
},
@@ -12163,13 +12172,14 @@ ChartBase.prototype = {
*/
_getAriaOffscreenNode: function()
{
- var node = Y.one(DOCUMENT.createElement("div"));
+ var node = Y.Node.create("<div></div>"),
+ ie = Y.UA.ie,
+ clipRect = (ie && ie < 8) ? "rect(1px 1px 1px 1px)" : "rect(1px, 1px, 1px, 1px)";
node.setStyle("position", "absolute");
node.setStyle("height", "1px");
node.setStyle("width", "1px");
node.setStyle("overflow", "hidden");
- node.setStyle("clip", "rect(1px 1px 1px 1px)");
- node.setStyle("clip", "rect(1px, 1px, 1px, 1px)");
+ node.setStyle("clip", clipRect);
return node;
},
@@ -12847,12 +12857,13 @@ Y.CartesianChart = Y.Base.create("cartesianChart", Y.Widget, [Y.ChartBase], {
*/
renderUI: function()
{
- var cb = this.get("contentBox"),
+ var bb = this.get("boundingBox"),
+ cb = this.get("contentBox"),
tt = this.get("tooltip"),
overlay,
overlayClass = _getClassName("overlay");
//move the position = absolute logic to a class file
- this.get("boundingBox").setStyle("position", "absolute");
+ bb.setStyle("position", "absolute");
cb.setStyle("position", "absolute");
this._addAxes();
this._addGridlines();
@@ -12874,7 +12885,7 @@ Y.CartesianChart = Y.Base.create("cartesianChart", Y.Widget, [Y.ChartBase], {
this._overlay.addClass(overlayClass);
this._overlay.setStyle("zIndex", 4);
}
- this._setAriaElements(cb);
+ this._setAriaElements(bb, cb);
this._redraw();
},
View
46 build/charts-legend/charts-legend-debug.js
@@ -902,7 +902,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
background = new Y.Rect({
graphic: cb,
fill: styles.fill,
- stroke: styles.stroke
+ stroke: styles.border
});
bb.setStyle("display", "block");
bb.setStyle("position", "absolute");
@@ -1033,10 +1033,10 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
shapeClass,
item,
fill,
- stroke,
+ border,
fillColors,
- strokeColors,
- strokeWeight,
+ borderColors,
+ borderWeight,
items = [],
markerWidth = marker.width,
markerHeight = marker.height,
@@ -1057,8 +1057,8 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
displayName = series.get("categoryAxis").getDataByKey(series.get("categoryKey"));
seriesStyles = series.get("styles").marker;
fillColors = seriesStyles.fill.colors;
- strokeColors = seriesStyles.border.colors;
- strokeWeight = seriesStyles.border.weight;
+ borderColors = seriesStyles.border.colors;
+ borderWeight = seriesStyles.border.weight;
i = 0;
len = displayName.length;
shape = shape || Y.Circle;
@@ -1069,12 +1069,12 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
fill = {
color: fillColors[i]
};
- stroke = {
- colors: strokeColors[i],
- weight: strokeWeight
+ border = {
+ colors: borderColors[i],
+ weight: borderWeight
};
displayName = chart.getSeriesItems(series, i).category.value;
- item = this._getLegendItem(node, this._getShapeClass(shape), fill, stroke, labelStyles, markerWidth, markerHeight, displayName);
+ item = this._getLegendItem(node, this._getShapeClass(shape), fill, border, labelStyles, markerWidth, markerHeight, displayName);
itemWidth = item.width;
itemHeight = item.height;
maxWidth = Math.max(maxWidth, itemWidth);
@@ -1101,7 +1101,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
}
}
shapeClass = Y.Lang.isArray(shape) ? shape[i] : shape;
- item = this._getLegendItem(node, this._getShapeClass(shape), seriesStyles.fill, seriesStyles.stroke, labelStyles, markerWidth, markerHeight, series.get("valueDisplayName"));
+ item = this._getLegendItem(node, this._getShapeClass(shape), seriesStyles.fill, seriesStyles.border, labelStyles, markerWidth, markerHeight, series.get("valueDisplayName"));
itemWidth = item.width;
itemHeight = item.height;
maxWidth = Math.max(maxWidth, itemWidth);
@@ -1143,7 +1143,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
h = contentRect.bottom - y + padding.bottom;
this.get("background").set({
fill: backgroundStyles.fill,
- stroke: backgroundStyles.stroke,
+ stroke: backgroundStyles.border,
width: w,
height: h,
x: x,
@@ -1156,7 +1156,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
*
* @method _getStylesBySeriesType
* @param {CartesianSeries | PieSeries} The series in which the style properties will be received.
- * @return Object An object containing fill, stroke and shape information.
+ * @return Object An object containing fill, border and shape information.
* @private
*/
_getStylesBySeriesType: function(series)
@@ -1166,7 +1166,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
{
styles = series.get("styles").line;
return {
- stroke: {
+ border: {
weight: 1,
color: styles.color
},
@@ -1179,7 +1179,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
{
series = series.get("styles").fill;
return {
- stroke: {
+ border: {
weight: 1,
color: styles.color
},
@@ -1194,7 +1194,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
return {
fill: styles.fill,
- stroke: {
+ border: {
weight: styles.border.weight,
color: styles.border.color,
@@ -1219,7 +1219,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* @param {Node} shapeProps Reference to the `node` attribute.
* @param {String | Class} shapeClass The type of shape
* @param {Object} fill Properties for the shape's fill
- * @param {Object} stroke Properties for the shape's stroke
+ * @param {Object} border Properties for the shape's border
* @param {String} text String to be rendered as the legend's text
* @param {Number} width Total width of the legend item
* @param {Number} height Total height of the legend item
@@ -1227,7 +1227,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* @return Object
* @private
*/
- _getLegendItem: function(node, shapeClass, fill, stroke, labelStyles, w, h, text)
+ _getLegendItem: function(node, shapeClass, fill, border, labelStyles, w, h, text)
{
var containerNode = Y.one(DOCUMENT.createElement("div")),
textField = Y.one(DOCUMENT.createElement("span")),
@@ -1250,7 +1250,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
containerNode.setStyle("width", (left + textField.get("offsetWidth")) + PX);
shape = new shapeClass({
fill: fill,
- stroke: stroke,
+ stroke: border,
width: w,
height: h,
x: padding * 0.5,
@@ -1318,7 +1318,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
fill:{
color:"#faf9f2"
},
- stroke: {
+ border: {
color:"#dad8c9",
weight: 1
}
@@ -1623,10 +1623,10 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* <dt>color</dt><dd>Color for the fill. The default value is "#faf9f2".</dd>
* </dl>
* </dd>
- * <dt>stroke</dt><dd>Properties for the background stroke.
+ * <dt>border</dt><dd>Properties for the background border.
* <dl>
- * <dt>color</dt><dd>Color for the stroke. The default value is "#dad8c9".</dd>
- * <dt>weight</dt><dd>Weight of the stroke. The default values is 1.</dd>
+ * <dt>color</dt><dd>Color for the border. The default value is "#dad8c9".</dd>
+ * <dt>weight</dt><dd>Weight of the border. The default values is 1.</dd>
* </dl>
* </dd>
* </dl>
View
2  build/charts-legend/charts-legend-min.js
@@ -1,3 +1,3 @@
YUI.add("charts-legend",function(a){var c=a.config.doc,p="top",h="right",f="bottom",j="left",s="external",u="horizontal",q="vertical",b="width",n="height",m="position",i="x",g="y",e="px",l={setter:function(w){var v=this.get("legend");if(v){v.destroy(true);}if(w instanceof a.ChartLegend){v=w;v.set("chart",this);}else{w.chart=this;if(!w.hasOwnProperty("render")){w.render=this.get("contentBox");w.includeInChartLayout=true;}v=new a.ChartLegend(w);}return v;}},t={_positionLegendItems:function(K,T,N,w,X,H,E,A,Q,G){var R=0,L=0,V,O,y,P,S,M=this.get("width"),F,D,z,C,J,v=H.top-A,U=M-(H.left+H.right),x,I,W,B;t._setRowArrays(K,U,E);F=t.rowArray;C=t.totalWidthArray;D=F.length;for(;L<D;++L){v+=A;z=F[L];S=z.length;J=t.getStartPoint(M,C[L],Q,H);for(R=0;R<S;++R){V=z[R];O=V.node;y=V.width;P=V.height;V.x=J;V.y=0;x=!isNaN(x)?Math.min(x,J):J;I=!isNaN(I)?Math.min(I,v):v;W=!isNaN(W)?Math.max(J+y,W):J+y;B=!isNaN(B)?Math.max(v+P,B):v+P;O.setStyle("left",J+e);O.setStyle("top",v+e);J+=y+E;}v+=V.height;}this._contentRect={left:x,top:I,right:W,bottom:B};if(this.get("includeInChartLayout")){this.set("height",v+H.bottom);}},_setRowArrays:function(B,v,D){var F=B[0],C=[[F]],x=1,w=0,z=B.length,y=F.width,A,E=[[y]];for(;x<z;++x){F=B[x];A=F.width;if((y+D+A)<=v){y+=D+A;C[w].push(F);}else{y=D+A;if(C[w]){w+=1;}C[w]=[F];}E[w]=y;}t.rowArray=C;t.totalWidthArray=E;},getStartPoint:function(x,v,A,z){var y;switch(A){case j:y=z.left;break;case"center":y=(x-v)*0.5;break;case h:y=x-v-z.right;break;}return y;}},o={_positionLegendItems:function(M,T,N,x,X,I,E,C,Q,G){var R=0,F=0,V,O,P,B,S,L=this.get("height"),v,y,w,H,A,Y=I.left-E,K,U=L-(I.top+I.bottom),z,J,W,D;o._setColumnArrays(M,U,C);v=o.columnArray;H=o.totalHeightArray;y=v.length;for(;F<y;++F){Y+=E;w=v[F];S=w.length;A=o.getStartPoint(L,H[F],G,I);K=0;for(R=0;R<S;++R){V=w[R];O=V.node;P=V.height;B=V.width;V.y=A;V.x=Y;z=!isNaN(z)?Math.min(z,Y):Y;J=!isNaN(J)?Math.min(J,A):A;W=!isNaN(W)?Math.max(Y+B,W):Y+B;D=!isNaN(D)?Math.max(A+P,D):A+P;O.setStyle("left",Y+e);O.setStyle("top",A+e);A+=P+C;K=Math.max(K,V.width);}Y+=K;}this._contentRect={left:z,top:J,right:W,bottom:D};if(this.get("includeInChartLayout")){this.set("width",Y+I.right);}},_setColumnArrays:function(C,x,z){var F=C[0],D=[[F]],y=1,v=0,A=C.length,B=F.height,w,E=[[B]];for(;y<A;++y){F=C[y];w=F.height;if((B+z+w)<=x){B+=z+w;D[v].push(F);}else{B=z+w;if(D[v]){v+=1;}D[v]=[F];}E[v]=B;}o.columnArray=D;o.totalHeightArray=E;},getStartPoint:function(w,v,z,y){var x;switch(z){case p:x=y.top;break;case"middle":x=(w-v)*0.5;break;case f:x=w-v-y.bottom;break;}return x;}},d=a.Base.create("cartesianChartLegend",a.CartesianChart,[],{_redraw:function(){if(this._drawing){this._callLater=true;return;}this._drawing=true;this._callLater=false;var L=this.get("width"),V=this.get("height"),D=this._getLayoutBoxDimensions(),T=D.left,C=D.right,Z=D.top,x=D.bottom,v=this.get("leftAxesCollection"),J=this.get("rightAxesCollection"),K=this.get("topAxesCollection"),Y=this.get("bottomAxesCollection"),U=0,R,E,A="visible",B=this.get("graph"),G,M,S,Q,H,I,X,W,P=this.get("allowContentOverflow"),N,y,ab,O,F,z=this.get("legend"),aa={};if(v){ab=[];R=v.length;for(U=R-1;U>-1;--U){ab.unshift(T);T+=v[U].get("width");}}if(J){y=[];R=J.length;U=0;for(U=R-1;U>-1;--U){C+=J[U].get("width");y.unshift(L-C);}}if(K){O=[];R=K.length;for(U=R-1;U>-1;--U){O.unshift(Z);Z+=K[U].get("height");}}if(Y){F=[];R=Y.length;for(U=R-1;U>-1;--U){x+=Y[U].get("height");F.unshift(V-x);}}H=L-(T+C);I=V-(x+Z);aa.left=T;aa.top=Z;aa.bottom=V-x;aa.right=L-C;if(!P){G=this._getTopOverflow(v,J);M=this._getBottomOverflow(v,J);S=this._getLeftOverflow(Y,K);Q=this._getRightOverflow(Y,K);N=G-Z;if(N>0){aa.top=G;if(O){U=0;R=O.length;for(;U<R;++U){O[U]+=N;}}}N=M-x;if(N>0){aa.bottom=V-M;if(F){U=0;R=F.length;for(;U<R;++U){F[U]-=N;}}}N=S-T;if(N>0){aa.left=S;if(ab){U=0;R=ab.length;for(;U<R;++U){ab[U]+=N;}}}N=Q-C;if(N>0){aa.right=L-Q;if(y){U=0;R=y.length;for(;U<R;++U){y[U]-=N;}}}}H=aa.right-aa.left;I=aa.bottom-aa.top;X=aa.left;W=aa.top;if(z){if(z.get("includeInChartLayout")){switch(z.get("position")){case"left":z.set("y",W);z.set("height",I);break;case"top":z.set("x",X);z.set("width",H);break;case"bottom":z.set("x",X);z.set("width",H);break;case"right":z.set("y",W);z.set("height",I);break;}}}if(K){R=K.length;U=0;for(;U<R;U++){E=K[U];if(E.get("width")!==H){E.set("width",H);}E.get("boundingBox").setStyle("left",X+e);E.get("boundingBox").setStyle("top",O[U]+e);}if(E._hasDataOverflow()){A="hidden";}}if(Y){R=Y.length;U=0;for(;U<R;U++){E=Y[U];if(E.get("width")!==H){E.set("width",H);}E.get("boundingBox").setStyle("left",X+e);E.get("boundingBox").setStyle("top",F[U]+e);}if(E._hasDataOverflow()){A="hidden";}}if(v){R=v.length;U=0;for(;U<R;++U){E=v[U];E.get("boundingBox").setStyle("top",W+e);E.get("boundingBox").setStyle("left",ab[U]+e);if(E.get("height")!==I){E.set("height",I);}}if(E._hasDataOverflow()){A="hidden";}}if(J){R=J.length;U=0;for(;U<R;++U){E=J[U];E.get("boundingBox").setStyle("top",W+e);E.get("boundingBox").setStyle("left",y[U]+e);if(E.get("height")!==I){E.set("height",I);}}if(E._hasDataOverflow()){A="hidden";}}this._drawing=false;if(this._callLater){this._redraw();return;}if(B){B.get("boundingBox").setStyle("left",X+e);B.get("boundingBox").setStyle("top",W+e);B.set("width",H);B.set("height",I);B.get("boundingBox").setStyle("overflow",A);}if(this._overlay){this._overlay.setStyle("left",X+e);this._overlay.setStyle("top",W+e);this._overlay.setStyle("width",H+e);this._overlay.setStyle("height",I+e);}},_getLayoutBoxDimensions:function(){var x={top:0,right:0,bottom:0,left:0},C=this.get("legend"),z,B,v,E,D=this.get(b),y=this.get(n),A;if(C&&C.get("includeInChartLayout")){A=C.get("styles").gap;z=C.get(m);if(z!=s){B=C.get("direction");v=B==u?n:b;E=C.get(v);x[z]=E+A;switch(z){case p:C.set(g,0);break;case f:C.set(g,y-E);break;case h:C.set(i,D-E);break;case j:C.set(i,0);break;}}}return x;},destructor:function(){var v=this.get("legend");if(v){v.destroy(true);}}},{ATTRS:{legend:l}});a.CartesianChart=d;var k=a.Base.create("pieChartLegend",a.PieChart,[],{_redraw:function(){if(this._drawing){this._callLater=true;
-return;}this._drawing=true;this._callLater=false;var N=this.get("graph"),K=this.get("width"),B=this.get("height"),M,v,J=this.get("legend"),H=0,E=0,D=0,C=0,L,I,z,G,A,F;if(N){if(J){A=J.get("position");F=J.get("direction");M=N.get("width");v=N.get("height");L=J.get("width");I=J.get("height");G=J.get("styles").gap;if((F=="vertical"&&(M+L+G!==K))||(F=="horizontal"&&(v+I+G!==B))){switch(J.get("position")){case j:z=Math.min(K-(L+G),B);I=B;H=L+G;J.set(n,I);break;case p:z=Math.min(B-(I+G),K);L=K;E=I+G;J.set(b,L);break;case h:z=Math.min(K-(L+G),B);I=B;D=z+G;J.set(n,I);break;case f:z=Math.min(B-(I+G),K);L=K;C=z+G;J.set(b,L);break;}N.set(b,z);N.set(n,z);}else{switch(J.get("position")){case j:H=L+G;break;case p:E=I+G;break;case h:D=M+G;break;case f:C=v+G;break;}}}else{N.set(i,0);N.set(g,0);N.set(b,K);N.set(n,B);}}this._drawing=false;if(this._callLater){this._redraw();return;}if(N){N.set(i,H);N.set(g,E);}if(J){J.set(i,D);J.set(g,C);}}},{ATTRS:{legend:l}});a.PieChart=k;a.ChartLegend=a.Base.create("chartlegend",a.Widget,[a.Renderer],{initializer:function(){this._items=[];},renderUI:function(){var y=this.get("boundingBox"),v=this.get("contentBox"),x=this.get("styles").background,w=new a.Rect({graphic:v,fill:x.fill,stroke:x.stroke});y.setStyle("display","block");y.setStyle("position","absolute");this.set("background",w);},bindUI:function(){this.get("chart").after("seriesCollectionChange",this._updateHandler);this.after("stylesChange",this._updateHandler);this.after("positionChange",this._positionChangeHandler);this.after("widthChange",this._handleSizeChange);this.after("heightChange",this._handleSizeChange);},syncUI:function(){var v=this.get("width"),x=this.get("height");if(isFinite(v)&&isFinite(x)&&v>0&&x>0){this._drawLegend();}},_updateHandler:function(v){if(this.get("rendered")){this._drawLegend();}},_positionChangeHandler:function(x){var w=this.get("chart"),v=this._parentNode;if(v&&((w&&this.get("includeInChartLayout")))){this.fire("legendRendered");}else{if(this.get("rendered")){this._drawLegend();}}},_handleSizeChange:function(x){var w=x.attrName,z=this.get(m),v=z==j||z==h,y=z==f||z==p;if((y&&w==b)||(v&&w==n)){this._drawLegend();}},_drawLegend:function(){if(this._drawing){this._callLater=true;return;}this._drawing=true;this._callLater=false;if(this.get("includeInChartLayout")){this.get("chart")._itemRenderQueue.unshift(this);}var ad=this.get("chart"),V=this.get("contentBox"),W=ad.get("seriesCollection"),y,S=this.get("styles"),Z=S.padding,K=S.item,X,x=K.hSpacing,z=K.vSpacing,C=S.hAlign,N=S.vAlign,ae=S.marker,E=K.label,T,U=this._layout[this.get("direction")],aa,F,M,G,B,Q,D,R,ab,J,I,H=[],P=ae.width,v=ae.height,A=0-x,O=0-z,L=0,Y=0,w,ac;if(ae&&ae.shape){G=ae.shape;}this._destroyLegendItems();if(ad instanceof a.PieChart){y=W[0];T=y.get("categoryAxis").getDataByKey(y.get("categoryKey"));X=y.get("styles").marker;ab=X.fill.colors;J=X.border.colors;I=X.border.weight;aa=0;F=T.length;G=G||a.Circle;M=a.Lang.isArray(G);for(;aa<F;++aa){G=M?G[aa]:G;D={color:ab[aa]};R={colors:J[aa],weight:I};T=ad.getSeriesItems(y,aa).category.value;Q=this._getLegendItem(V,this._getShapeClass(G),D,R,E,P,v,T);w=Q.width;ac=Q.height;L=Math.max(L,w);Y=Math.max(Y,ac);A+=w+x;O+=ac+z;H.push(Q);}}else{aa=0;F=W.length;for(;aa<F;++aa){y=W[aa];X=this._getStylesBySeriesType(y,G);if(!G){G=X.shape;if(!G){G=a.Circle;}}B=a.Lang.isArray(G)?G[aa]:G;Q=this._getLegendItem(V,this._getShapeClass(G),X.fill,X.stroke,E,P,v,y.get("valueDisplayName"));w=Q.width;ac=Q.height;L=Math.max(L,w);Y=Math.max(Y,ac);A+=w+x;O+=ac+z;H.push(Q);}}this.set("items",H);this._drawing=false;if(this._callLater){this._drawLegend();}else{U._positionLegendItems.apply(this,[H,L,Y,A,O,Z,x,z,C,N]);this._updateBackground(S);this.fire("legendRendered");}},_updateBackground:function(C){var D=C.background,z=this._contentRect,E=C.padding,v=z.left-E.left,F=z.top-E.top,A=z.right-v+E.right,B=z.bottom-F+E.bottom;this.get("background").set({fill:D.fill,stroke:D.stroke,width:A,height:B,x:v,y:F});},_getStylesBySeriesType:function(v){var w=v.get("styles");if(v instanceof a.LineSeries||v instanceof a.StackedLineSeries){w=v.get("styles").line;return{stroke:{weight:1,color:w.color},fill:{color:w.color}};}else{if(v instanceof a.AreaSeries||v instanceof a.StackedAreaSeries){v=v.get("styles").fill;return{stroke:{weight:1,color:w.color},fill:{color:w.color}};}else{w=v.get("styles").marker;return{fill:w.fill,stroke:{weight:w.border.weight,color:w.border.color,shape:w.shape},shape:w.shape};}}},_getLegendItem:function(x,D,J,K,E,G,B,H){var z=a.one(c.createElement("div")),y=a.one(c.createElement("span")),C,A,F,v,I;z.setStyle(m,"absolute");y.setStyle(m,"absolute");y.setStyles(E);y.appendChild(c.createTextNode(H));z.appendChild(y);x.appendChild(z);A=y.get("offsetHeight");F=A-B;v=G+F+2;y.setStyle("left",v+e);z.setStyle("height",A+e);z.setStyle("width",(v+y.get("offsetWidth"))+e);C=new D({fill:J,stroke:K,width:G,height:B,x:F*0.5,y:F*0.5,w:G,h:B,graphic:z});y.setStyle("left",A+e);I={node:z,width:z.get("offsetWidth"),height:z.get("offsetHeight"),shape:C,textNode:y,text:H};this._items.push(I);return I;},_getShapeClass:function(){var v=this.get("background").get("graphic");return v._getShapeClass.apply(v,arguments);},_getDefaultStyles:function(){var v={padding:{top:8,right:8,bottom:8,left:9},gap:10,hAlign:"center",vAlign:"top",marker:this._getPlotDefaults(),item:{hSpacing:10,vSpacing:5,label:{color:"#808080",fontSize:"85%"}},background:{shape:"rect",fill:{color:"#faf9f2"},stroke:{color:"#dad8c9",weight:1}}};return v;},_getPlotDefaults:function(){var v={width:10,height:10};return v;},_destroyLegendItems:function(){var v;if(this._items){while(this._items.length>0){v=this._items.shift();v.shape.get("graphic").destroy();v.node.empty();v.node.remove(true);v=null;}}this._items=[];},_layout:{vertical:o,horizontal:t},destructor:function(){var v=this.get("graphic");this._destroyLegendItems();if(v){v.destroy();}}},{ATTRS:{includeInChartLayout:{value:false},chart:{setter:function(v){this.after("legendRendered",a.bind(v._itemRendered,v));
+return;}this._drawing=true;this._callLater=false;var N=this.get("graph"),K=this.get("width"),B=this.get("height"),M,v,J=this.get("legend"),H=0,E=0,D=0,C=0,L,I,z,G,A,F;if(N){if(J){A=J.get("position");F=J.get("direction");M=N.get("width");v=N.get("height");L=J.get("width");I=J.get("height");G=J.get("styles").gap;if((F=="vertical"&&(M+L+G!==K))||(F=="horizontal"&&(v+I+G!==B))){switch(J.get("position")){case j:z=Math.min(K-(L+G),B);I=B;H=L+G;J.set(n,I);break;case p:z=Math.min(B-(I+G),K);L=K;E=I+G;J.set(b,L);break;case h:z=Math.min(K-(L+G),B);I=B;D=z+G;J.set(n,I);break;case f:z=Math.min(B-(I+G),K);L=K;C=z+G;J.set(b,L);break;}N.set(b,z);N.set(n,z);}else{switch(J.get("position")){case j:H=L+G;break;case p:E=I+G;break;case h:D=M+G;break;case f:C=v+G;break;}}}else{N.set(i,0);N.set(g,0);N.set(b,K);N.set(n,B);}}this._drawing=false;if(this._callLater){this._redraw();return;}if(N){N.set(i,H);N.set(g,E);}if(J){J.set(i,D);J.set(g,C);}}},{ATTRS:{legend:l}});a.PieChart=k;a.ChartLegend=a.Base.create("chartlegend",a.Widget,[a.Renderer],{initializer:function(){this._items=[];},renderUI:function(){var y=this.get("boundingBox"),v=this.get("contentBox"),x=this.get("styles").background,w=new a.Rect({graphic:v,fill:x.fill,stroke:x.border});y.setStyle("display","block");y.setStyle("position","absolute");this.set("background",w);},bindUI:function(){this.get("chart").after("seriesCollectionChange",this._updateHandler);this.after("stylesChange",this._updateHandler);this.after("positionChange",this._positionChangeHandler);this.after("widthChange",this._handleSizeChange);this.after("heightChange",this._handleSizeChange);},syncUI:function(){var v=this.get("width"),x=this.get("height");if(isFinite(v)&&isFinite(x)&&v>0&&x>0){this._drawLegend();}},_updateHandler:function(v){if(this.get("rendered")){this._drawLegend();}},_positionChangeHandler:function(x){var w=this.get("chart"),v=this._parentNode;if(v&&((w&&this.get("includeInChartLayout")))){this.fire("legendRendered");}else{if(this.get("rendered")){this._drawLegend();}}},_handleSizeChange:function(x){var w=x.attrName,z=this.get(m),v=z==j||z==h,y=z==f||z==p;if((y&&w==b)||(v&&w==n)){this._drawLegend();}},_drawLegend:function(){if(this._drawing){this._callLater=true;return;}this._drawing=true;this._callLater=false;if(this.get("includeInChartLayout")){this.get("chart")._itemRenderQueue.unshift(this);}var ad=this.get("chart"),V=this.get("contentBox"),W=ad.get("seriesCollection"),A,S=this.get("styles"),Z=S.padding,L=S.item,X,z=L.hSpacing,B=L.vSpacing,F=S.hAlign,O=S.vAlign,ae=S.marker,H=L.label,T,U=this._layout[this.get("direction")],aa,I,N,J,D,R,G,E,ab,w,v,K=[],Q=ae.width,x=ae.height,C=0-z,P=0-B,M=0,Y=0,y,ac;if(ae&&ae.shape){J=ae.shape;}this._destroyLegendItems();if(ad instanceof a.PieChart){A=W[0];T=A.get("categoryAxis").getDataByKey(A.get("categoryKey"));X=A.get("styles").marker;ab=X.fill.colors;w=X.border.colors;v=X.border.weight;aa=0;I=T.length;J=J||a.Circle;N=a.Lang.isArray(J);for(;aa<I;++aa){J=N?J[aa]:J;G={color:ab[aa]};E={colors:w[aa],weight:v};T=ad.getSeriesItems(A,aa).category.value;R=this._getLegendItem(V,this._getShapeClass(J),G,E,H,Q,x,T);y=R.width;ac=R.height;M=Math.max(M,y);Y=Math.max(Y,ac);C+=y+z;P+=ac+B;K.push(R);}}else{aa=0;I=W.length;for(;aa<I;++aa){A=W[aa];X=this._getStylesBySeriesType(A,J);if(!J){J=X.shape;if(!J){J=a.Circle;}}D=a.Lang.isArray(J)?J[aa]:J;R=this._getLegendItem(V,this._getShapeClass(J),X.fill,X.border,H,Q,x,A.get("valueDisplayName"));y=R.width;ac=R.height;M=Math.max(M,y);Y=Math.max(Y,ac);C+=y+z;P+=ac+B;K.push(R);}}this.set("items",K);this._drawing=false;if(this._callLater){this._drawLegend();}else{U._positionLegendItems.apply(this,[K,M,Y,C,P,Z,z,B,F,O]);this._updateBackground(S);this.fire("legendRendered");}},_updateBackground:function(C){var D=C.background,z=this._contentRect,E=C.padding,v=z.left-E.left,F=z.top-E.top,A=z.right-v+E.right,B=z.bottom-F+E.bottom;this.get("background").set({fill:D.fill,stroke:D.border,width:A,height:B,x:v,y:F});},_getStylesBySeriesType:function(v){var w=v.get("styles");if(v instanceof a.LineSeries||v instanceof a.StackedLineSeries){w=v.get("styles").line;return{border:{weight:1,color:w.color},fill:{color:w.color}};}else{if(v instanceof a.AreaSeries||v instanceof a.StackedAreaSeries){v=v.get("styles").fill;return{border:{weight:1,color:w.color},fill:{color:w.color}};}else{w=v.get("styles").marker;return{fill:w.fill,border:{weight:w.border.weight,color:w.border.color,shape:w.shape},shape:w.shape};}}},_getLegendItem:function(x,E,K,A,F,H,C,I){var z=a.one(c.createElement("div")),y=a.one(c.createElement("span")),D,B,G,v,J;z.setStyle(m,"absolute");y.setStyle(m,"absolute");y.setStyles(F);y.appendChild(c.createTextNode(I));z.appendChild(y);x.appendChild(z);B=y.get("offsetHeight");G=B-C;v=H+G+2;y.setStyle("left",v+e);z.setStyle("height",B+e);z.setStyle("width",(v+y.get("offsetWidth"))+e);D=new E({fill:K,stroke:A,width:H,height:C,x:G*0.5,y:G*0.5,w:H,h:C,graphic:z});y.setStyle("left",B+e);J={node:z,width:z.get("offsetWidth"),height:z.get("offsetHeight"),shape:D,textNode:y,text:I};this._items.push(J);return J;},_getShapeClass:function(){var v=this.get("background").get("graphic");return v._getShapeClass.apply(v,arguments);},_getDefaultStyles:function(){var v={padding:{top:8,right:8,bottom:8,left:9},gap:10,hAlign:"center",vAlign:"top",marker:this._getPlotDefaults(),item:{hSpacing:10,vSpacing:5,label:{color:"#808080",fontSize:"85%"}},background:{shape:"rect",fill:{color:"#faf9f2"},border:{color:"#dad8c9",weight:1}}};return v;},_getPlotDefaults:function(){var v={width:10,height:10};return v;},_destroyLegendItems:function(){var v;if(this._items){while(this._items.length>0){v=this._items.shift();v.shape.get("graphic").destroy();v.node.empty();v.node.remove(true);v=null;}}this._items=[];},_layout:{vertical:o,horizontal:t},destructor:function(){var v=this.get("graphic");this._destroyLegendItems();if(v){v.destroy();}}},{ATTRS:{includeInChartLayout:{value:false},chart:{setter:function(v){this.after("legendRendered",a.bind(v._itemRendered,v));
return v;}},direction:{value:"vertical"},position:{lazyAdd:false,value:"right",setter:function(v){if(v==p||v==f){this.set("direction",u);}else{if(v==j||v==h){this.set("direction",q);}}return v;}},width:{getter:function(){var w=this.get("chart"),v=this._parentNode;if(v){if((w&&this.get("includeInChartLayout"))||this._width){if(!this._width){this._width=0;}return this._width;}else{return v.get("offsetWidth");}}return"";},setter:function(v){this._width=v;return v;}},height:{valueFn:"_heightGetter",getter:function(){var w=this.get("chart"),v=this._parentNode;if(v){if((w&&this.get("includeInChartLayout"))||this._height){if(!this._height){this._height=0;}return this._height;}else{return v.get("offsetHeight");}}return"";},setter:function(v){this._height=v;return v;}},x:{lazyAdd:false,value:0,setter:function(w){var v=this.get("boundingBox");if(v){v.setStyle(j,w+e);}return w;}},y:{lazyAdd:false,value:0,setter:function(w){var v=this.get("boundingBox");if(v){v.setStyle(p,w+e);}return w;}},background:{}}});function r(v){if(v.type!="pie"){return new a.CartesianChart(v);}else{return new a.PieChart(v);}}a.Chart=r;},"@VERSION@",{requires:["charts-base"]});
View
46 build/charts-legend/charts-legend.js
@@ -902,7 +902,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
background = new Y.Rect({
graphic: cb,
fill: styles.fill,
- stroke: styles.stroke
+ stroke: styles.border
});
bb.setStyle("display", "block");
bb.setStyle("position", "absolute");
@@ -1033,10 +1033,10 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
shapeClass,
item,
fill,
- stroke,
+ border,
fillColors,
- strokeColors,
- strokeWeight,
+ borderColors,
+ borderWeight,
items = [],
markerWidth = marker.width,
markerHeight = marker.height,
@@ -1057,8 +1057,8 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
displayName = series.get("categoryAxis").getDataByKey(series.get("categoryKey"));
seriesStyles = series.get("styles").marker;
fillColors = seriesStyles.fill.colors;
- strokeColors = seriesStyles.border.colors;
- strokeWeight = seriesStyles.border.weight;
+ borderColors = seriesStyles.border.colors;
+ borderWeight = seriesStyles.border.weight;
i = 0;
len = displayName.length;
shape = shape || Y.Circle;
@@ -1069,12 +1069,12 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
fill = {
color: fillColors[i]
};
- stroke = {
- colors: strokeColors[i],
- weight: strokeWeight
+ border = {
+ colors: borderColors[i],
+ weight: borderWeight
};
displayName = chart.getSeriesItems(series, i).category.value;
- item = this._getLegendItem(node, this._getShapeClass(shape), fill, stroke, labelStyles, markerWidth, markerHeight, displayName);
+ item = this._getLegendItem(node, this._getShapeClass(shape), fill, border, labelStyles, markerWidth, markerHeight, displayName);
itemWidth = item.width;
itemHeight = item.height;
maxWidth = Math.max(maxWidth, itemWidth);
@@ -1101,7 +1101,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
}
}
shapeClass = Y.Lang.isArray(shape) ? shape[i] : shape;
- item = this._getLegendItem(node, this._getShapeClass(shape), seriesStyles.fill, seriesStyles.stroke, labelStyles, markerWidth, markerHeight, series.get("valueDisplayName"));
+ item = this._getLegendItem(node, this._getShapeClass(shape), seriesStyles.fill, seriesStyles.border, labelStyles, markerWidth, markerHeight, series.get("valueDisplayName"));
itemWidth = item.width;
itemHeight = item.height;
maxWidth = Math.max(maxWidth, itemWidth);
@@ -1143,7 +1143,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
h = contentRect.bottom - y + padding.bottom;
this.get("background").set({
fill: backgroundStyles.fill,
- stroke: backgroundStyles.stroke,
+ stroke: backgroundStyles.border,
width: w,
height: h,
x: x,
@@ -1156,7 +1156,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
*
* @method _getStylesBySeriesType
* @param {CartesianSeries | PieSeries} The series in which the style properties will be received.
- * @return Object An object containing fill, stroke and shape information.
+ * @return Object An object containing fill, border and shape information.
* @private
*/
_getStylesBySeriesType: function(series)
@@ -1166,7 +1166,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
{
styles = series.get("styles").line;
return {
- stroke: {
+ border: {
weight: 1,
color: styles.color
},
@@ -1179,7 +1179,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
{
series = series.get("styles").fill;
return {
- stroke: {
+ border: {
weight: 1,
color: styles.color
},
@@ -1194,7 +1194,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
return {
fill: styles.fill,
- stroke: {
+ border: {
weight: styles.border.weight,
color: styles.border.color,
@@ -1219,7 +1219,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* @param {Node} shapeProps Reference to the `node` attribute.
* @param {String | Class} shapeClass The type of shape
* @param {Object} fill Properties for the shape's fill
- * @param {Object} stroke Properties for the shape's stroke
+ * @param {Object} border Properties for the shape's border
* @param {String} text String to be rendered as the legend's text
* @param {Number} width Total width of the legend item
* @param {Number} height Total height of the legend item
@@ -1227,7 +1227,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* @return Object
* @private
*/
- _getLegendItem: function(node, shapeClass, fill, stroke, labelStyles, w, h, text)
+ _getLegendItem: function(node, shapeClass, fill, border, labelStyles, w, h, text)
{
var containerNode = Y.one(DOCUMENT.createElement("div")),
textField = Y.one(DOCUMENT.createElement("span")),
@@ -1250,7 +1250,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
containerNode.setStyle("width", (left + textField.get("offsetWidth")) + PX);
shape = new shapeClass({
fill: fill,
- stroke: stroke,
+ stroke: border,
width: w,
height: h,
x: padding * 0.5,
@@ -1318,7 +1318,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
fill:{
color:"#faf9f2"
},
- stroke: {
+ border: {
color:"#dad8c9",
weight: 1
}
@@ -1623,10 +1623,10 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* <dt>color</dt><dd>Color for the fill. The default value is "#faf9f2".</dd>
* </dl>
* </dd>
- * <dt>stroke</dt><dd>Properties for the background stroke.
+ * <dt>border</dt><dd>Properties for the background border.
* <dl>
- * <dt>color</dt><dd>Color for the stroke. The default value is "#dad8c9".</dd>
- * <dt>weight</dt><dd>Weight of the stroke. The default values is 1.</dd>
+ * <dt>color</dt><dd>Color for the border. The default value is "#dad8c9".</dd>
+ * <dt>weight</dt><dd>Weight of the border. The default values is 1.</dd>
* </dl>
* </dd>
* </dl>
View
7 src/charts/js/CartesianChart.js
@@ -13,12 +13,13 @@ Y.CartesianChart = Y.Base.create("cartesianChart", Y.Widget, [Y.ChartBase], {
*/
renderUI: function()
{
- var cb = this.get("contentBox"),
+ var bb = this.get("boundingBox"),
+ cb = this.get("contentBox"),
tt = this.get("tooltip"),
overlay,
overlayClass = _getClassName("overlay");
//move the position = absolute logic to a class file
- this.get("boundingBox").setStyle("position", "absolute");
+ bb.setStyle("position", "absolute");
cb.setStyle("position", "absolute");
this._addAxes();
this._addGridlines();
@@ -40,7 +41,7 @@ Y.CartesianChart = Y.Base.create("cartesianChart", Y.Widget, [Y.ChartBase], {
this._overlay.addClass(overlayClass);
this._overlay.setStyle("zIndex", 4);
}
- this._setAriaElements(cb);
+ this._setAriaElements(bb, cb);
this._redraw();
},
View
34 src/charts/js/ChartBase.js
@@ -19,7 +19,11 @@ ChartBase.ATTRS = {
setter: function(val)
{
- this.get("contentBox").setAttribute("ariaLabel", val);
+ var cb = this.get("contentBox");
+ if(cb)
+ {
+ cb.setAttribute("aria-label", val);
+ }
return val;
}
},
@@ -454,9 +458,10 @@ ChartBase.prototype = {
renderUI: function()
{
var tt = this.get("tooltip"),
+ bb = this.get("boundingBox"),
cb = this.get("contentBox");
//move the position = absolute logic to a class file
- this.get("boundingBox").setStyle("position", "absolute");
+ bb.setStyle("position", "absolute");
cb.setStyle("position", "absolute");
this._addAxes();
this._addSeries();
@@ -464,7 +469,7 @@ ChartBase.prototype = {
{
this._addTooltip();
}
- this._setAriaElements(cb);
+ this._setAriaElements(bb, cb);
},
/**
@@ -474,21 +479,25 @@ ChartBase.prototype = {
* @param {Node} cb Reference to the Chart's `contentBox` attribute.
* @private
*/
- _setAriaElements: function(cb)
+ _setAriaElements: function(bb, cb)
{
var description = this._getAriaOffscreenNode(),
id = this.get("id") + "_description",
liveRegion = this._getAriaOffscreenNode();
- cb.set("role", "img");
- cb._node.setAttribute("aria-label", this.get("ariaLabel"));
- cb._node.setAttribute("aria-describedby", id);
cb.set("tabIndex", 0);
+ cb.set("role", "img");
+ cb.setAttribute("aria-label", this.get("ariaLabel"));
+ cb.setAttribute("aria-describedby", id);
description.set("id", id);
+ description.set("tabIndex", -1);
description.appendChild(DOCUMENT.createTextNode(this.get("ariaDescription")));
liveRegion.set("id", "live-region");
+ liveRegion.set("aria-live", "polite");
+ liveRegion.set("aria-atomic", "true");
liveRegion.set("role", "status");
- cb.appendChild(description);
- cb.appendChild(liveRegion);
+ bb.setAttribute("role", "application");
+ bb.appendChild(description);
+ bb.appendChild(liveRegion);
this._description = description;
this._liveRegion = liveRegion;
},
@@ -502,13 +511,14 @@ ChartBase.prototype = {
*/
_getAriaOffscreenNode: function()
{
- var node = Y.one(DOCUMENT.createElement("div"));
+ var node = Y.Node.create("<div></div>"),
+ ie = Y.UA.ie,
+ clipRect = (ie && ie < 8) ? "rect(1px 1px 1px 1px)" : "rect(1px, 1px, 1px, 1px)";
node.setStyle("position", "absolute");
node.setStyle("height", "1px");
node.setStyle("width", "1px");
node.setStyle("overflow", "hidden");
- node.setStyle("clip", "rect(1px 1px 1px 1px)");
- node.setStyle("clip", "rect(1px, 1px, 1px, 1px)");
+ node.setStyle("clip", clipRect);
return node;
},
View
46 src/charts/js/ChartLegend.js
@@ -30,7 +30,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
background = new Y.Rect({
graphic: cb,
fill: styles.fill,
- stroke: styles.stroke
+ stroke: styles.border
});
bb.setStyle("display", "block");
bb.setStyle("position", "absolute");
@@ -161,10 +161,10 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
shapeClass,
item,
fill,
- stroke,
+ border,
fillColors,
- strokeColors,
- strokeWeight,
+ borderColors,
+ borderWeight,
items = [],
markerWidth = marker.width,
markerHeight = marker.height,
@@ -185,8 +185,8 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
displayName = series.get("categoryAxis").getDataByKey(series.get("categoryKey"));
seriesStyles = series.get("styles").marker;
fillColors = seriesStyles.fill.colors;
- strokeColors = seriesStyles.border.colors;
- strokeWeight = seriesStyles.border.weight;
+ borderColors = seriesStyles.border.colors;
+ borderWeight = seriesStyles.border.weight;
i = 0;
len = displayName.length;
shape = shape || Y.Circle;
@@ -197,12 +197,12 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
fill = {
color: fillColors[i]
};
- stroke = {
- colors: strokeColors[i],
- weight: strokeWeight
+ border = {
+ colors: borderColors[i],
+ weight: borderWeight
};
displayName = chart.getSeriesItems(series, i).category.value;
- item = this._getLegendItem(node, this._getShapeClass(shape), fill, stroke, labelStyles, markerWidth, markerHeight, displayName);
+ item = this._getLegendItem(node, this._getShapeClass(shape), fill, border, labelStyles, markerWidth, markerHeight, displayName);
itemWidth = item.width;
itemHeight = item.height;
maxWidth = Math.max(maxWidth, itemWidth);
@@ -229,7 +229,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
}
}
shapeClass = Y.Lang.isArray(shape) ? shape[i] : shape;
- item = this._getLegendItem(node, this._getShapeClass(shape), seriesStyles.fill, seriesStyles.stroke, labelStyles, markerWidth, markerHeight, series.get("valueDisplayName"));
+ item = this._getLegendItem(node, this._getShapeClass(shape), seriesStyles.fill, seriesStyles.border, labelStyles, markerWidth, markerHeight, series.get("valueDisplayName"));
itemWidth = item.width;
itemHeight = item.height;
maxWidth = Math.max(maxWidth, itemWidth);
@@ -271,7 +271,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
h = contentRect.bottom - y + padding.bottom;
this.get("background").set({
fill: backgroundStyles.fill,
- stroke: backgroundStyles.stroke,
+ stroke: backgroundStyles.border,
width: w,
height: h,
x: x,
@@ -284,7 +284,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
*
* @method _getStylesBySeriesType
* @param {CartesianSeries | PieSeries} The series in which the style properties will be received.
- * @return Object An object containing fill, stroke and shape information.
+ * @return Object An object containing fill, border and shape information.
* @private
*/
_getStylesBySeriesType: function(series)
@@ -294,7 +294,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
{
styles = series.get("styles").line;
return {
- stroke: {
+ border: {
weight: 1,
color: styles.color
},
@@ -307,7 +307,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
{
series = series.get("styles").fill;
return {
- stroke: {
+ border: {
weight: 1,
color: styles.color
},
@@ -322,7 +322,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
return {
fill: styles.fill,
- stroke: {
+ border: {
weight: styles.border.weight,
color: styles.border.color,
@@ -347,7 +347,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* @param {Node} shapeProps Reference to the `node` attribute.
* @param {String | Class} shapeClass The type of shape
* @param {Object} fill Properties for the shape's fill
- * @param {Object} stroke Properties for the shape's stroke
+ * @param {Object} border Properties for the shape's border
* @param {String} text String to be rendered as the legend's text
* @param {Number} width Total width of the legend item
* @param {Number} height Total height of the legend item
@@ -355,7 +355,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* @return Object
* @private
*/
- _getLegendItem: function(node, shapeClass, fill, stroke, labelStyles, w, h, text)
+ _getLegendItem: function(node, shapeClass, fill, border, labelStyles, w, h, text)
{
var containerNode = Y.one(DOCUMENT.createElement("div")),
textField = Y.one(DOCUMENT.createElement("span")),
@@ -378,7 +378,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
containerNode.setStyle("width", (left + textField.get("offsetWidth")) + PX);
shape = new shapeClass({
fill: fill,
- stroke: stroke,
+ stroke: border,
width: w,
height: h,
x: padding * 0.5,
@@ -446,7 +446,7 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
fill:{
color:"#faf9f2"
},
- stroke: {
+ border: {
color:"#dad8c9",
weight: 1
}
@@ -751,10 +751,10 @@ Y.ChartLegend = Y.Base.create("chartlegend", Y.Widget, [Y.Renderer], {
* <dt>color</dt><dd>Color for the fill. The default value is "#faf9f2".</dd>
* </dl>
* </dd>
- * <dt>stroke</dt><dd>Properties for the background stroke.
+ * <dt>border</dt><dd>Properties for the background border.
* <dl>
- * <dt>color</dt><dd>Color for the stroke. The default value is "#dad8c9".</dd>
- * <dt>weight</dt><dd>Weight of the stroke. The default values is 1.</dd>
+ * <dt>color</dt><dd>Color for the border. The default value is "#dad8c9".</dd>
+ * <dt>weight</dt><dd>Weight of the border. The default values is 1.</dd>
* </dl>
* </dd>
* </dl>
Please sign in to comment.
Something went wrong with that request. Please try again.