From 210e8feae2fb4842bfb2de38666e6c41671fef3c Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 27 Sep 2017 12:42:48 -0400 Subject: removed lib --- .../vis/examples/graph3d/playground/csv2array.js | 120 ----- .../examples/graph3d/playground/csv2datatable.html | 80 --- .../examples/graph3d/playground/datasource.html | 173 ------- .../vis/examples/graph3d/playground/datasource.php | 155 ------ www/lib/vis/examples/graph3d/playground/index.html | 183 ------- .../vis/examples/graph3d/playground/playground.css | 91 ---- .../vis/examples/graph3d/playground/playground.js | 545 --------------------- .../graph3d/playground/prettify/lang-apollo.js | 2 - .../graph3d/playground/prettify/lang-css.js | 2 - .../graph3d/playground/prettify/lang-hs.js | 2 - .../graph3d/playground/prettify/lang-lisp.js | 2 - .../graph3d/playground/prettify/lang-lua.js | 2 - .../graph3d/playground/prettify/lang-ml.js | 2 - .../graph3d/playground/prettify/lang-proto.js | 1 - .../graph3d/playground/prettify/lang-scala.js | 2 - .../graph3d/playground/prettify/lang-sql.js | 2 - .../graph3d/playground/prettify/lang-vb.js | 2 - .../graph3d/playground/prettify/lang-vhdl.js | 3 - .../graph3d/playground/prettify/lang-wiki.js | 2 - .../graph3d/playground/prettify/lang-yaml.js | 2 - .../graph3d/playground/prettify/prettify.css | 1 - .../graph3d/playground/prettify/prettify.js | 33 -- 22 files changed, 1407 deletions(-) delete mode 100644 www/lib/vis/examples/graph3d/playground/csv2array.js delete mode 100644 www/lib/vis/examples/graph3d/playground/csv2datatable.html delete mode 100644 www/lib/vis/examples/graph3d/playground/datasource.html delete mode 100644 www/lib/vis/examples/graph3d/playground/datasource.php delete mode 100644 www/lib/vis/examples/graph3d/playground/index.html delete mode 100644 www/lib/vis/examples/graph3d/playground/playground.css delete mode 100644 www/lib/vis/examples/graph3d/playground/playground.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-apollo.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-css.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-hs.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-lisp.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-lua.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-ml.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-proto.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-scala.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-sql.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-vb.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-vhdl.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-wiki.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/lang-yaml.js delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/prettify.css delete mode 100644 www/lib/vis/examples/graph3d/playground/prettify/prettify.js (limited to 'www/lib/vis/examples/graph3d/playground') diff --git a/www/lib/vis/examples/graph3d/playground/csv2array.js b/www/lib/vis/examples/graph3d/playground/csv2array.js deleted file mode 100644 index 95d0c4a6..00000000 --- a/www/lib/vis/examples/graph3d/playground/csv2array.js +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Convert data in CSV (comma separated value) format to a javascript array. - * - * Values are separated by a comma, or by a custom one character delimeter. - * Rows are separated by a new-line character. - * - * Leading and trailing spaces and tabs are ignored. - * Values may optionally be enclosed by double quotes. - * Values containing a special character (comma's, double-quotes, or new-lines) - * must be enclosed by double-quotes. - * Embedded double-quotes must be represented by a pair of consecutive - * double-quotes. - * - * Example usage: - * var csv = '"x", "y", "z"\n12.3, 2.3, 8.7\n4.5, 1.2, -5.6\n'; - * var array = csv2array(csv); - * - * Author: Jos de Jong, 2010 - * - * @param {string} data The data in CSV format. - * @param {string} delimeter [optional] a custom delimeter. Comma ',' by default - * The Delimeter must be a single character. - * @return {Array} array A two dimensional array containing the data - * @throw {String} error The method throws an error when there is an - * error in the provided data. - */ -function csv2array(data, delimeter) { - // Retrieve the delimeter - if (delimeter == undefined) - delimeter = ','; - if (delimeter && delimeter.length > 1) - delimeter = ','; - - // initialize variables - var newline = '\n'; - var eof = ''; - var i = 0; - var c = data.charAt(i); - var row = 0; - var col = 0; - var array = new Array(); - - while (c != eof) { - // skip whitespaces - while (c == ' ' || c == '\t' || c == '\r') { - c = data.charAt(++i); // read next char - } - - // get value - var value = ""; - if (c == '\"') { - // value enclosed by double-quotes - c = data.charAt(++i); - - do { - if (c != '\"') { - // read a regular character and go to the next character - value += c; - c = data.charAt(++i); - } - - if (c == '\"') { - // check for escaped double-quote - var cnext = data.charAt(i+1); - if (cnext == '\"') { - // this is an escaped double-quote. - // Add a double-quote to the value, and move two characters ahead. - value += '\"'; - i += 2; - c = data.charAt(i); - } - } - } - while (c != eof && c != '\"'); - - if (c == eof) { - throw "Unexpected end of data, double-quote expected"; - } - - c = data.charAt(++i); - } - else { - // value without quotes - while (c != eof && c != delimeter && c!= newline && c != ' ' && c != '\t' && c != '\r') { - value += c; - c = data.charAt(++i); - } - } - - // add the value to the array - if (array.length <= row) - array.push(new Array()); - array[row].push(value); - - // skip whitespaces - while (c == ' ' || c == '\t' || c == '\r') { - c = data.charAt(++i); - } - - // go to the next row or column - if (c == delimeter) { - // to the next column - col++; - } - else if (c == newline) { - // to the next row - col = 0; - row++; - } - else if (c != eof) { - // unexpected character - throw "Delimiter expected after character " + i; - } - - // go to the next character - c = data.charAt(++i); - } - - return array; -} diff --git a/www/lib/vis/examples/graph3d/playground/csv2datatable.html b/www/lib/vis/examples/graph3d/playground/csv2datatable.html deleted file mode 100644 index 08d3c65d..00000000 --- a/www/lib/vis/examples/graph3d/playground/csv2datatable.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - Convert CSV to Google Datatable - - - - - - - - - - -
- -
- -CSV
- -
-
- -
-
- -Google DataTable
- - - - diff --git a/www/lib/vis/examples/graph3d/playground/datasource.html b/www/lib/vis/examples/graph3d/playground/datasource.html deleted file mode 100644 index 7a593604..00000000 --- a/www/lib/vis/examples/graph3d/playground/datasource.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - Graph3d documentation - - - - - - - - -
-<?php
-
-/*
-This datasource returns a response in the form of a google query response
-
-USAGE
-All parameters are optional
-datasource.php?xmin=0&xmax=314&xstepnum=25&ymin=0&ymax=314&ystepnum=25
-
-DOCUMENTATION
-http://code.google.com/apis/visualization/documentation/dev/implementing_data_source.html
-
-
-EXAMPLE OF A RESPONSE FILE
-
-Note that the reqId in the response must correspond with the reqId from the
-request.
-________________________________________________________________________________
-
-google.visualization.Query.setResponse({
-  version:'0.6',
-  reqId:'0',
-  status:'ok',
-  table:{
-    cols:[
-      {id:'x',
-       label:'x',
-       type:'number'},
-      {id:'y',
-       label:'y',
-       type:'number'},
-      {id:'value',
-       label:'value',
-       type:'number'}
-    ],
-    rows:[
-      {c:[{v:0}, {v:0}, {v:10.0}]},
-      {c:[{v:1}, {v:0}, {v:12.0}]},
-      {c:[{v:2}, {v:0}, {v:13.0}]},
-      {c:[{v:0}, {v:1}, {v:11.0}]},
-      {c:[{v:1}, {v:1}, {v:14.0}]},
-      {c:[{v:2}, {v:1}, {v:11.0}]}
-    ]
-  }
-});
-________________________________________________________________________________
-
-*/
-
-
-/**
- * A custom function
- */
-function custom($x, $y) {
-  $d = sqrt(pow($x/100, 2) + pow($y/100, 2));
-
-  return 50 * exp(-5 * $d / 10) * sin($d*5)
-}
-
-
-
-
-// retrieve parameters
-$default_stepnum = 25;
-
-$xmin     = isset($_REQUEST['xmin'])     ? (float)$_REQUEST['xmin']   : -100;
-$xmax     = isset($_REQUEST['xmax'])     ? (float)$_REQUEST['xmax']   : 100;
-$xstepnum = isset($_REQUEST['xstepnum']) ? (int)$_REQUEST['xstepnum'] : $default_stepnum;
-
-$ymin     = isset($_REQUEST['ymin'])     ? (float)$_REQUEST['ymin']   : -100;
-$ymax     = isset($_REQUEST['ymax'])     ? (float)$_REQUEST['ymax']   : 100;
-$ystepnum = isset($_REQUEST['ystepnum']) ? (int)$_REQUEST['ystepnum'] : $default_stepnum;
-
-// in the reply we must fill in the request id that came with the request
-$reqId = getReqId();
-
-// check for a maximum number of datapoints (for safety)
-if ($xstepnum * $ystepnum > 10000) {
-  echo "google.visualization.Query.setResponse({
-    version:'0.6',
-    reqId:'$reqId',
-    status:'error',
-    errors:[{reason:'not_supported', message:'Maximum number of datapoints exceeded'}]
-  });";
-
-  exit;
-}
-
-
-// output the header part of the response
-echo "google.visualization.Query.setResponse({
-  version:'0.6',
-  reqId:'$reqId',
-  status:'ok',
-  table:{
-    cols:[
-      {id:'x',
-       label:'x',
-       type:'number'},
-      {id:'y',
-       label:'y',
-       type:'number'},
-      {id:'value',
-       label:'',
-       type:'number'}
-    ],
-    rows:[";
-
-// output the actual values
-$first = true;
-$xstep = ($xmax - $xmin) / $xstepnum;
-$ystep = ($ymax - $ymin) / $ystepnum;
-for ($x = $xmin; $x < $xmax; $x+=$xstep) {
-  for ($y = $ymin; $y < $ymax; $y+=$ystep) {
-    $value = custom($x,$y);
-
-    if (!$first) {
-      echo ",\n";
-    }
-    else {
-      echo "\n";
-    }
-    echo "      {c:[{v:$x}, {v:$y}, {v:$value}]}";
-
-    $first = false;
-  }
-}
-
-
-// output the end part of the response
-echo "
-    ]
-  }
-});
-";
-
-
-/**
- * Retrieve the request id from the get/post data
- * @return {number} $reqId       The request id, or 0 if not found
- */
-function getReqId() {
-  $reqId = 0;
-
-  foreach ($_REQUEST as $req) {
-    if (substr($req, 0,6) == "reqId:") {
-      $reqId = substr($req, 6);
-    }
-  }
-
-  return $reqId;
-}
-
-
-?>
-
-
- - - diff --git a/www/lib/vis/examples/graph3d/playground/datasource.php b/www/lib/vis/examples/graph3d/playground/datasource.php deleted file mode 100644 index 9c265cb9..00000000 --- a/www/lib/vis/examples/graph3d/playground/datasource.php +++ /dev/null @@ -1,155 +0,0 @@ - 10000) { - echo "google.visualization.Query.setResponse({ - version:'0.6', - reqId:'$reqId', - status:'error', - errors:[{reason:'not_supported', message:'Maximum number of datapoints exceeded'}] - });"; - - exit; -} - - -// output the header part of the response -echo "google.visualization.Query.setResponse({ - version:'0.6', - reqId:'$reqId', - status:'ok', - table:{ - cols:[ - {id:'x', - label:'x', - type:'number'}, - {id:'y', - label:'y', - type:'number'}, - {id:'value', - label:'', - type:'number'} - ], - rows:["; - -// output the actual values -$first = true; -$xstep = ($xmax - $xmin) / $xstepnum; -$ystep = ($ymax - $ymin) / $ystepnum; -for ($x = $xmin; $x < $xmax; $x+=$xstep) { - for ($y = $ymin; $y < $ymax; $y+=$ystep) { - $value = custom($x,$y); - - if (!$first) { - echo ",\n"; - } - else { - echo "\n"; - } - echo " {c:[{v:$x}, {v:$y}, {v:$value}]}"; - - $first = false; - } -} - - -// output the end part of the response -echo " - ] - } -}); -"; - - -/** - * Retrieve the request id from the get/post data - * @return {number} $reqId The request id, or 0 if not found - */ -function getReqId() { - $reqId = 0; - - foreach ($_REQUEST as $req) { - if (substr($req, 0,6) == "reqId:") { - $reqId = substr($req, 6); - } - } - - return $reqId; -} - - -?> diff --git a/www/lib/vis/examples/graph3d/playground/index.html b/www/lib/vis/examples/graph3d/playground/index.html deleted file mode 100644 index 134bb264..00000000 --- a/www/lib/vis/examples/graph3d/playground/index.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - Graph 3D - Playground - - - - - - - - - - - - - -

