Skip to content

Instantly share code, notes, and snippets.

@ItsAsbreuk
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ItsAsbreuk/9900120 to your computer and use it in GitHub Desktop.
Save ItsAsbreuk/9900120 to your computer and use it in GitHub Desktop.
Y.namespace('Plugin').ChartDataSource = Y.Base.create('chartDataSource', Y.Plugin.DataTableDataSource, [], {
/**
* Callback function passed to DataSource's sendRequest() method populates
* an entire DataTable with new data, clearing previous data, if any.
*
* @method onDataReturnInitializeTable
* @param e {EventFacade} DataSource Event Facade object.
*/
onDataReturnInitializeTable : function(e) {
var records = (e.response && e.response.results) || [];
this.get("host").set("dataProvider", records);
}
}, {
NS : 'chartdatasource'
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment