123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>T-Viz (Trust Visualisation)</title>
- <script type="text/javascript" src="CertainTrust.js"></script>
- <script type="text/javascript" src="certainTrustTViz.js"></script>
- <link rel="stylesheet" type="text/css" href="certainTrustTViz.css" />
- <script type="text/javascript" src="certainTrustHTI.js"></script>
- <link rel="stylesheet" type="text/css" href="certainTrustHTI.css" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <style>
- #certaintrust-tviz-2, #certaintrust-tviz-3 {
- float: left;
- }
- </style>
- </head>
- <body>
- <h1>T-Viz (Trust Visualisation)</h1>
- <div id="mytest"></div>
- <script type="text/javascript">
- var allcts = [
- [
- new CertainTrustSimple("Lage", 0.139, 0.943, 0.1),
- new CertainTrustSimple("Essen", 0.8, 0.4, 0.75)
- ], [
- new CertainTrust("A", 0.7, 0.5, 0.1, 5),
- new CertainTrust("B", 0.4, 0.8, 0.75, 5),
- new CertainTrust("C", 0.1, 0.1, 0.55, 5),
- new CertainTrust("D", 0.6, 0.4, 0.25, 5),
- new CertainTrust("E", 0.9, 0.1, 0.50, 5),
- new CertainTrust("F", 0.1, 0.9, 0.10, 5),
- /*
- new CertainTrust("G", 0.7, 0.5, 0.1, 5),
- new CertainTrust("H", 0.4, 0.8, 0.75, 5),
- new CertainTrust("I", 0.1, 0.1, 0.95, 5),
- new CertainTrust("J", 0.6, 0.4, 0.25, 5),
- new CertainTrust("K", 0.9, 0.1, 0.50, 5),
- new CertainTrust("L", 0.5, 0.9, 0.10, 5),
- new CertainTrust("M", 0.7, 0.5, 0.1, 5),
- new CertainTrust("N", 0.4, 0.8, 0.75, 5),
- new CertainTrust("O", 0.9, 0.9, 0.95, 5),
- new CertainTrust("P", 0.6, 0.4, 0.25, 5),
- new CertainTrust("Q", 0.9, 0.7, 0.50, 5),
- new CertainTrust("R", 0.3, 0.6, 0.10, 5),
- new CertainTrust("S", 0.7, 0.5, 0.1, 5),
- new CertainTrust("T", 0.4, 0.8, 0.75, 5),
- new CertainTrust("U", 0.1, 0.1, 0.55, 5),
- new CertainTrust("V", 0.6, 0.6, 0.25, 5),
- new CertainTrust("W", 0.9, 0.3, 0.50, 5),
- new CertainTrust("X", 0.6, 0.9, 0.70, 5),
- new CertainTrust("Y", 0.7, 0.5, 0.1, 5),
- new CertainTrust("Z", 0.4, 0.8, 0.75, 5),
- //*/
- ]
- ];
- // beware, reversed order!
- new CertainTrustTViz(allcts[1], { canvas: { height: 200, width: 200 }, middle: 'AND' });
- new CertainTrustTViz(allcts[0], { canvas: { height: 200, width: 200 }, middle: 'NONE' });
- new CertainTrustTViz(allcts[1]);
- new CertainTrustTViz(allcts[0], { middle: function(indata) { return (indata[0].getExpectation() < 0.5) ? ":(" : ":)"; },
- onClick: function(certainTrust) {
- if (certainTrust.getName() === "Lage") document.location = 'https://en.wikipedia.org/wiki/Location_%28geography%29';
- else if (certainTrust.getName() === "Essen") alert("Anything is good if it's made of chocolate.");
- } });
- </script>
- <div style="clear:both;"></div>
- <script type="text/javascript">
- new CertainTrustHTI(allcts[1][5]);
- new CertainTrustHTI(allcts[0][1]);
- new CertainTrustHTI(allcts[0][0]);
- </script>
- <a href="javascript:CertainTrustTVizElement.ByNr(3).add(new CertainTrust('Trinken', 0.5, 0.8, 0.6, 10));">ADD Trinken</a>
- <a href="javascript:CertainTrustTVizElement.ByNr(3).remove('Trinken');">DEL Trinken</a>
- </body>
- </html>
|