Language
ログイン
言語設定
X
English
日本語 [Japanese]
アプリの説明へ
工場出荷額ピボットテーブル
いいね!
3
Loading...
/* 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["id"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s820i#classification"){ tmp_data["Classification"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s820i#year"){ tmp_data["Year"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s820i#Number%20of%20establishments"){ tmp_data["NumOfEstablishments"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s820i#Number%20of%20employees"){ tmp_data["NumOfEmployees"] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s820i#hipment%20value"){ tmp_data["HipmentValue"] = objValue; } }); }); tmp_a_data.push(tmp_data); }); }); }); //全データ all_data = tmp_a_data; var derivers = $.pivotUtilities.derivers; $("#output").pivotUI(all_data, { rows: ["Classification"], cols: ["Year"], vals:["NumOfEstablishments"], aggregatorName:"sum", effectsName: "Heatmap" }); }; 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; font-size: 8pt; padding: 5px; } table.pvtTable .pvtColLabel {text-align: center;} table.pvtTable .pvtTotalLabel {text-align: right;} table.pvtTable tr td { color: #3D3D3D; padding: 5px; background-color: #FFF; border: 1px solid #CDCDCD; vertical-align: top; text-align: right; } .pvtTotal, .pvtGrandTotal { font-weight: bold; } .pvtAxisContainer { border: 1px solid gray; background: #EEE; padding: 5px; min-width: 20px; min-height: 20px; } .pvtAxisContainer li { margin: 5px; padding: 5px; list-style-type: none; cursor:move; } .pvtHorizList li { display: inline; }
<div id="output" style="margin: 30px;"></div>
実行画面
入力データ
概要
保存した実行結果
データ作品
テーブルデータ
028 眼鏡・繊維・漆器の現況
作者:鯖江市役所(めがねのまち鯖江)
更新日:2016年1月20日
714 ダウンロード, 2 アプリケーション
Industrial_shipments
データ作品を追加する
Link http://app.linkdata.org/run/app1s406i?tab=readme
Initial content
http://code.jquery.com/jquery-1.8.3.min.js
jquery-ui-1.9.2custom.min.js
pivot.js
Work
追加
クリア
insert work id or work name.