?? chartingbase.js
字號:
else return this._defaultColors[i];};_p._defaultMarkers=["diamond","square","triangle","circle"];_p.getDefaultMarker=function(sSeriesId,sCategoryId){var i=this._getDefaulSettingIndex(sSeriesId,sCategoryId);i=i%this._defaultMarkers.length;return this._defaultMarkers[i];};_p._getDefaulSettingIndex=function(sSeriesId,sCategoryId){if(this._graph.getChartType()=="pie"&&sCategoryId!=null)
return this._graph.getCategoryById(sCategoryId).getIndex();return this._graph.getSeriesById(sSeriesId).getIndex();};_p.getFillOpacityForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasFillOpacity())
return p.getFillOpacity();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasFillOpacity())
return cp.getFillOpacity();return 1;};_p.getFillColorForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasFillColor())
return p.getFillColor();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasFillColor())
return cp.getFillColor();return this.getDefaultColor(sSeriesId,sCategoryId);};_p.getFillColor2ForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasFillColor2())
return p.getFillColor2();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasFillColor2())
return cp.getFillColor2();return null;};_p.getFillTypeForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasFillType())
return p.getFillType();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasFillType())
return cp.getFillType();return null;};_p.getFillAngleForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasFillAngle())
return p.getFillAngle();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasFillAngle())
return cp.getFillAngle();return null;};_p.getStrokeOpacityForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasStrokeOpacity())
return p.getStrokeOpacity();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasStrokeOpacity())
return cp.getStrokeOpacity();if(g.getChartType()=="line")
return this.getFillOpacityForPoint(sSeriesId,sCategoryId);return 1;};_p.getStrokeColorForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasStrokeColor())
return p.getStrokeColor();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasStrokeColor())
return cp.getStrokeColor();if(g.getChartType()=="line")
return this.getFillColorForPoint(sSeriesId,sCategoryId);return"#000";};_p.getMarkerTypeForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasMarkerType())
return p.getMarkerType();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasMarkerType())
return cp.getMarkerType();return this.getDefaultMarker(sSeriesId,sCategoryId);};_p.getMarkerVisibleForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasMarkerVisible())
return p.getMarkerVisible();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasMarkerVisible())
return cp.getMarkerVisible();return true;};_p.getExplodeForPoint=function(sSeriesId,sCategoryId){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(p&&p.hasExplode())
return p.getExplode();var cp=g.getChartPresentation(sSeriesId);if(cp&&cp.hasExplode())
return cp.getExplode();return 0.05;};_p.getBarSpacingForPoint=function(sSeriesId,sCategoryId)
{if(this._barSpacing!=null)
return this._barSpacing;return 1;};_p.getStrokeOpacity=_p.getStrokeOpacityForPoint;_p.getStrokeColor=_p.getStrokeColorForPoint;_p.getFillOpacity=_p.getFillOpacityForPoint;_p.getFillColor=_p.getFillColorForPoint;_p.getFillColor2=_p.getFillColor2ForPoint;_p.getFillType=_p.getFillTypeForPoint;_p.getFillAngle=_p.getFillAngleForPoint;_p.getMarkerType=_p.getMarkerTypeForPoint;_p.getMarkerVisible=_p.getMarkerVisibleForPoint;_p.getExplode=_p.getExplodeForPoint;_p.getBarSpacing=_p.getBarSpacingForPoint;_p._setPropForPoint=function(sSetterName,sSeriesId,sCategoryId,oArg){var g=this._graph;var p=g.getPointByIds(sSeriesId,sCategoryId);if(!p){p=new BiChartPoint(g,sSeriesId,sCategoryId);g.addPoint(p);}
p[sSetterName](oArg);var c=g.getComponentByIds(sSeriesId,sCategoryId);if(c)
c[sSetterName](oArg);};_p.setStrokeOpacityForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setStrokeOpacity",sSeriesId,sCategoryId,oArg);};_p.setStrokeColorForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setStrokeColor",sSeriesId,sCategoryId,oArg);};_p.setFillOpacityForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setFillOpacity",sSeriesId,sCategoryId,oArg);};_p.setFillColorForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setFillColor",sSeriesId,sCategoryId,oArg);};_p.setFillColor2ForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setFillColor2",sSeriesId,sCategoryId,oArg);};_p.setFillTypeForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setFillType",sSeriesId,sCategoryId,oArg);};_p.setFillAngleForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setFillAngle",sSeriesId,sCategoryId,oArg);};_p.setMarkerTypeForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setMarkerType",sSeriesId,sCategoryId,oArg);};_p.setMarkerVisibleForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setMarkerVisible",sSeriesId,sCategoryId,oArg);};_p.setExplodeForPoint=function(sSeriesId,sCategoryId,oArg){this._setPropForPoint("setExplode",sSeriesId,sCategoryId,oArg);};_p.setBarSpacingForPoint=function(sSeriesId,sCategoryId,oArg){this._barSpacing=oArg;};_p.dispose=function(){if(this._disposed)return;this._graph=null;};function BiChartMouseEvent(sType,oEvent,oSeries,oCategory){BiMouseEvent.call(this,sType,oEvent);this._event=oEvent;this._series=oSeries;this._category=oCategory;}
var _p=BiChartMouseEvent.prototype=new BiMouseEvent;_p._className="BiChartMouseEvent";_p._bubbles=false;_p._propagationStopped=true;BiChartMouseEvent.prototype.getSeries=function(){return this._series;};BiChartMouseEvent.prototype.getCategory=function(){return this._category;};_p.dispose=function(){if(this._disposed)return;BiMouseEvent.prototype.dispose.call(this);this._series=null;this._category=null;};function BiAbstractChartBase(oGraph,oSeries)
{if(!oGraph)
return;BiComponent.call(this);this._graph=oGraph;this._series=oSeries;this._seriesId=this._series.getId();};var _p=BiAbstractChartBase.prototype=new BiComponent;_p._className="BiAbstractChartBase";BiAbstractChartBase.prototype.getSeries=function(){return this._series;};BiAbstractChartBase.prototype.getGraph=function(){return this._graph;};_p.getComponentByCategoryId=function(sCatId){return null;};_p.getStrokeOpacity=function(){return this._graph.getPresentationManager().getStrokeOpacity(this._seriesId,null);};_p.getStrokeColor=function(){return this._graph.getPresentationManager().getStrokeColor(this._seriesId,null);};_p.getFillOpacity=function(){return this._graph.getPresentationManager().getFillOpacity(this._seriesId,null);};_p.getFillColor=function(){return this._graph.getPresentationManager().getFillColor(this._seriesId,null);};_p.getFillColor2=function(){return this._graph.getPresentationManager().getFillColor2(this._seriesId,null);};_p.getFillType=function(){return this._graph.getPresentationManager().getFillType(this._seriesId,null);};_p.getFillAngle=function(){return this._graph.getPresentationManager().getFillAngle(this._seriesId,null);};_p.getMarkerType=function(){return this._graph.getPresentationManager().getMarkerType(this._seriesId,null);};_p.getMarkerVisible=function(){return this._graph.getPresentationManager().getMarkerVisible(this._seriesId,null);};_p.getExplode=function(){return this._graph.getPresentationManager().getExplode(this._seriesId,null);};_p.getBarSpacing=function()
{return this._graph.getPresentationManager().getBarSpacing(this._seriesId,null);}
_p.getSupportsValueAxis=function(){return true;};_p.getSupportsCategoryAxis=function(){return true;};_p.getSupportsGridLines=function(){return true;};_p.getTitle=function(){return this._series.getTitle();};_p.getIconHtml=function(bHasText,bEnabled,sIconPosition,nIconTextGap,sClassName)
{var marginSide,blockStyle="";switch(sIconPosition){case"right":marginSide="left";break;case"top":marginSide="bottom";blockStyle="display:block;"
break;case"bottom":marginSide="top";blockStyle="display:block;"
break;default:marginSide="right";break;}
var iconTextGap=bHasText?nIconTextGap:0;return"<img style=\"vertical-align:middle;border:0.05em solid "+this.getStrokeColor()+";overflow:hidden;background-color:"+this.getFillColor()+";"+"width:0.667em;height:0.667em;"+blockStyle+"margin-"+marginSide+":"+iconTextGap+"px;\""+(sClassName?" class=\""+sClassName+"\"":"")+" src=\""+application.getPath()+"images/blank.gif\">";};_p.dispose=function(){if(this._disposed)return;BiComponent.prototype.dispose.call(this);this._series=null;this._graph=null;};function BiAbstractChartSectionBase(oChart,oCategory)
{if(!oChart)
return;BiComponent.call(this);this._chart=oChart;this._series=oChart._series;this._seriesId=this._series.getId();this._category=oCategory;this._categoryId=oCategory.getId();this._graph=oChart.getGraph();};var _p=BiAbstractChartSectionBase.prototype=new BiComponent;_p._className="BiAbstractChartSectionBase";BiAbstractChartSectionBase.prototype.getChart=function(){return this._chart;};BiAbstractChartSectionBase.prototype.getSeries=function(){return this._series;};BiAbstractChartSectionBase.prototype.getCategory=function(){return this._category;};BiAbstractChartSectionBase.prototype.getGraph=function(){return this._graph;};_p._fillColor=null;_p._markerType=null;_p._markerVisible=null;_p._explode=null;_p.getStrokeOpacity=function(){return this._graph.getPresentationManager().getStrokeOpacity(this._seriesId,this._categoryId);};_p.getStrokeColor=function(){return this._graph.getPresentationManager().getStrokeColor(this._seriesId,this._categoryId);};_p.getFillOpacity=function(){return this._graph.getPresentationManager().getFillOpacity(this._seriesId,this._categoryId);};_p.getFillColor=function(){return this._graph.getPresentationManager().getFillColor(this._seriesId,this._categoryId);};_p.getFillColor2=function(){return this._graph.getPresentationManager().getFillColor2(this._seriesId,this._categoryId);};_p.getFillType=function(){return this._graph.getPresentationManager().getFillType(this._seriesId,this._categoryId);};_p.getFillAngle=function(){return this._graph.getPresentationManager().getFillAngle(this._seriesId,this._categoryId);};_p.getMarkerType=function(){return this._graph.getPresentationManager().getMarkerType(this._seriesId,this._categoryId);};_p.getMarkerVisible=function(){return this._graph.getPresentationManager().getMarkerVisible(this._seriesId,this._categoryId);};_p.getExplode=function(){return this._graph.getPresentationManager().getExplode(this._seriesId,this._categoryId);};_p.setStrokeColor=function(s){};_p.setFillOpacity=function(n){};_p.setFillColor=function(s){};_p.setStrokeOpacity=function(n){};_p.setFillColor2=function(s){};_p.setFillType=function(s){};_p.setFillAngle=function(s){};_p.setMarkerType=function(s){};_p.setMarkerVisible=function(s){};_p.setExplode=function(s){};_p.hasStrokeColor=function(){return this._strokeColor!=null;};_p.hasStrokeOpacity=function(){return this._strokeOpacity!=null;};_p.hasFillOpacity=function(){return this._fillOpacity!=null;};_p.hasFillColor=function(){return this._fillColor!=null;};_p.hasFillColor2=function(){return this._fillColor2!=null;};_p.hasFillType=function(){return this._fillType!=null;};_p.hasFillAngle=function(){return this._fillAngle!=null;};_p.hasMarkerType=function(){return this._markerType!=null;};_p.hasMarkerVisible=function(){return this._markerVisible!=null;};_p.hasExplode=function(){return this._explode!=null;};_p.getToolTip=function(){return this.getGraph().getToolTipForPoint(this._series,this._category);};_p.getContextMenu=function(){return this.getGraph().getContextMenuForPoint(this._series,this._category);};_p.getTitle=function(){return this._category.getTitle();};_p.getIconHtml=function(bHasText,bEnabled,sIconPosition,nIconTextGap,sClassName)
{var marginSide,blockStyle="";switch(sIconPosition){case"right":marginSide="left";break;case"top":marginSide="bottom";blockStyle="display:block;"
break;case"bottom":marginSide="top";blockStyle="display:block;"
break;default:marginSide="right";break;}
var iconTextGap=bHasText?nIconTextGap:0;return"<img style=\"vertical-align:middle;border:0.05em solid "+this.getStrokeColor()+";overflow:hidden;background-color:"+this.getFillColor()+";"+"width:0.667em;height:0.667em;"+blockStyle+"margin-"+marginSide+":"+iconTextGap+"px;\""+(sClassName?" class=\""+sClassName+"\"":"")+" src=\""+application.getPath()+"images/blank.gif\">";};_p.dispose=function(){if(this._disposed)return;BiComponent.prototype.dispose.call(this);this._chart=null;this._series=null;this._category=null;this._graph=null;this._fillEl=null;};function BiChartValueAxisBase(oGraph)
{if(!oGraph)
return;BiComponent.call(this);this._graph=oGraph;this._labels=[];};_p=BiChartValueAxisBase.prototype=new BiComponent;_p._className="BiChartValueAxisBase";_p._majorTickInterval=null;_p._minorTickInterval=null;_p._labelInterval=null;_p._maximum=null;_p._minimum=null;_p._showMajorTicks=false;_p._showMinorTicks=false;_p._showLabels=true;_p._fontSize=11;_p._desiredVisible=true;BiChartValueAxisBase.prototype.getShowMajorTicks=function(){return this._showMajorTicks;};BiChartValueAxisBase.prototype.getShowMinorTicks=function(){return this._showMinorTicks;};BiChartValueAxisBase.prototype.getShowLabels=function(){return this._showLabels;};BiChartValueAxisBase.prototype.getFontSize=function(){return this._fontSize;};_p.setMajorTickInterval=function(n){this._majorTickInterval=n;this._clearCache();};_p.setMinorTickInterval=function(n){this._minorTickInterval=n;this._clearCache();};_p.setMaximum=function(n){this._maximum=n;this._clearCache();};_p.setMinimum=function(n){this._minimum=n;this._clearCache();};_p.setShowMajorTicks=function(b){if(this._showMajorTicks!=b){this._showMajorTicks=b;this._updateMajorTicks();}};_p.setShowMinorTicks=function(b){if(this._showMinorTicks!=b){this._showMinorTicks=b;this._updateMinorTicks();}};_p.setShowLabels=function(b){if(this._showLabel!=b){this._showLabels=b;this._updateLabels();}};_p.getMaximumValue=function(){if(this._graph._getPercentageStack())
return 1;var s=this._graph.getSeries();if(this._graph._getStackedChart()){var cats=this._graph.getCategories();var l=cats.length;var sum,id;var max=0;for(var j=0;j<l;j++){sum=0;id=cats[j].getId();for(var i=0;i<s.length;i++){sum+=Math.abs(s[i].getValueByCategoryId(id));}
max=Math.max(max,sum);}
return max;}
else{var maxValue= -Infinity;for(var i=0;i<s.length;i++)
maxValue=Math.max(maxValue,s[i].getMaximumValue());return maxValue;}};_p.getMinimumValue=function(){if(this._graph._getStackedChart())
return 0;var minValue=Infinity;var s=this._graph.getSeries();for(var i=0;i<s.length;i++)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -