flymis/WebRoot/dojojs/src/charting/Plot.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.provide("dojo.charting.Plot");
dojo.require("dojo.lang.common");
dojo.require("dojo.charting.Axis");
dojo.require("dojo.charting.Series");

dojo.charting.RenderPlotSeries = { Singly:"single", Grouped:"grouped" };

dojo.charting.Plot = function(
	/* dojo.charting.Axis? */xaxis, 
	/* dojo.charting.Axis? */yaxis, 
	/* dojo.charting.Series[]? */series
){
	//	summary
	//	Creates a new instance of a Plot (X/Y Axis + n Series).
	var id = "dojo-charting-plot-"+dojo.charting.Plot.count++;
	this.getId=function(){ return id; };
	this.setId=function(key){ id = key; };
	this.axisX = null;
	this.axisY = null;
	this.series = [];
	this.dataNode = null;

	//	for bar charts, pie charts and stacked charts, change to Grouped.
	this.renderType = dojo.charting.RenderPlotSeries.Singly;
	if(xaxis){
		this.setAxis(xaxis,"x");
	}
	if(yaxis){
		this.setAxis(yaxis,"y");
	}
	if(series){
		for(var i=0; i<series.length; i++){ this.addSeries(series[i]); }
	}
}
dojo.charting.Plot.count=0;

dojo.extend(dojo.charting.Plot, {
	addSeries: function(
		/* dojo.charting.Series || object */series,
		/* function? */plotter
	){
		//	summary
		//	Add a new Series to this plot.  Can take the form of a Series, or an object
		//	of the form { series, plotter }
		if(series.plotter){
			this.series.push(series);
		} else {
			this.series.push({
				data: series,
				plotter: plotter || dojo.charting.Plotters["Default"]
后面还有 43 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。