[demo][xs]: graph view available for cases where data loaded from remote.
This commit is contained in:
@@ -29,9 +29,26 @@ $(function() {
|
|||||||
var $el = $('<div />');
|
var $el = $('<div />');
|
||||||
$el.appendTo($('.data-explorer-here'));
|
$el.appendTo($('.data-explorer-here'));
|
||||||
window.dataExplorer = null;
|
window.dataExplorer = null;
|
||||||
|
var views = [
|
||||||
|
{
|
||||||
|
id: 'grid',
|
||||||
|
label: 'Grid',
|
||||||
|
view: new recline.View.DataGrid({
|
||||||
|
model: dataset
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'graph',
|
||||||
|
label: 'Graph',
|
||||||
|
view: new recline.View.FlotGraph({
|
||||||
|
model: dataset
|
||||||
|
})
|
||||||
|
}
|
||||||
|
];
|
||||||
window.dataExplorer = new recline.View.DataExplorer({
|
window.dataExplorer = new recline.View.DataExplorer({
|
||||||
el: $el
|
el: $el
|
||||||
, model: dataset
|
, model: dataset
|
||||||
|
, views: views
|
||||||
});
|
});
|
||||||
// HACK (a bit). Issue is that Backbone will not trigger the route
|
// HACK (a bit). Issue is that Backbone will not trigger the route
|
||||||
// if you are already at that location so we have to make sure we genuinely switch
|
// if you are already at that location so we have to make sure we genuinely switch
|
||||||
|
|||||||
Reference in New Issue
Block a user