From fa141ffda5d56cd106cab5d03e6d410fa8572e64 Mon Sep 17 00:00:00 2001 From: whycq <whycq> Date: 星期三, 08 十二月 2021 16:38:42 +0800 Subject: [PATCH] # --- static/js/app.js | 4 views/index.html | 149 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 3 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index efbbbda..e8dedd1 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -124,7 +124,7 @@ } this.initStats = function () { this.stats = new Stats(); - this.dom.appendChild( this.stats.dom ); + // this.dom.appendChild( this.stats.dom ); } this.initBackground = function () { const cubeTextureLoader = new THREE.CubeTextureLoader(); @@ -134,7 +134,7 @@ "posy.jpg", "negy.jpg", "posz.jpg", "negz.jpg" ]); - // this.scene.background = new THREE.Color( 0xf0f0f0 ); + this.scene.background = new THREE.Color( 0x17c5dc ); } this.removeObject = function (nameorid) { for (let i = 0; i < this.objects.length; i++) { diff --git a/views/index.html b/views/index.html index 47adfda..f133137 100644 --- a/views/index.html +++ b/views/index.html @@ -15,10 +15,157 @@ canvas { display: block; } + #sidebar{ + /*瀹氫綅*/ + position: absolute; + top: 50%; + left: 1%; + transform: translateY(-50%); + width: 20%; + height: 95%; + /*鐗规晥*/ + background: rgba(255,255,255,0.3); + border-radius: 5px; + color: #f0f8ff; + } + #sidebar h1{ + font-family: Fantasy; + font-size: 36px; + text-indent: 5%; + } + #baobiao1{ + width: 400px; + height: 300px; + } + + </style> </head> - <body> + <body style="position: relative"> + <div id="sidebar"> + <h1>涓壃-绔嬩綋浠撳簱</h1> + <div id="baobiao1"></div> + + </div> <div id="container"></div> + <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5.2.2/dist/echarts.min.js"></script> + <script type="text/javascript"> + var dom = document.getElementById("baobiao1"); + var myChart = echarts.init(dom); + var app = {}; + + var option; + + option = { + xAxis: { + type: 'category', + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + yAxis: { + type: 'value' + }, + series: [ + { + data: [120, 200, 150, 80, 70, 110, 130], + type: 'bar' + } + ] + }; + + option && myChart.setOption(option); + + + // option = { + // title: { + // text: '骞村害杩�/鍑鸿揣閲�', + // textStyle:{ + // color:'#F8F8FF', + // }, + // subtext: 'Data', + // subtextStyle:{ + // color:'#F8F8FF', + // }, + // show: true, + // + // }, + // textStyle:{ + // color:'#F8F8FF', + // }, + // // subtextStyle:{ + // // color:'#F8F8FF', + // // }, + // // tooltip: { + // // trigger: 'axis' + // // }, + // legend: { + // show:false, + // data: ['杩涜揣', '鍑鸿揣'] + // }, + // toolbox: { + // show: false, + // feature: { + // dataView: { show: true, readOnly: false }, + // magicType: { show: true, type: ['line', 'bar'] }, + // restore: { show: true }, + // saveAsImage: { show: true } + // } + // }, + // calculable: true, + // xAxis: [ + // { + // type: 'category', + // // prettier-ignore + // data: ['涓�鏈�', '浜屾湀', '涓夋湀', '鍥涙湀', '浜旀湀', '鍏湀', '涓冩湀', '鍏湀', '涔濇湀', '鍗佹湀', '鍗佷竴鏈�', '鍗佷簩鏈�'] + // } + // ], + // yAxis: [ + // { + // // show:false, + // type: 'value' + // } + // ], + // series: [ + // { + // name: '杩涜揣', + // type: 'bar', + // data: [ + // 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3 + // ], + // markPoint: { + // data: [ + // { type: 'max', name: 'Max' }, + // { type: 'min', name: 'Min' } + // ] + // }, + // markLine: { + // data: [{ type: 'average', name: 'Avg' }] + // } + // }, + // { + // name: '鍑鸿揣', + // type: 'bar', + // data: [ + // 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 + // ], + // markPoint: { + // data: [ + // { name: 'Max', value: 182.2, xAxis: 7, yAxis: 183 }, + // { name: 'Min', value: 2.3, xAxis: 11, yAxis: 3 } + // ] + // }, + // markLine: { + // data: [{ type: 'average', name: 'Avg' }] + // } + // } + // ], + // + // }; + // + // if (option && typeof option === 'object') { + // myChart.setOption(option); + // } + + </script> <script type="text/javascript" src="../static/js/lib/jquery-3.3.1.min.js"></script> <script type="text/javascript" src="../static/js/common.js"></script> <script type="text/javascript" src="../static/js/data/Warehouse.js"></script> -- Gitblit v1.9.1