/* * @Description: [] * @Author: Iseven Monkey * @Date: 2023-10-17 06:08:53 * @LastEditors: Iseven Monkey * @LastEditTime: 2023-10-18 01:28:37 */ $(function () { $("#loading").fadeOut(500); //鐩戝惉婊氬姩鏉 var $nav = $(".header-navbar"); var $navLink = $nav.find(".nav-item"); $navLink.eq(0).addClass("active"); var $headeerTop = $(".header-top"); var $scrollup = $(".scrollup"); /* if ($(window).scrollTop() > 0) { $(".header-navbar").addClass("header-navbar-bg"); $headeerTop.slideUp(500); } else { $(".header-navbar").removeClass("header-navbar-bg"); $headeerTop.slideDown(500); } $(window).scroll(function () { //濡傛灉婊氬姩鏉$殑浣嶇疆澶т簬绛変簬100 if ($(window).scrollTop() > 0) { $(".header-navbar").addClass("header-navbar-bg"); $headeerTop.slideUp(500); } else { $(".header-navbar").removeClass("header-navbar-bg"); $headeerTop.slideDown(500); } //濡傛灉婊氬姩鏉$殑浣嶇疆澶т簬绛変簬500 if ($(window).scrollTop() > 500) { $scrollup.fadeIn(); } //濡傛灉婊氬姩鏉$殑浣嶇疆灏忎簬500 else { $scrollup.fadeOut(); } }); */ $(window).scroll(function () { if ($(this).scrollTop() > 300) { $(".sticky-top").addClass("bg-white shadow-sm").css("top", "-1px"); } else { $(".sticky-top").removeClass("bg-white shadow-sm").css("top", "-100px"); } }); //鐩戝惉鐐瑰嚮浜嬩欢 $scrollup.click(function () { $("html,body").animate({ scrollTop: 0 }, 500); }); console.log('document.getElementById("line-chart")', document.getElementById("line-chart")); var lineChart = echarts.init(document.getElementById("line-chart")); // 璁剧疆鍥捐〃閰嶇疆椤瑰拰鏁版嵁 var lineChartOption = { tooltip: {}, grid: { containLabel: true, left: "2%", right: "5%", bottom: "2%", top: "10%", }, xAxis: { type: "category", boundaryGap: false, axisLine: { show: false, }, axisTick: { show: false, }, axisLabel: { interval: 4, }, splitLine: { show: true, }, data: [ "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", ], }, yAxis: { type: "value", }, series: [ { name: "", type: "line", lineStyle: { normal: { color: "#6eb938", shadowBlur: 10, // 闃村奖妯$硦搴 shadowColor: "#6eb938", // 闃村奖棰滆壊 }, }, symbolSize: 6, // 鎷愮偣澶у皬 symbol: "circle", // 鎷愮偣鏍峰紡 itemStyle: { normal: { color: "#6eb938", lineStyle: { color: "#6eb938", }, }, }, label: { show: true, color: "#fff", position: "right", formatter: function (params) { return params.value; }, }, data: [ null, null, null, null, null, null, 1, // 2001 { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, 1, // 2011 { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, { value: 1, symbolSize: 0, label: { show: false, }, }, 1, // 2015 2, 3, 3, 7, 16, 22, 28, ], }, ], }; // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃 lineChart.setOption(lineChartOption); //楗煎浘 var pieChart = echarts.init(document.getElementById("pie-chart")); var pieChartption = { series: [ { type: "pie", label: { normal: { formatter: "{b}锛歿d}%", }, }, data: [ { value: 10.12, name: "鍦版柟鏍囧噯" }, { value: 64.76, name: "鍥綋鏍囧噯" }, { value: 6.7, name: "琛屼笟鏍囧噯" }, { value: 18.42, name: "鍥藉鏍囧噯" }, ], }, ], }; pieChart.setOption(pieChartption); });