Last active
August 29, 2015 13:57
-
-
Save ItsAsbreuk/9900120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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