Skip to content

Commit

Permalink
#32 introducing _filteredData
Browse files Browse the repository at this point in the history
  • Loading branch information
tracend committed Jun 6, 2013
1 parent 9669315 commit 2c4c22a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Cloudvisio.prototype.models = [];
Cloudvisio.prototype.data = function( raw, options ){
// fallbacks
options = options || {};
var data = (this._filteredData.length) ? this._filteredData : this._data;
// return the existing data if none is passed...
if (!arguments.length) return this._data;
if (!arguments.length) return data;
// do some calculations
this._data = raw;
// reset the models
Expand Down Expand Up @@ -262,6 +263,8 @@ Cloudvisio.prototype.type = function( key, options ){
// Internal
// - raw data container
Cloudvisio.prototype._data = [];
// - filtered data
Cloudvisio.prototype._filteredData = [];
// - chart attributes
Cloudvisio.prototype._axis = {};
// - chart attributes
Expand Down

0 comments on commit 2c4c22a

Please sign in to comment.