summaryrefslogtreecommitdiff
path: root/www/lib/vis/examples/graph3d/playground/index.html
blob: 134bb2647d63806cdaa9a346a47e104199535667 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!doctype html>
<html>

<head>
    <title>Graph 3D - Playground</title>

    <script type="text/javascript" src="../../../dist/vis.js"></script>

    <script type="text/javascript" src="playground.js"></script>
    <script type="text/javascript" src="csv2array.js"></script>
    <link rel='stylesheet' href='playground.css' type='text/css'>

    <script type="text/javascript">
        // Called when the Visualization API is loaded.
        function drawVisualization() {
            // TODO
        }
    </script>
    <script src="../../googleAnalytics.js"></script>
</head>

<body onload="load();">

<h1>Graph 3D - Playground</h1>

<table style="width:100%;">
<col width="50%">
<col width="50%">

<tr>
    <td>
        <h2>Data</h2>
        <p>
            Graph 3D expects a data table with first three to five columns:
            colums <code>x</code>, <code>y</code>, <code>z</code> (optional),
            <code>style</code>, <code>filter</code> (optional).
        </p>

        <table>
            <tr>
                <td style="white-space: nowrap">
                    <input type="radio" name="datatype" id="datatypeCsv" onclick="selectDataType();" checked value="csv">Csv
                </td>
                <td>
                    <div id="csv">
                        <textarea id="csvTextarea"></textarea>
                        <p>
                            <a href="javascript: loadCsvExample();" title="Load an example">Simple example</a>
                            <a href="javascript: loadCsvLineExample();" title="Load an example">Line example</a>
                            <a href="javascript: loadCsvAnimationExample();" title="Load an example">Animation example</a>
                            <a href="javascript: loadCsvMovingDotsExample();" title="Load an example">Moving dots example</a>
                            <a href="javascript: loadCsvColoredDotsExample();" title="Load an example">Colored dots example</a>
                            <a href="javascript: loadCsvSizedDotsExample();" title="Load an example">Sized dots example</a>
                        </p>
                    </div>
                </td>
            </tr>
          <!-- TODO: add JSON examples -->
        </table>

        <br>
    </td>
    <td rowspan=2>
        <h2>Graph</h2>
        <p>
            <input type="button" value="Draw graph" onclick="draw();" id="draw">
        </p>

        <div id="graph"></div>
    </td>
</tr>
<tr>
    <td>
        <h2>Options</h2>

        <table>
            <tr>
                <th>Option</th>
                <th>Value</th>
            </tr>

            <tr>
                <td>width</td>
                <td><input type="text" id="width" value="100%" /> <span class="info">for example "500px" or "100%"</span></td>
            </tr>
            <tr>
                <td>height</td>
                <td><input type="text" id="height" value="100%" /> <span class="info">for example "500px" or "100%"</span></td>
            </tr>
            <tr>
                <td>style</td>
                <td>
                    <select id="style">
                        <option value="bar" >bar
                        <option value="bar-color" >bar-color
                        <option value="bar-size" >bar-size
                        <option value="dot" >dot
                        <option value="dot-color" >dot-color
                        <option value="dot-size" >dot-size
                        <option value="dot-line" >dot-line
                        <option value="line" >line
                        <option value="grid" >grid
                        <option value="surface" selected>surface
                    </select>
            </tr>

            <tr>
                <td>showAnimationControls</td>
                <td><input type="checkbox" id="showAnimationControls" checked /></td>
            </tr>
            <tr>
                <td>showGrid</td>
                <td><input type="checkbox" id="showGrid" checked /></td>
            </tr>
            <tr>
                <td>showPerspective</td>
                <td><input type="checkbox" id="showPerspective" checked /></td>
            </tr>
            <tr>
                <td>showLegend</td>
                <td><input type="checkbox" id="showLegend" checked /></td>
            </tr>
            <tr>
                <td>showShadow</td>
                <td><input type="checkbox" id="showShadow" /></td>
            </tr>

            <tr>
                <td>keepAspectRatio</td>
                <td><input type="checkbox" id="keepAspectRatio" checked /></td>
            </tr>
            <tr>
                <td>verticalRatio</td>
                <td><input type="text" id="verticalRatio" value="0.5" /> <span class="info">a value between 0.1 and 1.0</span></td>
            </tr>

            <tr>
                <td>animationInterval</td>
                <td><input type="text" id="animationInterval" value="1000" /> <span class="info">in milliseconds</span></td>
            </tr>
            <tr>
                <td>animationPreload</td>
                <td><input type="checkbox" id="animationPreload" /></td>
            </tr>
            <tr>
                <td>animationAutoStart</td>
                <td><input type="checkbox" id="animationAutoStart" /></td>
            </tr>

            <tr><td>xCenter</td><td><input type="text" id="xCenter" value="55%" /></td></tr>
            <tr><td>yCenter</td><td><input type="text" id="yCenter" value="45%" /></td></tr>

            <tr><td>xMin</td><td><input type="text" id="xMin" /></td></tr>
            <tr><td>xMax</td><td><input type="text" id="xMax" /></td></tr>
            <tr><td>xStep</td><td><input type="text" id="xStep" /></td></tr>

            <tr><td>yMin</td><td><input type="text" id="yMin" /></td></tr>
            <tr><td>yMax</td><td><input type="text" id="yMax" /></td></tr>
            <tr><td>yStep</td><td><input type="text" id="yStep" /></td></tr>

            <tr><td>zMin</td><td><input type="text" id="zMin" /></td></tr>
            <tr><td>zMax</td><td><input type="text" id="zMax" /></td></tr>
            <tr><td>zStep</td><td><input type="text" id="zStep" /></td></tr>

            <tr><td>valueMin</td><td><input type="text" id="valueMin" /></td></tr>
            <tr><td>valueMax</td><td><input type="text" id="valueMax" /></td></tr>

            <tr><td>xBarWidth</td><td><input type="text" id="xBarWidth" /></td></tr>
            <tr><td>yBarWidth</td><td><input type="text" id="yBarWidth" /></td></tr>

            <tr><td>xLabel</td><td><input type="text" id="xLabel" value="x"/></td></tr>
            <tr><td>yLabel</td><td><input type="text" id="yLabel" value="y"/></td></tr>
            <tr><td>zLabel</td><td><input type="text" id="zLabel" value="z"/></td></tr>
            <tr><td>filterLabel</td><td><input type="text" id="filterLabel" value="time"/></td></tr>
            <tr><td>legendLabel</td><td><input type="text" id="legendLabel" value="value"/></td></tr>

        </table>

    </td>
</tr>
</table>

</body>