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
/*
This is a Example program to retrieve and display the data.
Press the Run button on the right of the screen (described the behavior of the Example program below).
Please create a new application rewrite this program work.
*/
var all_data;
function initialize(){
all_data = new Array();
// データをLinkDataから取得
tmp_a_data = new Array();
$.each(LinkData.getWorks(), function(workKey, workValue) {
$.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
$.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) {
var tmp_data = {}
//tmp_data["id"] = subjValue;
$.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) {
$.each(LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objKey, objValue) {
if(propValue == "http://www.w3.org/2000/01/rdf-schema#label"){
tmp_data["区"] = objValue;
}else if(propValue == "http://linkdata.org/property/rdf1s831i#%E6%8A%95%E7%A5%A8%E6%97%A5"){
tmp_data["投票日"] = objValue;
}else if(propValue == "http://xmlns.com/foaf/0.1/gender"){
tmp_data["性別"] = objValue;
}else if(propValue == "http://linkdata.org/property/rdf1s831i#%E6%9C%89%E6%A8%A9%E8%80%85%E6%95%B0"){
tmp_data["有権者数"] = objValue;
}else if(propValue == "http://linkdata.org/property/rdf1s831i#%E6%8A%95%E7%A5%A8%E8%80%85%E6%95%B0"){
tmp_data["投票者数"] = objValue;
}
});
tmp_a_data.push(tmp_data);
//全データ
all_data = tmp_a_data;
//$.getScript("pivot.js", function(){ //2013.07.08 changed
var derivers = $.pivotUtilities.derivers;
$("#output").pivotUI(all_data, {
//derivedAttributes: {
// "num_tohyosya Bin": derivers.bin("num_tohyosya", 100)
//},
rows: ["区"],
cols: ["投票日"],
vals:["投票者数"],
aggregatorName:"count",
effectsName: "Heatmap"
//}); //2013.07.08 changed
};
window.onload = function() {
$(function(){
initialize();
table.pvtTable {
font-family:arial;
font-size: 8pt;
text-align: left;
border-collapse: collapse;
table.pvtTable tr th, table.pvtTable tr th {
background-color: #e6EEEE;
border: 1px solid #CDCDCD;
padding: 5px;
table.pvtTable .pvtColLabel {text-align: center;}
table.pvtTable .pvtTotalLabel {text-align: right;}
table.pvtTable tr td {
color: #3D3D3D;
background-color: #FFF;
vertical-align: top;
text-align: right;
.pvtTotal, .pvtGrandTotal { font-weight: bold; }
.pvtAxisContainer {
border: 1px solid gray;
background: #EEE;
min-width: 20px;
min-height: 20px;
.pvtAxisContainer li {
margin: 5px;
list-style-type: none;
cursor:move;
.pvtHorizList li { display: inline; }
<div id="output" style="margin: 30px;"></div>
Click the Browse button or drag and drop to choose files to upload
The Maximum upload size is 1MB.(bmp,gif,jpeg,jpg,png)
*Required field
Add name for another language
You can upload jpg, gif, png file formats
Add description for another language
Fork original application has been updated. >>see
Original application has been updated. >>see
Playing...
Please enter a valid URL