Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of yuisource.corp.yahoo.com:yui3

  • Loading branch information...
commit b724465956cb2918f9f1b57c39bdf8be50510fd3 2 parents 0d073a9 + 8abd172
@jenny jenny authored
View
69 build/charts/charts-debug.js
@@ -28,6 +28,9 @@ Graphic.prototype = {
autoSize: true,
/**
+ * Initializes the class.
+ *
+ * @method initializer
* @private
*/
initializer: function(config) {
@@ -135,6 +138,10 @@ Graphic.prototype = {
},
/**
+ * Removes all child nodes.
+ *
+ * @method _removeChildren
+ * @param node
* @private
*/
_removeChildren: function(node)
@@ -163,6 +170,11 @@ Graphic.prototype = {
},
/**
+ * Toggles visibility
+ *
+ * @method _toggleVisible
+ * @param node
+ * @param val
* @private
*/
_toggleVisible: function(node, val)
@@ -382,9 +394,9 @@ Graphic.prototype = {
},
/**
- * @private
- * Not implemented
* Specifies a gradient to use for the stroke when drawing lines.
+ * Not implemented
+ * @private
*/
lineGradientStyle: function() {
Y.log('lineGradientStyle not implemented', 'warn', 'graphics-canvas');
@@ -448,8 +460,11 @@ Graphic.prototype = {
},
/**
+ * Generates a path string for a wedge shape
+ *
+ * @method _getWedgePath
+ * @param {Object} config
* @private
- * @description Generates a path string for a wedge shape
*/
_getWedgePath: function(config)
{
@@ -536,8 +551,12 @@ Graphic.prototype = {
},
/**
- * @private
* Updates the size of the graphics object
+ *
+ * @method _trackSize
+ * @param {Number} w width
+ * @param {Number} h height
+ * @private
*/
_trackSize: function(w, h) {
if (w > this._width) {
@@ -579,8 +598,10 @@ Graphic.prototype = {
},
/**
- * @private
* Clears the properties
+ *
+ * @method _initProps
+ * @private
*/
_initProps: function() {
this._shape = null;
@@ -610,8 +631,10 @@ Graphic.prototype = {
},
/**
- * @private
* Clears path properties
+ *
+ * @method _clearPath
+ * @private
*/
_clearPath: function()
{
@@ -627,8 +650,10 @@ Graphic.prototype = {
},
/**
+ * Completes a shape
+ *
+ * @method _draw
* @private
- * Completes a vml shape
*/
_draw: function()
{
@@ -684,8 +709,10 @@ Graphic.prototype = {
},
/**
- * @private
* Returns ths actual fill object to be used in a drawing or shape
+ *
+ * @method _getFill
+ * @private
*/
_getFill: function() {
var type = this._fillType,
@@ -706,8 +733,11 @@ Graphic.prototype = {
},
/**
- * @private
* Returns a linear gradient fill
+ *
+ * @method _getLinearGradient
+ * @param {String} type gradient type
+ * @private
*/
_getLinearGradient: function(type) {
var fill = this._createGraphicNode("linearGradient"),
@@ -805,8 +835,10 @@ Graphic.prototype = {
},
/**
- * @private
* Creates a group element
+ *
+ * @method _createGraphics
+ * @private
*/
_createGraphics: function() {
var group = this._createGraphicNode("svg");
@@ -815,6 +847,9 @@ Graphic.prototype = {
},
/**
+ * Styles a group element
+ *
+ * @method _styleGroup
* @private
*/
_styleGroup: function(group)
@@ -827,6 +862,11 @@ Graphic.prototype = {
},
/**
+ * Creates a graphic node
+ *
+ * @method _createGraphicNode
+ * @param {String} type node type to create
+ * @param {String} pe specified pointer-events value
* @private
*/
_createGraphicNode: function(type, pe)
@@ -863,7 +903,10 @@ Graphic.prototype = {
Y.Graphic = Graphic;
/**
- * @private
+ * VMLGraphics is a fallback drawing api used for basic drawing operations when SVG is not available.
+ *
+ * @class VMLGraphics
+ * @constructor
*/
var VMLGraphics = function(config) {
@@ -12960,8 +13003,8 @@ Y.PieChart = Y.Base.create("pieChart", Y.Widget, [Y.ChartBase], {
seriesKey = "valueKey";
if(axes)
{
- seriesKeys = axes.values.get("dataSet").get("keyCollection");
- key = axes.category.get("dataSet").get("keyCollection")[0];
+ seriesKeys = axes.values.get("keyCollection");
+ key = axes.category.get("keyCollection")[0];
l = seriesKeys.length;
for(; i < l; ++i)
{
View
2  build/charts/charts-min.js
@@ -17,5 +17,5 @@ if(x){x.after("dataReady",b.bind(this._categoryDataChangeHandler,this));x.after(
y.set("graph",this);y.render();return y;}else{if(y&&y.axis){x=new b.Gridlines({direction:"vertical",axis:y.axis,graph:this,styles:y.styles});x.render();return x;}}}}}});function n(){}n.ATTRS={tooltip:{valueFn:"_getTooltip",setter:function(x){return this._updateTooltip(x);}},categoryKey:{value:"category"},categoryType:{value:"category"},interactionType:{value:"marker"},dataProvider:{setter:function(x){return this._setDataValues(x);}},seriesKeys:{},axesCollection:{},graph:{valueFn:"_getGraph"}};n.prototype={_getGraph:function(){var x=new b.Graph();x.after("chartRendered",b.bind(function(y){this.fire("chartRendered");},this));return x;},getSeries:function(z){var x=null,y=this.get("graph");if(y){if(b.Lang.isNumber(z)){x=y.getSeriesByIndex(z);}else{x=y.getSeriesByKey(z);}}return x;},getAxisByKey:function(z){var x,y=this.get("axes");if(y.hasOwnProperty(z)){x=y[z];}return x;},getCategoryAxis:function(){var y,x=this.get("categoryKey"),z=this.get("axes");if(z.hasOwnProperty(x)){y=z[x];}return y;},_direction:"horizontal",_dataProvider:null,_setDataValues:function(C){if(b.Lang.isArray(C[0])){var B,E=[],z=C[0],A=0,y=z.length,D,x=C.length;for(;A<y;++A){B={category:z[A]};for(D=1;D<x;++D){B["series"+D]=C[D][A];}E[A]=B;}return E;}return C;},_seriesCollection:null,_setSeriesCollection:function(x){this._seriesCollection=x;},_getAxisClass:function(x){return this._axisClass[x];},_axisClass:{stacked:b.StackedAxis,numeric:b.NumericAxis,category:b.CategoryAxis,time:b.TimeAxis},_axes:null,renderUI:function(){var x=this.get("tooltip");this.get("boundingBox").setStyle("position","absolute");this.get("contentBox").setStyle("position","absolute");this._addAxes();this._addSeries();if(x&&x.show){this._addTooltip();}this._redraw();},bindUI:function(){this.after("tooltipChange",b.bind(this._tooltipChangeHandler,this));this.after("widthChange",this._sizeChanged);this.after("heightChange",this._sizeChanged);this.after("dataProviderChange",this._dataProviderChangeHandler);var B=this.get("tooltip"),D="mouseout",A="mouseover",y=this.get("contentBox"),C=this.get("interactionType"),z=0,x;if(C=="marker"){D=B.hideEvent;A=B.showEvent;b.delegate("mouseenter",b.bind(this._markerEventDispatcher,this),y,".yui3-seriesmarker");b.delegate("mousedown",b.bind(this._markerEventDispatcher,this),y,".yui3-seriesmarker");b.delegate("mouseup",b.bind(this._markerEventDispatcher,this),y,".yui3-seriesmarker");b.delegate("mouseleave",b.bind(this._markerEventDispatcher,this),y,".yui3-seriesmarker");b.delegate("click",b.bind(this._markerEventDispatcher,this),y,".yui3-seriesmarker");b.delegate("mousemove",b.bind(this._positionTooltip,this),y,".yui3-seriesmarker");}else{if(C=="planar"){this._overlay.on("mousemove",b.bind(this._planarEventDispatcher,this));this.on("mouseout",this.hideTooltip);}}if(B){if(D&&A&&D==A){this.on(C+"Event:"+D,this.toggleTooltip);}else{if(A){this.on(C+"Event:"+A,B[C+"EventHandler"]);}if(D){if(b.Lang.isArray(D)){x=D.length;for(;z<x;++z){this.on(C+"Event:"+D[z],this.hideTooltip);}}this.on(C+"Event:"+D,this.hideTooltip);}}}},_markerEventDispatcher:function(D){var F=D.type,z=this.get("contentBox"),J=D.currentTarget,I=J.getAttribute("id").split("_"),A=I[1],B=this.getSeries(parseInt(A,10)),C=I[2],E=this.getSeriesItems(B,C),H=D.pageX-z.getX(),G=D.pageY-z.getY();if(F=="mouseenter"){F="mouseover";}else{if(F=="mouseleave"){F="mouseout";}}B.updateMarkerState(F,C);D.halt();this.fire("markerEvent:"+F,{categoryItem:E.category,valueItem:E.value,node:J,x:H,y:G,series:B,index:C,seriesIndex:A});},_dataProviderChangeHandler:function(B){var y=this.get("dataProvider"),A=this.get("axes"),x,z;for(x in A){if(A.hasOwnProperty(x)){z=A[x];if(z instanceof b.Axis){z.set("dataProvider",y);}}}},toggleTooltip:function(y){var x=this.get("tooltip");if(x.visible){this.hideTooltip();}else{x.markerEventHandler.apply(this,[y]);}},_showTooltip:function(C,z,D){var A=this.get("tooltip"),B=A.node;if(C){A.visible=true;B.set("innerHTML",C);B.setStyle("top",D+"px");B.setStyle("left",z+"px");B.removeClass("yui3-widget-hidden");}},_positionTooltip:function(D){var B=this.get("tooltip"),C=B.node,A=this.get("contentBox"),z=(D.pageX+10)-A.getX(),E=(D.pageY+10)-A.getY();if(C){C.setStyle("left",z+"px");C.setStyle("top",E+"px");}},hideTooltip:function(){var x=this.get("tooltip"),y=x.node;x.visible=false;y.set("innerHTML","");y.setStyle("left",-10000);y.setStyle("top",-10000);y.addClass("yui3-widget-hidden");},_addTooltip:function(){var x=this.get("tooltip");this.get("contentBox").appendChild(x.node);},_updateTooltip:function(B){var z=this._tooltip,x,A=B.styles,y={markerLabelFunction:"markerLabelFunction",planarLabelFunction:"planarLabelFunction",showEvent:"showEvent",hideEvent:"hideEvent",markerEventHandler:"markerEventHandler",planarEventHandler:"planarEventHandler"};if(A){for(x in A){if(A.hasOwnProperty(x)){z.node.setStyle(x,A[x]);}}}for(x in y){if(B.hasOwnProperty(x)){z[x]=B[x];}}return z;},_getTooltip:function(){var y=document.createElement("div"),x={markerLabelFunction:this._tooltipLabelFunction,planarLabelFunction:this._planarLabelFunction,show:true,hideEvent:"mouseout",showEvent:"mouseover",markerEventHandler:function(A){var z=this.get("tooltip"),B=z.markerLabelFunction.apply(this,[A.categoryItem,A.valueItem,A.index,A.series,A.seriesIndex]);this._showTooltip(B,A.x+10,A.y+10);},planarEventHandler:function(A){var z=this.get("tooltip"),C,B=this.get("categoryAxis");C=z.planarLabelFunction.apply(this,[B,A.valueItem,A.index,A.items,A.seriesIndex]);this._showTooltip(C,A.x+10,A.y+10);}};y.setAttribute("id",this.get("id")+"_tooltip");y=b.one(y);y.setStyle("fontSize","85%");y.setStyle("opacity","0.83");y.setStyle("position","absolute");y.setStyle("paddingTop","2px");y.setStyle("paddingRight","5px");y.setStyle("paddingBottom","4px");y.setStyle("paddingLeft","2px");y.setStyle("backgroundColor","#fff");y.setStyle("border","1px solid #dbdccc");y.setStyle("zIndex",3);y.setStyle("whiteSpace","noWrap");y.addClass("yui3-widget-hidden");x.node=b.one(y);this._tooltip=x;return x;},_planarLabelFunction:function(D,H,F,B,z){var x="",G,C=0,E=B.length,y,A;
if(D){x+=D.get("labelFunction").apply(this,[D.getKeyValueAt(this.get("categoryKey"),F),D.get("labelFormat")]);}for(;C<E;++C){A=B[C];if(A.get("visible")){G=H[C];y=G.axis;x+="<br/><span>"+G.displayName+": "+y.get("labelFunction").apply(this,[y.getKeyValueAt(G.key,F),y.get("labelFormat")])+"</span>";}}return x;},_tooltipLabelFunction:function(C,x,A,z,y){var B=C.displayName+":&nbsp;"+C.axis.get("labelFunction").apply(this,[C.value,C.axis.get("labelFormat")])+"<br/>"+x.displayName+":&nbsp;"+x.axis.get("labelFunction").apply(this,[x.value,x.axis.get("labelFormat")]);return B;},_tooltipChangeHandler:function(B){if(this.get("tooltip")){var z=this.get("tooltip"),A=z.node,y=z.show,x=this.get("contentBox");if(A&&y){if(!x.containes(A)){this._addTooltip();}}}}};b.ChartBase=n;b.CartesianChart=b.Base.create("cartesianChart",b.Widget,[b.ChartBase],{renderUI:function(){var y=this.get("tooltip"),x;this.get("boundingBox").setStyle("position","absolute");this.get("contentBox").setStyle("position","absolute");this._addAxes();this._addGridlines();this._addSeries();if(y&&y.show){this._addTooltip();}this.get("styles");if(this.get("interactionType")=="planar"){x=document.createElement("div");this.get("contentBox").appendChild(x);this._overlay=b.one(x);this._overlay.setStyle("position","absolute");this._overlay.setStyle("background","#fff");this._overlay.setStyle("opacity",0);this._overlay.addClass("yui3-overlay");this._overlay.setStyle("zIndex",4);}this._redraw();},_planarEventDispatcher:function(S){var A=this.get("graph"),E=this.get("boundingBox"),N=A.get("contentBox"),J=S.pageX,T=J-N.getX(),H=J-E.getX(),I=S.pageY,R=I-N.getY(),G=I-E.getY(),z=A.get("seriesCollection"),K,P=0,F,D=this._selectedIndex,U,M=[],B=[],L=[],V=this.get("direction"),W,O=V=="horizontal"?T:R,C=V=="horizontal"?z[0].get("xMarkerPlane"):z[0].get("yMarkerPlane"),Q=C.length;for(;P<Q;++P){if(O<=C[P].end&&O>=C[P].start){F=P;break;}}Q=z.length;for(P=0;P<Q;++P){K=z[P];W=K.get("markers");if(W&&!isNaN(D)&&D>-1){K.updateMarkerState("mouseout",D);}if(K.get("ycoords")[F]>-1){if(W&&!isNaN(F)&&F>-1){K.updateMarkerState("mouseover",F);}U=this.getSeriesItems(K,F);B.push(U.category);L.push(U.value);M.push(K);}}this._selectedIndex=F;if(F>-1){this.fire("planarEvent:mouseover",{categoryItem:B,valueItem:L,x:H,y:G,items:M,index:F});}else{this.fire("planarEvent:mouseout");}},_type:"combo",_axesRenderQueue:null,_addToAxesRenderQueue:function(x){if(!this._axesRenderQueue){this._axesRenderQueue=[];}if(b.Array.indexOf(this._axesRenderQueue,x)<0){this._axesRenderQueue.push(x);}},_getDefaultSeriesCollection:function(Q){var G=this.get("direction"),x=Q||[],N,K,I=[],D,C=this.get("seriesKeys").concat(),M,B,J,A=this.get("type"),O,F,P,y,z=this.get("categoryKey"),L=this.get("showMarkers"),H=this.get("showAreaFill"),E=this.get("showLines");if(G=="vertical"){N="yAxis";F="yKey";K="xAxis";P="xKey";}else{N="xAxis";F="xKey";K="yAxis";P="yKey";}J=x.length;for(M=0;M<J;++M){O=this._getBaseAttribute(x[M],P);if(O){B=b.Array.indexOf(C,O);if(B>-1){C.splice(B,1);}I.push(O);}}if(C.length>0){I=I.concat(C);}J=I.length;for(M=0;M<J;++M){D=x[M]||{type:A};if(D instanceof b.CartesianSeries){this._parseSeriesAxes(D);continue;}D[F]=D[F]||z;D[P]=D[P]||C.shift();D[N]=this._getCategoryAxis();D[K]=this._getSeriesAxis(D[P]);D.type=D.type||A;if((D.type=="combo"||D.type=="stackedcombo"||D.type=="combospline"||D.type=="stackedcombospline")){if(H!==null){D.showAreaFill=D.showAreaFill||H;}if(L!==null){D.showMarkers=D.showMarkers||L;}if(E!==null){D.showLines=D.showLines||E;}}x[M]=D;}if(Q){y=this.get("graph");y.set("seriesCollection",x);x=y.get("seriesCollection");}return x;},_parseSeriesAxes:function(y){var C=this.get("axes"),A=y.get("xAxis"),x=y.get("yAxis"),B=b.Axis,z;if(A&&!(A instanceof B)&&b.Lang.isString(A)&&C.hasOwnProperty(A)){z=C[A];if(z instanceof B){y.set("xAxis",z);}}if(x&&!(x instanceof B)&&b.Lang.isString(x)&&C.hasOwnProperty(x)){z=C[x];if(z instanceof B){y.set("yAxis",z);}}},_getCategoryAxis:function(){var x,y=this.get("axes"),z=this.get("categoryAxisName")||this.get("categoryKey");x=y[z];return x;},_getSeriesAxis:function(y,C){var B=this.get("axes"),x,A,z;if(B){if(C&&B.hasOwnProperty(C)){z=B[C];}else{for(x in B){if(B.hasOwnProperty(x)){A=B[x].get("keys");if(A&&A.hasOwnProperty(y)){z=B[x];break;}}}}}return z;},_getBaseAttribute:function(y,x){if(y instanceof b.Base){return y.get(x);}if(y.hasOwnProperty(x)){return y[x];}return null;},_setBaseAttribute:function(y,x,z){if(y instanceof b.Base){y.set(x,z);}else{y[x]=z;}},_parseAxes:function(y){var C=this._getDefaultAxes(y),F={},A={edgeOffset:"edgeOffset",position:"position",overlapGraph:"overlapGraph",labelFunction:"labelFunction",labelFunctionScope:"labelFunctionScope",labelFormat:"labelFormat",maximum:"maximum",minimum:"minimum",roundingMethod:"roundingMethod",alwaysShowZero:"alwaysShowZero"},B=this.get("dataProvider"),I,D,J,z,H,G,x,E;for(D in C){if(C.hasOwnProperty(D)){H=C[D];if(H instanceof b.Axis){z=H;}else{G=this._getAxisClass(H.type);x={};x.dataProvider=H.dataProvider||B;x.keys=H.keys;if(H.hasOwnProperty("roundingUnit")){x.roundingUnit=H.roundingUnit;}J=H.position;if(H.styles){x.styles=H.styles;}x.position=H.position;for(I in A){if(A.hasOwnProperty(I)&&H.hasOwnProperty(I)){x[I]=H[I];}}z=new G(x);}if(z){E=this.get(J+"AxesCollection");if(E&&b.Array.indexOf(E,z)>0){z.set("overlapGraph",false);}z.after("axisRendered",b.bind(this._axisRendered,this));F[D]=z;}}}return F;},_addAxes:function(){var C=this.get("axes"),y,A,D,x=this.get("width"),z=this.get("height"),B=b.Node.one(this._parentNode);if(!this._axesCollection){this._axesCollection=[];}for(y in C){if(C.hasOwnProperty(y)){A=C[y];if(A instanceof b.Axis){if(!x){this.set("width",B.get("offsetWidth"));x=this.get("width");}if(!z){this.set("height",B.get("offsetHeight"));z=this.get("height");}A.set("width",x);A.set("height",z);this._addToAxesRenderQueue(A);D=A.get("position");if(!this.get(D+"AxesCollection")){this.set(D+"AxesCollection",[A]);}else{this.get(D+"AxesCollection").push(A);}this._axesCollection.push(A);
if(A.get("keys").hasOwnProperty(this.get("categoryKey"))){this.set("categoryAxis",A);}A.render(this.get("contentBox"));}}}},_addSeries:function(){var x=this.get("graph"),y=this.get("seriesCollection");x.render(this.get("contentBox"));},_addGridlines:function(){var H=this.get("graph"),y=this.get("horizontalGridlines"),z=this.get("verticalGridlines"),G=this.get("direction"),I=this.get("leftAxesCollection"),C=this.get("rightAxesCollection"),E=this.get("bottomAxesCollection"),A=this.get("topAxesCollection"),B,x=this.get("categoryAxis"),F,D;if(this._axesCollection){B=this._axesCollection.concat();B.splice(b.Array.indexOf(B,x),1);}if(y){if(I&&I[0]){F=I[0];}else{if(C&&C[0]){F=C[0];}else{F=G=="horizontal"?x:B[0];}}if(!this._getBaseAttribute(y,"axis")&&F){this._setBaseAttribute(y,"axis",F);}if(this._getBaseAttribute(y,"axis")){H.set("horizontalGridlines",y);}}if(z){if(E&&E[0]){D=E[0];}else{if(A&&A[0]){D=A[0];}else{D=G=="vertical"?x:B[0];}}if(!this._getBaseAttribute(z,"axis")&&D){this._setBaseAttribute(z,"axis",D);}if(this._getBaseAttribute(z,"axis")){H.set("verticalGridlines",z);}}},_getDefaultAxes:function(P){var H=this.get("categoryKey"),y,N,J,A={},L=[],z=this.get("categoryAxisName")||this.get("categoryKey"),x=this.get("valueAxisName"),B=this.get("seriesKeys")||[],Q,O,G,E,K,I,M=this.get("dataProvider"),R=this.get("direction"),F,C,D=[],S=this.get("stacked")?"stacked":"numeric";I=M[0];if(R=="vertical"){F="bottom";C="left";}else{F="left";C="bottom";}if(P){for(Q in P){if(P.hasOwnProperty(Q)){y=P[Q];J=this._getBaseAttribute(y,"keys");N=this._getBaseAttribute(y,"type");if(N=="time"||N=="category"){z=Q;this.set("categoryAxisName",Q);if(b.Lang.isArray(J)&&J.length>0){H=J[0];this.set("categoryKey",H);}A[Q]=y;}else{if(Q==z){A[Q]=y;}else{A[Q]=y;if(Q!=x&&J&&b.Lang.isArray(J)){E=J.length;for(G=0;G<E;++G){L.push(J[G]);}D.push(A[Q]);}if(!(this._getBaseAttribute(A[Q],"type"))){this._setBaseAttribute(A[Q],"type",S);}if(!(this._getBaseAttribute(A[Q],"position"))){this._setBaseAttribute(A[Q],"position",this._getDefaultAxisPosition(A[Q],D,F));}}}}}}if(B.length<1){for(Q in I){if(I.hasOwnProperty(Q)&&Q!=H&&b.Array.indexOf(L,Q)==-1){B.push(Q);}}}K=b.Array.indexOf(B,H);if(K>-1){B.splice(K,1);}O=L.length;for(Q=0;Q<O;++Q){K=b.Array.indexOf(B,L[Q]);if(K>-1){B.splice(K,1);}}if(!A.hasOwnProperty(z)){A[z]={};}if(!(this._getBaseAttribute(A[z],"keys"))){this._setBaseAttribute(A[z],"keys",[H]);}if(!(this._getBaseAttribute(A[z],"position"))){this._setBaseAttribute(A[z],"position",C);}if(!(this._getBaseAttribute(A[z],"type"))){this._setBaseAttribute(A[z],"type",this.get("categoryType"));}if(!A.hasOwnProperty(x)&&B&&B.length>0){A[x]={keys:B};D.push(A[x]);}if(L.length>0){if(B.length>0){B=L.concat(B);}else{B=L;}}if(A.hasOwnProperty(x)){if(!(this._getBaseAttribute(A[x],"position"))){this._setBaseAttribute(A[x],"position",this._getDefaultAxisPosition(A[x],D,F));}if(!(this._getBaseAttribute(A[x],"type"))){this._setBaseAttribute(A[x],"type",S);}if(!(this._getBaseAttribute(A[x],"keys"))){this._setBaseAttribute(A[x],"keys",B);}}this.set("seriesKeys",B);return A;},_getDefaultAxisPosition:function(A,y,x){var B=this.get("direction"),z=b.Array.indexOf(y,A);if(y[z-1]&&y[z-1].position){if(B=="horizontal"){if(y[z-1].position=="left"){x="right";}else{if(y[z-1].position=="right"){x="left";}}}else{if(y[z-1].position=="bottom"){x="top";}else{x="bottom";}}}return x;},getSeriesItems:function(C,B){var D=C.get("xAxis"),z=C.get("yAxis"),A=C.get("xKey"),y=C.get("yKey"),E,x;if(this.get("direction")=="vertical"){E={axis:z,key:y,value:z.getKeyValueAt(y,B)};x={axis:D,key:A,value:D.getKeyValueAt(A,B)};}else{x={axis:z,key:y,value:z.getKeyValueAt(y,B)};E={axis:D,key:A,value:D.getKeyValueAt(A,B)};}E.displayName=C.get("categoryDisplayName");x.displayName=C.get("valueDisplayName");E.value=E.axis.getKeyValueAt(E.key,B);x.value=x.axis.getKeyValueAt(x.key,B);return{category:E,value:x};},_axisRendered:function(x){this._axesRenderQueue=this._axesRenderQueue.splice(1+b.Array.indexOf(this._axesRenderQueue,x.currentTarget),1);if(this._axesRenderQueue.length<1){this._redraw();}},_sizeChanged:function(A){if(this._axesCollection){var z=this._axesCollection,y=0,x=z.length;for(;y<x;++y){this._addToAxesRenderQueue(z[y]);}this._redraw();}},_redraw:function(){if(this._drawing){this._callLater=true;return;}this._drawing=true;this._callLater=false;var L=this.get("width"),I=this.get("height"),D=0,A=0,y=0,G=0,z=this.get("leftAxesCollection"),x=this.get("rightAxesCollection"),F=this.get("topAxesCollection"),J=this.get("bottomAxesCollection"),H=0,E,C,K,N=[],B="visible",M=this.get("graph");if(z){E=z.length;for(H=E-1;H>-1;--H){N[b.Array.indexOf(this._axesCollection,z[H])]={x:D+"px"};D+=z[H].get("width");}}if(x){E=x.length;H=0;for(H=E-1;H>-1;--H){A+=x[H].get("width");N[b.Array.indexOf(this._axesCollection,x[H])]={x:(L-A)+"px"};}}if(F){E=F.length;for(H=E-1;H>-1;--H){N[b.Array.indexOf(this._axesCollection,F[H])]={y:y+"px"};y+=F[H].get("height");}}if(J){E=J.length;for(H=E-1;H>-1;--H){G+=J[H].get("height");N[b.Array.indexOf(this._axesCollection,J[H])]={y:(I-G)+"px"};}}E=this._axesCollection.length;H=0;for(;H<E;++H){C=this._axesCollection[H];K=C.get("position");if(K=="left"||K==="right"){C.get("boundingBox").setStyle("top",y+"px");C.get("boundingBox").setStyle("left",N[H].x);if(C.get("height")!==I-(G+y)){C.set("height",I-(G+y));}}else{if(K=="bottom"||K=="top"){if(C.get("width")!==L-(D+A)){C.set("width",L-(D+A));}C.get("boundingBox").setStyle("left",D+"px");C.get("boundingBox").setStyle("top",N[H].y);}}if(C.get("setMax")||C.get("setMin")){B="hidden";}}this._drawing=false;if(this._callLater){this._redraw();return;}if(M){M.get("boundingBox").setStyle("left",D+"px");M.get("boundingBox").setStyle("top",y+"px");M.set("width",L-(D+A));M.set("height",I-(y+G));M.get("boundingBox").setStyle("overflow",B);}if(this._overlay){this._overlay.setStyle("left",D+"px");this._overlay.setStyle("top",y+"px");this._overlay.setStyle("width",(L-(D+A))+"px");this._overlay.setStyle("height",(I-(y+G))+"px");}}},{ATTRS:{axesStyles:{getter:function(){var z=this.get("axes"),x,y=this._axesStyles;
-if(z){for(x in z){if(z.hasOwnProperty(x)&&z[x] instanceof b.Axis){if(!y){y={};}y[x]=z[x].get("styles");}}}return y;},setter:function(z){var y=this.get("axes"),x;for(x in z){if(z.hasOwnProperty(x)&&y.hasOwnProperty(x)){this._setBaseAttribute(y[x],"styles",z[x]);}}}},seriesStyles:{getter:function(){var y=this._seriesStyles,z=this.get("graph"),A,x;if(z){A=z.get("seriesDictionary");if(A){y={};for(x in A){if(A.hasOwnProperty(x)){y[x]=A[x].get("styles");}}}}return y;},setter:function(A){var y,x,z;if(b.Lang.isArray(A)){z=this.get("seriesCollection");y=0;x=A.length;for(;y<x;++y){this._setBaseAttribute(z[y],"styles",A[y]);}}else{for(y in A){if(A.hasOwnProperty(y)){z=this.getSeries(y);this._setBaseAttribute(z,"styles",A[y]);}}}}},graphStyles:{getter:function(){var x=this.get("graph");if(x){return(x.get("styles"));}return this._graphStyles;},setter:function(y){var x=this.get("graph");this._setBaseAttribute(x,"styles",y);}},styles:{getter:function(){var x={axes:this.get("axesStyles"),series:this.get("seriesStyles"),graph:this.get("graphStyles")};return x;},setter:function(x){if(x.hasOwnProperty("axes")){if(this.get("axesStyles")){this.set("axesStyles",x.axes);}else{this._axesStyles=x.axes;}}if(x.hasOwnProperty("series")){if(this.get("seriesStyles")){this.set("seriesStyles",x.series);}else{this._seriesStyles=x.series;}}if(x.hasOwnProperty("graph")){this.set("graphStyles",x.graph);}}},axes:{valueFn:"_parseAxes",setter:function(x){return this._parseAxes(x);}},seriesCollection:{valueFn:"_getDefaultSeriesCollection",setter:function(x){return this._getDefaultSeriesCollection(x);}},leftAxesCollection:{},bottomAxesCollection:{},rightAxesCollection:{},topAxesCollection:{},stacked:{value:false},direction:{getter:function(){var x=this.get("type");if(x=="bar"){return"vertical";}else{if(x=="column"){return"horizontal";}}return this._direction;},setter:function(x){this._direction=x;return this._direction;}},showAreaFill:{},showMarkers:{},showLines:{},categoryAxisName:{},valueAxisName:{value:"values"},horizontalGridlines:{getter:function(){var x=this.get("graph");if(x){return x.get("horizontalGridlines");}return this._horizontalGridlines;},setter:function(y){var x=this.get("graph");if(y&&!b.Lang.isObject(y)){y={};}if(x){x.set("horizontalGridlines",y);}else{this._horizontalGridlines=y;}}},verticalGridlines:{getter:function(){var x=this.get("graph");if(x){return x.get("verticalGridlines");}return this._verticalGridlines;},setter:function(y){var x=this.get("graph");if(y&&!b.Lang.isObject(y)){y={};}if(x){x.set("verticalGridlines",y);}else{this._verticalGridlines=y;}}},type:{getter:function(){if(this.get("stacked")){return"stacked"+this._type;}return this._type;},setter:function(x){if(this._type=="bar"){if(x!="bar"){this.set("direction","horizontal");}}else{if(x=="bar"){this.set("direction","vertical");}}this._type=x;return this._type;}},categoryAxis:{}}});b.PieChart=b.Base.create("pieChart",b.Widget,[b.ChartBase],{_getSeriesCollection:function(){if(this._seriesCollection){return this._seriesCollection;}var C=this.get("axes"),E=[],D,A=0,z,F=this.get("type"),H,x="categoryAxis",B="categoryKey",y="valueAxis",G="valueKey";if(C){D=C.values.get("dataSet").get("keyCollection");H=C.category.get("dataSet").get("keyCollection")[0];z=D.length;for(;A<z;++A){E[A]={type:F};E[A][x]="category";E[A][y]="values";E[A][B]=H;E[A][G]=D[A];}}this._seriesCollection=E;return E;},_parseAxes:function(A){if(!this._axes){this._axes={};}var B,G,z,E,x,D,F=this.get("type"),H=this.get("width"),C=this.get("height"),y=b.Node.one(this._parentNode);if(!H){this.set("width",y.get("offsetWidth"));H=this.get("width");}if(!C){this.set("height",y.get("offsetHeight"));C=this.get("height");}for(B in A){if(A.hasOwnProperty(B)){E=A[B];G=F=="pie"?"none":E.position;D=this._getAxisClass(E.type);x={dataProvider:this.get("dataProvider")};if(E.hasOwnProperty("roundingUnit")){x.roundingUnit=E.roundingUnit;}x.keys=E.keys;x.width=H;x.height=C;x.position=G;x.styles=E.styles;z=new D(x);z.on("axisRendered",b.bind(this._axisRendered,this));this._axes[B]=z;}}},_addAxes:function(){var A=this.get("axes"),x,y,z;if(!A){this.set("axes",this._getDefaultAxes());A=this.get("axes");}if(!this._axesCollection){this._axesCollection=[];}for(x in A){if(A.hasOwnProperty(x)){y=A[x];z=y.get("position");if(!this.get(z+"AxesCollection")){this.set(z+"AxesCollection",[y]);}else{this.get(z+"AxesCollection").push(y);}this._axesCollection.push(y);}}},_addSeries:function(){var x=this.get("graph"),y=this.get("seriesCollection");this._parseSeriesAxes(y);x.set("showBackground",false);x.set("width",this.get("width"));x.set("height",this.get("height"));x.set("seriesCollection",y);this._seriesCollection=x.get("seriesCollection");x.render(this.get("contentBox"));},_parseSeriesAxes:function(C){var y=0,x=C.length,A,B=this.get("axes"),z;for(;y<x;++y){A=C[y];if(A){if(A instanceof b.PieSeries){z=A.get("categoryAxis");if(z&&!(z instanceof b.Axis)){A.set("categoryAxis",B[z]);}z=A.get("valueAxis");if(z&&!(z instanceof b.Axis)){A.set("valueAxis",B[z]);}continue;}A.categoryAxis=B.category;A.valueAxis=B.values;if(!A.type){A.type=this.get("type");}}}},_getDefaultAxes:function(){var B=this.get("categoryKey"),y=this.get("seriesKeys")||[],x="numeric",A,z=this.get("dataProvider")[0];if(y.length<1){for(A in z){if(A!=B){y.push(A);}}if(y.length>0){this.set("seriesKeys",y);}}return{values:{keys:y,type:x},category:{keys:[B],type:this.get("categoryType")}};},getSeriesItems:function(z,y){var A={axis:z.get("categoryAxis"),key:z.get("categoryKey"),displayName:z.get("categoryDisplayName")},x={axis:z.get("valueAxis"),key:z.get("valueKey"),displayName:z.get("valueDisplayName")};A.value=A.axis.getKeyValueAt(A.key,y);x.value=x.axis.getKeyValueAt(x.key,y);return{category:A,value:x};},_sizeChanged:function(x){this._redraw();},_redraw:function(){var x=this.get("graph");if(x){x.set("width",this.get("width"));x.set("height",this.get("height"));}}},{ATTRS:{axes:{getter:function(){return this._axes;},setter:function(x){this._parseAxes(x);}},seriesCollection:{getter:function(){return this._getSeriesCollection();
+if(z){for(x in z){if(z.hasOwnProperty(x)&&z[x] instanceof b.Axis){if(!y){y={};}y[x]=z[x].get("styles");}}}return y;},setter:function(z){var y=this.get("axes"),x;for(x in z){if(z.hasOwnProperty(x)&&y.hasOwnProperty(x)){this._setBaseAttribute(y[x],"styles",z[x]);}}}},seriesStyles:{getter:function(){var y=this._seriesStyles,z=this.get("graph"),A,x;if(z){A=z.get("seriesDictionary");if(A){y={};for(x in A){if(A.hasOwnProperty(x)){y[x]=A[x].get("styles");}}}}return y;},setter:function(A){var y,x,z;if(b.Lang.isArray(A)){z=this.get("seriesCollection");y=0;x=A.length;for(;y<x;++y){this._setBaseAttribute(z[y],"styles",A[y]);}}else{for(y in A){if(A.hasOwnProperty(y)){z=this.getSeries(y);this._setBaseAttribute(z,"styles",A[y]);}}}}},graphStyles:{getter:function(){var x=this.get("graph");if(x){return(x.get("styles"));}return this._graphStyles;},setter:function(y){var x=this.get("graph");this._setBaseAttribute(x,"styles",y);}},styles:{getter:function(){var x={axes:this.get("axesStyles"),series:this.get("seriesStyles"),graph:this.get("graphStyles")};return x;},setter:function(x){if(x.hasOwnProperty("axes")){if(this.get("axesStyles")){this.set("axesStyles",x.axes);}else{this._axesStyles=x.axes;}}if(x.hasOwnProperty("series")){if(this.get("seriesStyles")){this.set("seriesStyles",x.series);}else{this._seriesStyles=x.series;}}if(x.hasOwnProperty("graph")){this.set("graphStyles",x.graph);}}},axes:{valueFn:"_parseAxes",setter:function(x){return this._parseAxes(x);}},seriesCollection:{valueFn:"_getDefaultSeriesCollection",setter:function(x){return this._getDefaultSeriesCollection(x);}},leftAxesCollection:{},bottomAxesCollection:{},rightAxesCollection:{},topAxesCollection:{},stacked:{value:false},direction:{getter:function(){var x=this.get("type");if(x=="bar"){return"vertical";}else{if(x=="column"){return"horizontal";}}return this._direction;},setter:function(x){this._direction=x;return this._direction;}},showAreaFill:{},showMarkers:{},showLines:{},categoryAxisName:{},valueAxisName:{value:"values"},horizontalGridlines:{getter:function(){var x=this.get("graph");if(x){return x.get("horizontalGridlines");}return this._horizontalGridlines;},setter:function(y){var x=this.get("graph");if(y&&!b.Lang.isObject(y)){y={};}if(x){x.set("horizontalGridlines",y);}else{this._horizontalGridlines=y;}}},verticalGridlines:{getter:function(){var x=this.get("graph");if(x){return x.get("verticalGridlines");}return this._verticalGridlines;},setter:function(y){var x=this.get("graph");if(y&&!b.Lang.isObject(y)){y={};}if(x){x.set("verticalGridlines",y);}else{this._verticalGridlines=y;}}},type:{getter:function(){if(this.get("stacked")){return"stacked"+this._type;}return this._type;},setter:function(x){if(this._type=="bar"){if(x!="bar"){this.set("direction","horizontal");}}else{if(x=="bar"){this.set("direction","vertical");}}this._type=x;return this._type;}},categoryAxis:{}}});b.PieChart=b.Base.create("pieChart",b.Widget,[b.ChartBase],{_getSeriesCollection:function(){if(this._seriesCollection){return this._seriesCollection;}var C=this.get("axes"),E=[],D,A=0,z,F=this.get("type"),H,x="categoryAxis",B="categoryKey",y="valueAxis",G="valueKey";if(C){D=C.values.get("keyCollection");H=C.category.get("keyCollection")[0];z=D.length;for(;A<z;++A){E[A]={type:F};E[A][x]="category";E[A][y]="values";E[A][B]=H;E[A][G]=D[A];}}this._seriesCollection=E;return E;},_parseAxes:function(A){if(!this._axes){this._axes={};}var B,G,z,E,x,D,F=this.get("type"),H=this.get("width"),C=this.get("height"),y=b.Node.one(this._parentNode);if(!H){this.set("width",y.get("offsetWidth"));H=this.get("width");}if(!C){this.set("height",y.get("offsetHeight"));C=this.get("height");}for(B in A){if(A.hasOwnProperty(B)){E=A[B];G=F=="pie"?"none":E.position;D=this._getAxisClass(E.type);x={dataProvider:this.get("dataProvider")};if(E.hasOwnProperty("roundingUnit")){x.roundingUnit=E.roundingUnit;}x.keys=E.keys;x.width=H;x.height=C;x.position=G;x.styles=E.styles;z=new D(x);z.on("axisRendered",b.bind(this._axisRendered,this));this._axes[B]=z;}}},_addAxes:function(){var A=this.get("axes"),x,y,z;if(!A){this.set("axes",this._getDefaultAxes());A=this.get("axes");}if(!this._axesCollection){this._axesCollection=[];}for(x in A){if(A.hasOwnProperty(x)){y=A[x];z=y.get("position");if(!this.get(z+"AxesCollection")){this.set(z+"AxesCollection",[y]);}else{this.get(z+"AxesCollection").push(y);}this._axesCollection.push(y);}}},_addSeries:function(){var x=this.get("graph"),y=this.get("seriesCollection");this._parseSeriesAxes(y);x.set("showBackground",false);x.set("width",this.get("width"));x.set("height",this.get("height"));x.set("seriesCollection",y);this._seriesCollection=x.get("seriesCollection");x.render(this.get("contentBox"));},_parseSeriesAxes:function(C){var y=0,x=C.length,A,B=this.get("axes"),z;for(;y<x;++y){A=C[y];if(A){if(A instanceof b.PieSeries){z=A.get("categoryAxis");if(z&&!(z instanceof b.Axis)){A.set("categoryAxis",B[z]);}z=A.get("valueAxis");if(z&&!(z instanceof b.Axis)){A.set("valueAxis",B[z]);}continue;}A.categoryAxis=B.category;A.valueAxis=B.values;if(!A.type){A.type=this.get("type");}}}},_getDefaultAxes:function(){var B=this.get("categoryKey"),y=this.get("seriesKeys")||[],x="numeric",A,z=this.get("dataProvider")[0];if(y.length<1){for(A in z){if(A!=B){y.push(A);}}if(y.length>0){this.set("seriesKeys",y);}}return{values:{keys:y,type:x},category:{keys:[B],type:this.get("categoryType")}};},getSeriesItems:function(z,y){var A={axis:z.get("categoryAxis"),key:z.get("categoryKey"),displayName:z.get("categoryDisplayName")},x={axis:z.get("valueAxis"),key:z.get("valueKey"),displayName:z.get("valueDisplayName")};A.value=A.axis.getKeyValueAt(A.key,y);x.value=x.axis.getKeyValueAt(x.key,y);return{category:A,value:x};},_sizeChanged:function(x){this._redraw();},_redraw:function(){var x=this.get("graph");if(x){x.set("width",this.get("width"));x.set("height",this.get("height"));}}},{ATTRS:{axes:{getter:function(){return this._axes;},setter:function(x){this._parseAxes(x);}},seriesCollection:{getter:function(){return this._getSeriesCollection();
},setter:function(x){return this._setSeriesCollection(x);}},type:{value:"pie"}}});function r(x){if(x.type!="pie"){return new b.CartesianChart(x);}else{return new b.PieChart(x);}}b.Chart=r;},"@VERSION@",{requires:["dom","datatype","event-custom","event-mouseenter","widget","widget-position","widget-stack"]});
View
69 build/charts/charts.js
@@ -28,6 +28,9 @@ Graphic.prototype = {
autoSize: true,
/**
+ * Initializes the class.
+ *
+ * @method initializer
* @private
*/
initializer: function(config) {
@@ -135,6 +138,10 @@ Graphic.prototype = {
},
/**
+ * Removes all child nodes.
+ *
+ * @method _removeChildren
+ * @param node
* @private
*/
_removeChildren: function(node)
@@ -163,6 +170,11 @@ Graphic.prototype = {
},
/**
+ * Toggles visibility
+ *
+ * @method _toggleVisible
+ * @param node
+ * @param val
* @private
*/
_toggleVisible: function(node, val)
@@ -382,9 +394,9 @@ Graphic.prototype = {
},
/**
- * @private
- * Not implemented
* Specifies a gradient to use for the stroke when drawing lines.
+ * Not implemented
+ * @private
*/
lineGradientStyle: function() {
},
@@ -447,8 +459,11 @@ Graphic.prototype = {
},
/**
+ * Generates a path string for a wedge shape
+ *
+ * @method _getWedgePath
+ * @param {Object} config
* @private
- * @description Generates a path string for a wedge shape
*/
_getWedgePath: function(config)
{
@@ -535,8 +550,12 @@ Graphic.prototype = {
},
/**
- * @private
* Updates the size of the graphics object
+ *
+ * @method _trackSize
+ * @param {Number} w width
+ * @param {Number} h height
+ * @private
*/
_trackSize: function(w, h) {
if (w > this._width) {
@@ -578,8 +597,10 @@ Graphic.prototype = {
},
/**
- * @private
* Clears the properties
+ *
+ * @method _initProps
+ * @private
*/
_initProps: function() {
this._shape = null;
@@ -609,8 +630,10 @@ Graphic.prototype = {
},
/**
- * @private
* Clears path properties
+ *
+ * @method _clearPath
+ * @private
*/
_clearPath: function()
{
@@ -626,8 +649,10 @@ Graphic.prototype = {
},
/**
+ * Completes a shape
+ *
+ * @method _draw
* @private
- * Completes a vml shape
*/
_draw: function()
{
@@ -683,8 +708,10 @@ Graphic.prototype = {
},
/**
- * @private
* Returns ths actual fill object to be used in a drawing or shape
+ *
+ * @method _getFill
+ * @private
*/
_getFill: function() {
var type = this._fillType,
@@ -705,8 +732,11 @@ Graphic.prototype = {
},
/**
- * @private
* Returns a linear gradient fill
+ *
+ * @method _getLinearGradient
+ * @param {String} type gradient type
+ * @private
*/
_getLinearGradient: function(type) {
var fill = this._createGraphicNode("linearGradient"),
@@ -804,8 +834,10 @@ Graphic.prototype = {
},
/**
- * @private
* Creates a group element
+ *
+ * @method _createGraphics
+ * @private
*/
_createGraphics: function() {
var group = this._createGraphicNode("svg");
@@ -814,6 +846,9 @@ Graphic.prototype = {
},
/**
+ * Styles a group element
+ *
+ * @method _styleGroup
* @private
*/
_styleGroup: function(group)
@@ -826,6 +861,11 @@ Graphic.prototype = {
},
/**
+ * Creates a graphic node
+ *
+ * @method _createGraphicNode
+ * @param {String} type node type to create
+ * @param {String} pe specified pointer-events value
* @private
*/
_createGraphicNode: function(type, pe)
@@ -862,7 +902,10 @@ Graphic.prototype = {
Y.Graphic = Graphic;
/**
- * @private
+ * VMLGraphics is a fallback drawing api used for basic drawing operations when SVG is not available.
+ *
+ * @class VMLGraphics
+ * @constructor
*/
var VMLGraphics = function(config) {
@@ -12957,8 +13000,8 @@ Y.PieChart = Y.Base.create("pieChart", Y.Widget, [Y.ChartBase], {
seriesKey = "valueKey";
if(axes)
{
- seriesKeys = axes.values.get("dataSet").get("keyCollection");
- key = axes.category.get("dataSet").get("keyCollection")[0];
+ seriesKeys = axes.values.get("keyCollection");
+ key = axes.category.get("keyCollection")[0];
l = seriesKeys.length;
for(; i < l; ++i)
{
View
4 src/charts/js/PieChart.js
@@ -28,8 +28,8 @@ Y.PieChart = Y.Base.create("pieChart", Y.Widget, [Y.ChartBase], {
seriesKey = "valueKey";
if(axes)
{
- seriesKeys = axes.values.get("dataSet").get("keyCollection");
- key = axes.category.get("dataSet").get("keyCollection")[0];
+ seriesKeys = axes.values.get("keyCollection");
+ key = axes.category.get("keyCollection")[0];
l = seriesKeys.length;
for(; i < l; ++i)
{
View
60 src/charts/js/graphics-svg.js
@@ -26,6 +26,9 @@ Graphic.prototype = {
autoSize: true,
/**
+ * Initializes the class.
+ *
+ * @method initializer
* @private
*/
initializer: function(config) {
@@ -133,6 +136,10 @@ Graphic.prototype = {
},
/**
+ * Removes all child nodes.
+ *
+ * @method _removeChildren
+ * @param node
* @private
*/
_removeChildren: function(node)
@@ -161,6 +168,11 @@ Graphic.prototype = {
},
/**
+ * Toggles visibility
+ *
+ * @method _toggleVisible
+ * @param node
+ * @param val
* @private
*/
_toggleVisible: function(node, val)
@@ -380,9 +392,9 @@ Graphic.prototype = {
},
/**
- * @private
- * Not implemented
* Specifies a gradient to use for the stroke when drawing lines.
+ * Not implemented
+ * @private
*/
lineGradientStyle: function() {
Y.log('lineGradientStyle not implemented', 'warn', 'graphics-canvas');
@@ -446,8 +458,11 @@ Graphic.prototype = {
},
/**
+ * Generates a path string for a wedge shape
+ *
+ * @method _getWedgePath
+ * @param {Object} config
* @private
- * @description Generates a path string for a wedge shape
*/
_getWedgePath: function(config)
{
@@ -534,8 +549,12 @@ Graphic.prototype = {
},
/**
- * @private
* Updates the size of the graphics object
+ *
+ * @method _trackSize
+ * @param {Number} w width
+ * @param {Number} h height
+ * @private
*/
_trackSize: function(w, h) {
if (w > this._width) {
@@ -577,8 +596,10 @@ Graphic.prototype = {
},
/**
- * @private
* Clears the properties
+ *
+ * @method _initProps
+ * @private
*/
_initProps: function() {
this._shape = null;
@@ -608,8 +629,10 @@ Graphic.prototype = {
},
/**
- * @private
* Clears path properties
+ *
+ * @method _clearPath
+ * @private
*/
_clearPath: function()
{
@@ -625,8 +648,10 @@ Graphic.prototype = {
},
/**
+ * Completes a shape
+ *
+ * @method _draw
* @private
- * Completes a vml shape
*/
_draw: function()
{
@@ -682,8 +707,10 @@ Graphic.prototype = {
},
/**
- * @private
* Returns ths actual fill object to be used in a drawing or shape
+ *
+ * @method _getFill
+ * @private
*/
_getFill: function() {
var type = this._fillType,
@@ -704,8 +731,11 @@ Graphic.prototype = {
},
/**
- * @private
* Returns a linear gradient fill
+ *
+ * @method _getLinearGradient
+ * @param {String} type gradient type
+ * @private
*/
_getLinearGradient: function(type) {
var fill = this._createGraphicNode("linearGradient"),
@@ -803,8 +833,10 @@ Graphic.prototype = {
},
/**
- * @private
* Creates a group element
+ *
+ * @method _createGraphics
+ * @private
*/
_createGraphics: function() {
var group = this._createGraphicNode("svg");
@@ -813,6 +845,9 @@ Graphic.prototype = {
},
/**
+ * Styles a group element
+ *
+ * @method _styleGroup
* @private
*/
_styleGroup: function(group)
@@ -825,6 +860,11 @@ Graphic.prototype = {
},
/**
+ * Creates a graphic node
+ *
+ * @method _createGraphicNode
+ * @param {String} type node type to create
+ * @param {String} pe specified pointer-events value
* @private
*/
_createGraphicNode: function(type, pe)
View
5 src/charts/js/graphics-vml.js
@@ -1,5 +1,8 @@
/**
- * @private
+ * VMLGraphics is a fallback drawing api used for basic drawing operations when SVG is not available.
+ *
+ * @class VMLGraphics
+ * @constructor
*/
var VMLGraphics = function(config) {
Please sign in to comment.
Something went wrong with that request. Please try again.