📄 charts-experimental-debug.js
字号:
} } this._swf.setHorizontalAxis(clonedXAxis); }, /** * Getter for the yAxis attribute. * * @method _setYAxis * @private */ _setYAxis: function(value) { if(this._yAxisLabelFunction !== null) { YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction); this._yAxisLabelFunction = null; } var clonedYAxis = {}; for(var prop in value) { if(prop == "labelFunction") { if(value.labelFunction !== null) { if(typeof value.labelFunction == "function") { clonedYAxis.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(value.labelFunction); } else { clonedYAxis.labelFunction = value.labelFunction; } this._yAxisLabelFunction = clonedYAxis.labelFunction; } } else { clonedYAxis[prop] = value[prop]; } } this._swf.setVerticalAxis(clonedYAxis); }});/** * LineChart class for the YUI Charts widget. * * @namespace YAHOO.widget * @class LineChart * @uses YAHOO.widget.CartesianChart * @constructor * @param containerId {HTMLElement} Container element for the Flash Player instance. * @param dataSource {YAHOO.util.DataSource} DataSource instance. * @param attributes {object} (optional) Object literal of configuration values. */YAHOO.widget.LineChart = function(containerId, dataSource, attributes){ YAHOO.widget.LineChart.superclass.constructor.call(this, "line", containerId, dataSource, attributes);};YAHOO.lang.extend(YAHOO.widget.LineChart, YAHOO.widget.CartesianChart);/** * ColumnChart class for the YUI Charts widget. * * @namespace YAHOO.widget * @class ColumnChart * @uses YAHOO.widget.CartesianChart * @constructor * @param containerId {HTMLElement} Container element for the Flash Player instance. * @param dataSource {YAHOO.util.DataSource} DataSource instance. * @param attributes {object} (optional) Object literal of configuration values. */YAHOO.widget.ColumnChart = function(containerId, dataSource, attributes){ YAHOO.widget.ColumnChart.superclass.constructor.call(this, "column", containerId, dataSource, attributes);};YAHOO.lang.extend(YAHOO.widget.ColumnChart, YAHOO.widget.CartesianChart);/** * BarChart class for the YUI Charts widget. * * @namespace YAHOO.widget * @class BarChart * @uses YAHOO.widget.CartesianChart * @constructor * @param containerId {HTMLElement} Container element for the Flash Player instance. * @param dataSource {YAHOO.util.DataSource} DataSource instance. * @param attributes {object} (optional) Object literal of configuration values. */YAHOO.widget.BarChart = function(containerId, dataSource, attributes){ YAHOO.widget.BarChart.superclass.constructor.call(this, "bar", containerId, dataSource, attributes);};YAHOO.lang.extend(YAHOO.widget.BarChart, YAHOO.widget.CartesianChart);/** * StackedColumnChart class for the YUI Charts widget. * * @namespace YAHOO.widget * @class StackedColumnChart * @uses YAHOO.widget.CartesianChart * @constructor * @param containerId {HTMLElement} Container element for the Flash Player instance. * @param dataSource {YAHOO.util.DataSource} DataSource instance. * @param attributes {object} (optional) Object literal of configuration values. */YAHOO.widget.StackedColumnChart = function(containerId, dataSource, attributes){ YAHOO.widget.StackedColumnChart.superclass.constructor.call(this, "stackcolumn", containerId, dataSource, attributes);};YAHOO.lang.extend(YAHOO.widget.StackedColumnChart, YAHOO.widget.CartesianChart);/** * StackedBarChart class for the YUI Charts widget. * * @namespace YAHOO.widget * @class StackedBarChart * @uses YAHOO.widget.CartesianChart * @constructor * @param containerId {HTMLElement} Container element for the Flash Player instance. * @param dataSource {YAHOO.util.DataSource} DataSource instance. * @param attributes {object} (optional) Object literal of configuration values. */YAHOO.widget.StackedBarChart = function(containerId, dataSource, attributes){ YAHOO.widget.StackedBarChart.superclass.constructor.call(this, "stackbar", containerId, dataSource, attributes);};YAHOO.lang.extend(YAHOO.widget.StackedBarChart, YAHOO.widget.CartesianChart);/** * Defines a CartesianChart's vertical or horizontal axis. * * @namespace YAHOO.widget * @class Axis * @constructor */YAHOO.widget.Axis = function(){};YAHOO.widget.Axis.prototype = { /** * The type of axis. * * @property type * @type String */ type: null, /** * If true, the items on the axis will be drawn in opposite direction. * * @property reverse * @type Boolean */ reverse: false, /** * A string reference to the globally-accessible function that may be called to * determine each of the label values for this axis. Also accepts function references. * * @property labelFunction * @type String */ labelFunction: null};/** * A type of axis whose units are measured in numeric values. * * @namespace YAHOO.widget * @class NumericAxis * @constructor */YAHOO.widget.NumericAxis = function(){ YAHOO.widget.NumericAxis.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.NumericAxis, YAHOO.widget.Axis,{ type: "numeric", /** * The minimum value drawn by the axis. If not set explicitly, the axis minimum * will be calculated automatically. * * @property minimum * @type Number */ minimum: NaN, /** * The maximum value drawn by the axis. If not set explicitly, the axis maximum * will be calculated automatically. * * @property maximum * @type Number */ maximum: NaN, /** * The spacing between major intervals on this axis. * * @property majorUnit * @type Number */ majorUnit: NaN, /** * The spacing between minor intervals on this axis. * * @property minorUnit * @type Number */ minorUnit: NaN, /** * If true, the labels, ticks, gridlines, and other objects will snap to * the nearest major or minor unit. If false, their position will be based * on the minimum value. * * @property snapToUnits * @type Boolean */ snapToUnits: true, /** * Series that are stackable will only stack when this value is set to true. * * @property stackingEnabled * @type Boolean */ stackingEnabled: false, /** * If true, and the bounds are calculated automatically, either the minimum or * maximum will be set to zero. * * @property alwaysShowZero * @type Boolean */ alwaysShowZero: true, /** * The scaling algorithm to use on this axis. May be "linear" or "logarithmic". * * @property scale * @type String */ scale: "linear"});/** * A type of axis whose units are measured in time-based values. * * @namespace YAHOO.widget * @class TimeAxis * @constructor */YAHOO.widget.TimeAxis = function(){ YAHOO.widget.TimeAxis.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.TimeAxis, YAHOO.widget.Axis,{ type: "time", /** * The minimum value drawn by the axis. If not set explicitly, the axis minimum * will be calculated automatically. * * @property minimum * @type Date */ minimum: null, /** * The maximum value drawn by the axis. If not set explicitly, the axis maximum * will be calculated automatically. * * @property maximum * @type Number */ maximum: null, /** * The spacing between major intervals on this axis. * * @property majorUnit * @type Number */ majorUnit: NaN, /** * The time unit used by the majorUnit. * * @property majorTimeUnit * @type String */ majorTimeUnit: null, /** * The spacing between minor intervals on this axis. * * @property majorUnit * @type Number */ minorUnit: NaN, /** * The time unit used by the minorUnit. * * @property majorTimeUnit * @type String */ minorTimeUnit: null, /** * If true, the labels, ticks, gridlines, and other objects will snap to * the nearest major or minor unit. If false, their position will be based * on the minimum value. * * @property snapToUnits * @type Boolean */ snapToUnits: true, /** * Series that are stackable will only stack when this value is set to true. * * @property stackingEnabled * @type Boolean */ stackingEnabled: false});/** * A type of axis that displays items in categories. * * @namespace YAHOO.widget * @class CategoryAxis * @constructor */YAHOO.widget.CategoryAxis = function(){ YAHOO.widget.CategoryAxis.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.CategoryAxis, YAHOO.widget.Axis,{ type: "category", /** * A list of category names to display along this axis. * * @property categoryNames * @type Array */ categoryNames: null});/** * Functionality common to most series. Generally, a <code>Series</code> * object shouldn't be instantiated directly. Instead, a subclass with a * concrete implementation should be used. * * @namespace YAHOO.widget * @class Series * @constructor */YAHOO.widget.Series = function() {};YAHOO.widget.Series.prototype = { /** * The type of series. * * @property type * @type String */ type: null, /** * The human-readable name of the series. * * @property displayName * @type String */ displayName: null};/** * Functionality common to most series appearing in cartesian charts. * Generally, a <code>CartesianSeries</code> object shouldn't be * instantiated directly. Instead, a subclass with a concrete implementation * should be used. * * @namespace YAHOO.widget * @class CartesianSeries * @uses YAHOO.widget.Series * @constructor */YAHOO.widget.CartesianSeries = function() { YAHOO.widget.CartesianSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.CartesianSeries, YAHOO.widget.Series,{ /** * The field used to access the x-axis value from the items from the data source. * * @property xField * @type String */ xField: null, /** * The field used to access the y-axis value from the items from the data source. * * @property yField * @type String */ yField: null});/** * ColumnSeries class for the YUI Charts widget. * * @namespace YAHOO.widget * @class ColumnSeries * @uses YAHOO.widget.CartesianSeries * @constructor */YAHOO.widget.ColumnSeries = function() { YAHOO.widget.ColumnSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.ColumnSeries, YAHOO.widget.CartesianSeries,{ type: "column"});/** * LineSeries class for the YUI Charts widget. * * @namespace YAHOO.widget * @class LineSeries * @uses YAHOO.widget.CartesianSeries * @constructor */YAHOO.widget.LineSeries = function() { YAHOO.widget.LineSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.LineSeries, YAHOO.widget.CartesianSeries,{ type: "line"});/** * BarSeries class for the YUI Charts widget. * * @namespace YAHOO.widget * @class BarSeries * @uses YAHOO.widget.CartesianSeries * @constructor */YAHOO.widget.BarSeries = function() { YAHOO.widget.BarSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.BarSeries, YAHOO.widget.CartesianSeries,{ type: "bar"});/** * PieSeries class for the YUI Charts widget. * * @namespace YAHOO.widget * @class PieSeries * @uses YAHOO.widget.Series * @constructor */YAHOO.widget.PieSeries = function() { YAHOO.widget.PieSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.PieSeries, YAHOO.widget.Series,{ type: "pie", /** * The field used to access the data value from the items from the data source. * * @property dataField * @type String */ dataField: null, /** * The field used to access the category value from the items from the data source. * * @property categoryField * @type String */ categoryField: null, /** * A string reference to the globally-accessible function that may be called to * determine each of the label values for this series. Also accepts function references. * * @property labelFunction * @type String */ labelFunction: null});/** * StackedBarSeries class for the YUI Charts widget. * * @namespace YAHOO.widget * @class StackedBarSeries * @uses YAHOO.widget.CartesianSeries * @constructor */YAHOO.widget.StackedBarSeries = function() { YAHOO.widget.StackedBarSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.StackedBarSeries, YAHOO.widget.CartesianSeries,{ type: "stackbar"});/** * StackedColumnSeries class for the YUI Charts widget. * * @namespace YAHOO.widget * @class StackedColumnSeries * @uses YAHOO.widget.CartesianSeries * @constructor */YAHOO.widget.StackedColumnSeries = function() { YAHOO.widget.StackedColumnSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.StackedColumnSeries, YAHOO.widget.CartesianSeries,{ type: "stackcolumn"});YAHOO.register("charts", YAHOO.widget.Chart, {version: "2.6.0", build: "1321"});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -