From 7cd4ba5c0b3e80c993e96bf776ada52064301ccc Mon Sep 17 00:00:00 2001 From: jos Date: Fri, 6 Jun 2014 21:32:56 +0200 Subject: [PATCH] Updated playground example --- examples/graph3d/playground/playground.js | 31 ++++++----------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/examples/graph3d/playground/playground.js b/examples/graph3d/playground/playground.js index b7d62e5e..5b93dddb 100644 --- a/examples/graph3d/playground/playground.js +++ b/examples/graph3d/playground/playground.js @@ -449,39 +449,30 @@ function draw() { function drawCsv() { - // Instantiate our graph object. - var graph = new vis.Graph3d(document.getElementById('graph')); - // retrieve data and options var data = getDataCsv(); var options = getOptions(); - // Draw our graph with the created data and options - graph.draw(data, options); + // Creat a graph + var graph = new vis.Graph3d(document.getElementById('graph'), data, options); } function drawJson() { - // Instantiate our graph object. - var graph = new vis.Graph3d(document.getElementById('graph')); - // retrieve data and options var data = getDataJson(); var options = getOptions(); - // Draw our graph with the created data and options - graph.draw(data, options); + // Creat a graph + var graph = new vis.Graph3d(document.getElementById('graph'), data, options); } function drawJavascript() { - // Instantiate our graph object. - var graph = new vis.Graph3d(document.getElementById('graph')); - // retrieve data and options var data = getDataJavascript(); var options = getOptions(); - // Draw our graph with the created data and options - graph.draw(data, options); + // Creat a graph + var graph = new vis.Graph3d(document.getElementById('graph'), data, options); } @@ -503,10 +494,7 @@ function drawGooglespreadsheet() { options = getOptions(); // Instantiate our graph object. - var graph = new vis.Graph3d(document.getElementById('graph')); - - // Draw our graph with the created data and options - graph.draw(data, options); + var graph = new vis.Graph3d(document.getElementById('graph'), data, options); } url = document.getElementById("googlespreadsheetText").value; @@ -537,10 +525,7 @@ function drawDatasource() { options = getOptions(); // Instantiate our graph object. - var graph = new vis.Graph3d(document.getElementById('graph')); - - // Draw our graph with the created data and options - graph.draw(data, options); + var graph = new vis.Graph3d(document.getElementById('graph'), data, options); }; url = document.getElementById("datasourceText").value;