|
|
@ -20,15 +20,16 @@ |
|
|
|
// Called when the Visualization API is loaded. |
|
|
|
function drawVisualization() { |
|
|
|
// Create and populate a data table. |
|
|
|
var data = new vis.DataSet(); |
|
|
|
data = new vis.DataSet(); |
|
|
|
// create some nice looking data with sin/cos |
|
|
|
var counter = 0; |
|
|
|
var steps = 50; // number of datapoints will be steps*steps |
|
|
|
var axisMax = 314; |
|
|
|
var axisStep = axisMax / steps; |
|
|
|
for (var x = 0; x < axisMax; x+=axisStep) { |
|
|
|
for (var y = 0; y < axisMax; y+=axisStep) { |
|
|
|
var value = custom(x,y); |
|
|
|
data.add({x:x,y:y,z:value,style:value}); |
|
|
|
data.add({id:counter++,x:x,y:y,z:value,style:value}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|