Graph 3D - Playground

- - --- - - - - - - - -
-

Data

-

- Graph 3D expects a data table with first three to five columns: - colums x, y, z (optional), - style, filter (optional). -

- - - - - - - -
- Csv - - -
- -
-
-

Graph

-

- -

- -
-
-

Options

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionValue
width for example "500px" or "100%"
height for example "500px" or "100%"
style - -
showAnimationControls
showGrid
showPerspective
showLegend
showShadow
keepAspectRatio
verticalRatio a value between 0.1 and 1.0
animationInterval in milliseconds
animationPreload
animationAutoStart
xCenter
yCenter
xMin
xMax
xStep
yMin
yMax
yStep
zMin
zMax
zStep
valueMin
valueMax
xBarWidth
yBarWidth
xLabel
yLabel
zLabel
filterLabel
legendLabel
- -
- - diff --git a/www/lib/vis/examples/graph3d/playground/playground.css b/www/lib/vis/examples/graph3d/playground/playground.css deleted file mode 100644 index 5139d4b5..00000000 --- a/www/lib/vis/examples/graph3d/playground/playground.css +++ /dev/null @@ -1,91 +0,0 @@ -body -{ - font: 13px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; -} - -h1 -{ - font-size: 180%; - font-weight: bold; - - margin: 1em 0 1em 0; -} - -h2 -{ - font-size: 140%; - padding: 5px; - border-bottom: 1px solid #a0c0f0; - color: #2B7CE9; -} - -h3 -{ - font-size: 100%; -} - -hr -{ - border: none 0; - border-top: 1px solid #a0c0f0; - height: 1px; -} - -pre.code -{ - display: block; - padding: 8px; - border: 1px dashed #ccc; -} - -table -{ - border-collapse: collapse; -} - -th, td -{ - font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; - text-align: left; - vertical-align: top; - /*border: 1px solid #888;*/ - padding: 3px; -} - -th -{ - font-weight: bold; -} - - -textarea { - width: 500px; - height: 200px; - border: 1px solid #888; -} - -input[type=text] { - border: 1px solid #888; -} - -#datasourceText, #googlespreadsheetText { - width: 500px; - -} - -.info { - color: gray; -} - -a { - color: gray; -} -a:hover { - color: red; -} - - -#graph { - width: 100%; - height: 600px; -} diff --git a/www/lib/vis/examples/graph3d/playground/playground.js b/www/lib/vis/examples/graph3d/playground/playground.js deleted file mode 100644 index a2e28728..00000000 --- a/www/lib/vis/examples/graph3d/playground/playground.js +++ /dev/null @@ -1,545 +0,0 @@ - -var query = null; - - -function load() { - selectDataType(); - - loadCsvExample(); - loadJsonExample(); - loadJavascriptExample(); - loadGooglespreadsheetExample(); - loadDatasourceExample(); - - draw(); -} - - - -/** - * Upate the UI based on the currently selected datatype - */ -function selectDataType() { -} - - -function round(value, decimals) { - return parseFloat(value.toFixed(decimals)); -} - -function loadCsvExample() { - var csv = ""; - - // headers - csv += '"x", "y", "value"\n'; - - // create some nice looking data with sin/cos - var steps = 30; - 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 = Math.sin(x/50) * Math.cos(y/50) * 50 + 50; - - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(value, 2) + '\n'; - } - } - - document.getElementById("csvTextarea").innerHTML = csv; - - // also adjust some settings - document.getElementById("style").value = "surface"; - document.getElementById("verticalRatio").value = "0.5"; - - document.getElementById("xLabel").value = "x"; - document.getElementById("yLabel").value = "y"; - document.getElementById("zLabel").value = "value"; - document.getElementById("filterLabel").value = ""; - document.getElementById("legendLabel").value = ""; - drawCsv(); -} - - -function loadCsvAnimationExample() { - var csv = ""; - - // headers - csv += '"x", "y", "value", "time"\n'; - - // create some nice looking data with sin/cos - var steps = 20; - var axisMax = 314; - var tMax = 31; - var axisStep = axisMax / steps; - for (var t = 0; t < tMax; t++) { - for (var x = 0; x < axisMax; x+=axisStep) { - for (var y = 0; y < axisMax; y+=axisStep) { - var value = Math.sin(x/50 + t/10) * Math.cos(y/50 + t/10) * 50 + 50; - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(value, 2) + ', ' + t + '\n'; - } - } - } - - document.getElementById("csvTextarea").innerHTML = csv; - - // also adjust some settings - document.getElementById("style").value = "surface"; - document.getElementById("verticalRatio").value = "0.5"; - document.getElementById("animationInterval").value = 100; - - document.getElementById("xLabel").value = "x"; - document.getElementById("yLabel").value = "y"; - document.getElementById("zLabel").value = "value"; - document.getElementById("filterLabel").value = "time"; - document.getElementById("legendLabel").value = ""; - - drawCsv(); -} - - -function loadCsvLineExample() { - var csv = ""; - - // headers - csv += '"sin(t)", "cos(t)", "t"\n'; - - // create some nice looking data with sin/cos - var steps = 100; - var axisMax = 314; - var tmax = 4 * 2 * Math.PI; - var axisStep = axisMax / steps; - for (t = 0; t < tmax; t += tmax / steps) { - var r = 1; - var x = r * Math.sin(t); - var y = r * Math.cos(t); - var z = t; - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(z, 2) + '\n'; - } - - document.getElementById("csvTextarea").innerHTML = csv; - - // also adjust some settings - document.getElementById("style").value = "line"; - document.getElementById("verticalRatio").value = "1.0"; - document.getElementById("showPerspective").checked = false; - - document.getElementById("xLabel").value = "sin(t)"; - document.getElementById("yLabel").value = "cos(t)"; - document.getElementById("zLabel").value = "t"; - document.getElementById("filterLabel").value = ""; - document.getElementById("legendLabel").value = ""; - - drawCsv(); -} - -function loadCsvMovingDotsExample() { - var csv = ""; - - // headers - csv += '"x", "y", "z", "color value", "time"\n'; - - // create some shortcuts to math functions - var sin = Math.sin; - var cos = Math.cos; - var pi = Math.PI; - - // create the animation data - var tmax = 2.0 * pi; - var tstep = tmax / 75; - var dotCount = 1; // set this to 1, 2, 3, 4, ... - for (var t = 0; t < tmax; t += tstep) { - var tgroup = parseFloat(t.toFixed(2)); - var value = t; - - // a dot in the center - var x = 0; - var y = 0; - var z = 0; - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(z, 2) + ', ' + round(value, 2)+ ', ' + round(tgroup, 2) + '\n'; - - // one or multiple dots moving around the center - for (var dot = 0; dot < dotCount; dot++) { - var tdot = t + 2*pi * dot / dotCount; - //data.addRow([sin(tdot), cos(tdot), sin(tdot), value, tgroup]); - //data.addRow([sin(tdot), -cos(tdot), sin(tdot + tmax*1/2), value, tgroup]); - - var x = sin(tdot); - var y = cos(tdot); - var z = sin(tdot); - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(z, 2) + ', ' + round(value, 2)+ ', ' + round(tgroup, 2) + '\n'; - - var x = sin(tdot); - var y = -cos(tdot); - var z = sin(tdot + tmax*1/2); - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(z, 2) + ', ' + round(value, 2)+ ', ' + round(tgroup, 2) + '\n'; - - } - } - - document.getElementById("csvTextarea").innerHTML = csv; - - // also adjust some settings - document.getElementById("style").value = "dot-color"; - document.getElementById("verticalRatio").value = "1.0"; - document.getElementById("animationInterval").value = "35"; - document.getElementById("animationAutoStart").checked = true; - document.getElementById("showPerspective").checked = true; - - document.getElementById("xLabel").value = "x"; - document.getElementById("yLabel").value = "y"; - document.getElementById("zLabel").value = "z"; - document.getElementById("filterLabel").value = "time"; - document.getElementById("legendLabel").value = "color value"; - - drawCsv(); -} - -function loadCsvColoredDotsExample() { - var csv = ""; - - // headers - csv += '"x", "y", "z", "distance"\n'; - - // create some shortcuts to math functions - var sqrt = Math.sqrt; - var pow = Math.pow; - var random = Math.random; - - // create the animation data - var imax = 200; - for (var i = 0; i < imax; i++) { - var x = pow(random(), 2); - var y = pow(random(), 2); - var z = pow(random(), 2); - var dist = sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2)); - - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(z, 2) + ', ' + round(dist, 2)+ '\n'; - } - - document.getElementById("csvTextarea").innerHTML = csv; - - // also adjust some settings - document.getElementById("style").value = "dot-color"; - document.getElementById("verticalRatio").value = "1.0"; - document.getElementById("showPerspective").checked = true; - - document.getElementById("xLabel").value = "x"; - document.getElementById("yLabel").value = "y"; - document.getElementById("zLabel").value = "value"; - document.getElementById("legendLabel").value = "distance" - document.getElementById("filterLabel").value = ""; - - drawCsv(); -} - -function loadCsvSizedDotsExample() { - var csv = ""; - - // headers - csv += '"x", "y", "z", "range"\n'; - - // create some shortcuts to math functions - var sqrt = Math.sqrt; - var pow = Math.pow; - var random = Math.random; - - // create the animation data - var imax = 200; - for (var i = 0; i < imax; i++) { - var x = pow(random(), 2); - var y = pow(random(), 2); - var z = pow(random(), 2); - var dist = sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2)); - var range = sqrt(2) - dist; - - csv += round(x, 2) + ', ' + round(y, 2) + ', ' + round(z, 2) + ', ' + round(range, 2)+ '\n'; - } - - document.getElementById("csvTextarea").innerHTML = csv; - - // also adjust some settings - document.getElementById("style").value = "dot-size"; - document.getElementById("verticalRatio").value = "1.0"; - document.getElementById("showPerspective").checked = true; - - document.getElementById("xLabel").value = "x"; - document.getElementById("yLabel").value = "y"; - document.getElementById("zLabel").value = "z"; - document.getElementById("legendLabel").value = "range"; - document.getElementById("filterLabel").value = ""; - - drawCsv(); -} - - -function loadJsonExample() { -} - - -function loadJavascriptExample() { -} - -function loadJavascriptFunctionExample() { -} - -function loadGooglespreadsheetExample() { - -} - - -function loadDatasourceExample() { -} - - - -/** - * Retrieve teh currently selected datatype - * @return {string} datatype - */ -function getDataType() { - return "csv"; -} - - -/** - * Retrieve the datatable from the entered contents of the csv text - * @param {boolean} [skipValue] | if true, the 4th element is a filter value - * @return {vis DataSet} - */ -function getDataCsv() { - var csv = document.getElementById("csvTextarea").value; - - // parse the csv content - var csvArray = csv2array(csv); - - var data = new vis.DataSet(); - - var skipValue = false; - if (document.getElementById("filterLabel").value != "" && document.getElementById("legendLabel").value == "") { - skipValue = true; - } - - // read all data - for (var row = 1; row < csvArray.length; row++) { - if (csvArray[row].length == 4 && skipValue == false) { - data.add({x:parseFloat(csvArray[row][0]), - y:parseFloat(csvArray[row][1]), - z:parseFloat(csvArray[row][2]), - style:parseFloat(csvArray[row][3])}); - } - else if (csvArray[row].length == 4 && skipValue == true) { - data.add({x:parseFloat(csvArray[row][0]), - y:parseFloat(csvArray[row][1]), - z:parseFloat(csvArray[row][2]), - filter:parseFloat(csvArray[row][3])}); - } - else if (csvArray[row].length == 5) { - data.add({x:parseFloat(csvArray[row][0]), - y:parseFloat(csvArray[row][1]), - z:parseFloat(csvArray[row][2]), - style:parseFloat(csvArray[row][3]), - filter:parseFloat(csvArray[row][4])}); - } - else { - data.add({x:parseFloat(csvArray[row][0]), - y:parseFloat(csvArray[row][1]), - z:parseFloat(csvArray[row][2]), - style:parseFloat(csvArray[row][2])}); - } - } - - return data; -} - -/** - * remove leading and trailing spaces - */ -function trim(text) { - while (text.length && text.charAt(0) == ' ') - text = text.substr(1); - - while (text.length && text.charAt(text.length-1) == ' ') - text = text.substr(0, text.length-1); - - return text; -} - -/** - * Retrieve the datatable from the entered contents of the javascript text - * @return {vis Dataset} - */ -function getDataJson() { - var json = document.getElementById("jsonTextarea").value; - var data = new google.visualization.DataTable(json); - - return data; -} - - -/** - * Retrieve the datatable from the entered contents of the javascript text - * @return {vis Dataset} - */ -function getDataJavascript() { - var js = document.getElementById("javascriptTextarea").value; - - eval(js); - - return data; -} - - -/** - * Retrieve the datatable from the entered contents of the datasource text - * @return {vis Dataset} - */ -function getDataDatasource() { -} - -/** - * Retrieve a JSON object with all options - */ -function getOptions() { - return { - width: document.getElementById("width").value, - height: document.getElementById("height").value, - style: document.getElementById("style").value, - showAnimationControls: (document.getElementById("showAnimationControls").checked != false), - showGrid: (document.getElementById("showGrid").checked != false), - showPerspective: (document.getElementById("showPerspective").checked != false), - showLegend: (document.getElementById("showLegend").checked != false), - showShadow: (document.getElementById("showShadow").checked != false), - keepAspectRatio: (document.getElementById("keepAspectRatio").checked != false), - verticalRatio: document.getElementById("verticalRatio").value, - animationInterval: document.getElementById("animationInterval").value, - xLabel: document.getElementById("xLabel").value, - yLabel: document.getElementById("yLabel").value, - zLabel: document.getElementById("zLabel").value, - filterLabel: document.getElementById("filterLabel").value, - legendLabel: document.getElementById("legendLabel").value, - animationPreload: (document.getElementById("animationPreload").checked != false), - animationAutoStart:(document.getElementById("animationAutoStart").checked != false), - - xCenter: Number(document.getElementById("xCenter").value) || undefined, - yCenter: Number(document.getElementById("yCenter").value) || undefined, - - xMin: Number(document.getElementById("xMin").value) || undefined, - xMax: Number(document.getElementById("xMax").value) || undefined, - xStep: Number(document.getElementById("xStep").value) || undefined, - yMin: Number(document.getElementById("yMin").value) || undefined, - yMax: Number(document.getElementById("yMax").value) || undefined, - yStep: Number(document.getElementById("yStep").value) || undefined, - zMin: Number(document.getElementById("zMin").value) || undefined, - zMax: Number(document.getElementById("zMax").value) || undefined, - zStep: Number(document.getElementById("zStep").value) || undefined, - - valueMin: Number(document.getElementById("valueMin").value) || undefined, - valueMax: Number(document.getElementById("valueMax").value) || undefined, - - xBarWidth: Number(document.getElementById("xBarWidth").value) || undefined, - yBarWidth: Number(document.getElementById("yBarWidth").value) || undefined - }; -} - -/** - * Redraw the graph with the entered data and options - */ -function draw() { - return drawCsv(); -} - - -function drawCsv() { - // retrieve data and options - var data = getDataCsv(); - var options = getOptions(); - - // Creat a graph - var graph = new vis.Graph3d(document.getElementById('graph'), data, options); -} - -function drawJson() { - // retrieve data and options - var data = getDataJson(); - var options = getOptions(); - - // Creat a graph - var graph = new vis.Graph3d(document.getElementById('graph'), data, options); -} - -function drawJavascript() { - // retrieve data and options - var data = getDataJavascript(); - var options = getOptions(); - - // Creat a graph - var graph = new vis.Graph3d(document.getElementById('graph'), data, options); -} - - -function drawGooglespreadsheet() { - // Instantiate our graph object. - drawGraph = function(response) { - document.getElementById("draw").disabled = ""; - - if (response.isError()) { - error = 'Error: ' + response.getMessage(); - document.getElementById('graph').innerHTML = - "" + error + ""; ; - } - - // retrieve the data from the query response - data = response.getDataTable(); - - // specify options - options = getOptions(); - - // Instantiate our graph object. - var graph = new vis.Graph3d(document.getElementById('graph'), data, options); - } - - url = document.getElementById("googlespreadsheetText").value; - document.getElementById("draw").disabled = "disabled"; - - // send the request - query && query.abort(); - query = new google.visualization.Query(url); - query.send(drawGraph); -} - - -function drawDatasource() { - // Instantiate our graph object. - drawGraph = function(response) { - document.getElementById("draw").disabled = ""; - - if (response.isError()) { - error = 'Error: ' + response.getMessage(); - document.getElementById('graph').innerHTML = - "" + error + ""; ; - } - - // retrieve the data from the query response - data = response.getDataTable(); - - // specify options - options = getOptions(); - - // Instantiate our graph object. - var graph = new vis.Graph3d(document.getElementById('graph'), data, options); - }; - - url = document.getElementById("datasourceText").value; - document.getElementById("draw").disabled = "disabled"; - - // if the entered url is a google spreadsheet url, replace the part - // "/ccc?" with "/tq?" in order to retrieve a neat data query result - if (url.indexOf("/ccc?")) { - url.replace("/ccc?", "/tq?"); - } - - // send the request - query && query.abort(); - query = new google.visualization.Query(url); - query.send(drawGraph); -} diff --git a/www/lib/vis/examples/graph3d/playground/prettify/lang-apollo.js b/www/lib/vis/examples/graph3d/playground/prettify/lang-apollo.js deleted file mode 100644 index bfc0014c..00000000 --- a/www/lib/vis/examples/graph3d/playground/prettify/lang-apollo.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, -null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]) \ No newline at end of file diff --git a/www/lib/vis/examples/graph3d/playground/prettify/lang-css.js b/www/lib/vis/examples/graph3d/playground/prettify/lang-css.js deleted file mode 100644 index 61157f38..00000000 --- a/www/lib/vis/examples/graph3d/playground/prettify/lang-css.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\u000c"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], -["com",/^(?: