summaryrefslogtreecommitdiff
path: root/js/dojo-1.7.2/dojox/charting/Series.js
diff options
context:
space:
mode:
authorTristan Zur <tzur@web.web.ccwn.org>2014-03-27 22:27:47 +0100
committerTristan Zur <tzur@web.web.ccwn.org>2014-03-27 22:27:47 +0100
commitb62676ca5d3d6f6ba3f019ea3f99722e165a98d8 (patch)
tree86722cb80f07d4569f90088eeaea2fc2f6e2ef94 /js/dojo-1.7.2/dojox/charting/Series.js
Initial commit of intern.ccwn.org contentsHEADmaster
Diffstat (limited to 'js/dojo-1.7.2/dojox/charting/Series.js')
-rw-r--r--js/dojo-1.7.2/dojox/charting/Series.js63
1 files changed, 63 insertions, 0 deletions
diff --git a/js/dojo-1.7.2/dojox/charting/Series.js b/js/dojo-1.7.2/dojox/charting/Series.js
new file mode 100644
index 0000000..7a70bbd
--- /dev/null
+++ b/js/dojo-1.7.2/dojox/charting/Series.js
@@ -0,0 +1,63 @@
+//>>built
+define("dojox/charting/Series", ["dojo/_base/lang", "dojo/_base/declare", "./Element"],
+ function(lang, declare, Element){
+ /*=====
+ dojox.charting.__SeriesCtorArgs = function(plot){
+ // summary:
+ // An optional arguments object that can be used in the Series constructor.
+ // plot: String?
+ // The plot (by name) that this series belongs to.
+ this.plot = plot;
+ }
+
+ var Element = dojox.charting.Element;
+ =====*/
+ return declare("dojox.charting.Series", Element, {
+ // summary:
+ // An object representing a series of data for plotting on a chart.
+ constructor: function(chart, data, kwArgs){
+ // summary:
+ // Create a new data series object for use within charting.
+ // chart: dojox.charting.Chart
+ // The chart that this series belongs to.
+ // data: Array|Object:
+ // The array of data points (either numbers or objects) that
+ // represents the data to be drawn. Or it can be an object. In
+ // the latter case, it should have a property "data" (an array),
+ // destroy(), and setSeriesObject().
+ // kwArgs: dojox.charting.__SeriesCtorArgs?
+ // An optional keyword arguments object to set details for this series.
+ lang.mixin(this, kwArgs);
+ if(typeof this.plot != "string"){ this.plot = "default"; }
+ this.update(data);
+ },
+
+ clear: function(){
+ // summary:
+ // Clear the calculated additional parameters set on this series.
+ this.dyn = {};
+ },
+
+ update: function(data){
+ // summary:
+ // Set data and make this object dirty, so it can be redrawn.
+ // data: Array|Object:
+ // The array of data points (either numbers or objects) that
+ // represents the data to be drawn. Or it can be an object. In
+ // the latter case, it should have a property "data" (an array),
+ // destroy(), and setSeriesObject().
+ if(lang.isArray(data)){
+ this.data = data;
+ }else{
+ this.source = data;
+ this.data = this.source.data;
+ if(this.source.setSeriesObject){
+ this.source.setSeriesObject(this);
+ }
+ }
+ this.dirty = true;
+ this.clear();
+ }
+ });
+
+});