当前位置: 首页 > news >正文

wordpress totalpoll网站优化策略分析论文

wordpress totalpoll,网站优化策略分析论文,深圳做网站三网合一,漂亮网站底部代码大屏效果展示 管理员进入数据可视化页面将看到数据可视化大屏。大屏内容包括两个条形图,用于统计当前网站所有用户的MBTI 16型人格分布;玫瑰图,用于展示当前网站用户MBTI四个维度,八个字母的占比;折线图,用…

大屏效果展示

管理员进入数据可视化页面将看到数据可视化大屏。大屏内容包括两个条形图,用于统计当前网站所有用户的MBTI 16型人格分布;玫瑰图,用于展示当前网站用户MBTI四个维度,八个字母的占比;折线图,用于展示当前网站在交友论坛中周一至周如的发言数量;饼图用于展示当前网站用户的男女比例;中间的文字显示屏用于直观展示用户人数、男女比例、最稀有人格、用户活跃时间的信息。数据可视化大屏如下。

设计大屏之前完成echarts引入

 <script src="echarts.js/echarts.min.js"></script>

 大屏框架

<div class="whole">
<header><h1>数据可视化大屏</h1>
</header>
<div class="screen"><div class="left_chart"><div class="left_top" id="chart" ></div><div class="left_bottom" id="chart4"></div></div><div class="middle_chart"><div class="middle_top" ><h3 class="tech-display">用<br>户<br>人<br>数<br><?echo $usernum?></h3><h3 class="tech-display">男<br>女<br>比<br>例<br><?echo $male?>:<?echo $female?></h3><h3 class="tech-display">稀<br>有<br>人<br>格<br><?echo $minMBTI?></h3><h3 class="tech-display">活<br>跃<br>时<br>间<br><?echo $maxDAY?></h3></div><div class="middle_bottom" id="chart1"></div></div><div class="right_chart"><div class="right_top" id="chart2" ></div><div class="right_bottom" id="chart3"></div></div>
</div></div>

大屏css样式

.whole{width: 100%;height: 100%;background: rgba(0, 0, 0, 0.5);
}
.screen{display: flex;justify-content: center;margin-top: 5px;}.left_chart{}
.left_top{border: solid;width: 520px;height: 390px;background: #fff;}
.left_bottom{border: solid;width: 520px;height: 400px;margin-top: 10px;background: #fff;
}.middle_chart{margin-left: 20px;
}
.middle_top{border: solid;width: 520px;height: 190px;background: rgba(0, 0, 0, 0.7);color: #fff;font-family: 'Arial', sans-serif;display: flex;justify-content: center;align-items: center;padding-left: 5px;padding-right: 5px;
}
.middle_top h3{margin-left: 10px;width: 100px;text-align: center;
}
.middle_bottom{border: solid;width: 520px;height: 600px;margin-top: 10px;background: #fff;
}.right_chart{margin-left: 20px;
}
.right_top{border: solid;width: 520px;height: 390px;background: #fff;
}
.right_bottom{border: solid;width: 520px;height: 400px;margin-top: 10px;background: #fff;
}header {background: rgba(0, 0, 0, 0.5);color: white;padding: 1rem;text-align: center;}.tech-display {display: inline-block;font-size: 2em;font-weight: bold;color: #007bff;text-shadow: 0 0 2px #007bff, 0 0 40px #007bff, 0 0 60px #007bff, 0 0 0px #007bff;background: linear-gradient(45deg, #007bff, #0033cc);-webkit-background-clip: text;letter-spacing: 10px;transition: all 0.5s ease-in-out;}.tech-display:hover {transform: scale(1.1);text-shadow: 0 0 20px #007bff, 0 0 40px #007bff, 0 0 60px #007bff, 0 0 80px #007bff;}

数据库数据调用 

<?require "conn.php";// 获取用户mbti性格数量$sql1 = "select * from user where mbti='INTJ'";$result1 = mysqli_query($conn,$sql1);$INTJ = mysqli_num_rows($result1);$sql2 = "select * from user where mbti='INTP'";$result2 = mysqli_query($conn,$sql2);$INTP = mysqli_num_rows($result2);$sql3 = "select * from user where mbti='ENTJ'";$result3 = mysqli_query($conn,$sql3);$ENTJ = mysqli_num_rows($result3);$sql4 = "select * from user where mbti='ENTP'";$result4 = mysqli_query($conn,$sql4);$ENTP = mysqli_num_rows($result4);$sql5 = "select * from user where mbti='INFJ'";$result5 = mysqli_query($conn,$sql5);$INFJ = mysqli_num_rows($result5);$sql6 = "select * from user where mbti='INFP'";$result6 = mysqli_query($conn,$sql6);$INFP = mysqli_num_rows($result6);$sql7 = "select * from user where mbti='ENFJ'";$result7 = mysqli_query($conn,$sql7);$ENFJ = mysqli_num_rows($result7);$sql8 = "select * from user where mbti='ENFP'";$result8 = mysqli_query($conn,$sql8);$ENFP = mysqli_num_rows($result8);$sql9 = "select * from user where mbti='ISTJ'";$result9 = mysqli_query($conn,$sql9);$ISTJ = mysqli_num_rows($result9);$sql10 = "select * from user where mbti='ISFJ'";$result10 = mysqli_query($conn,$sql10);$ISFJ = mysqli_num_rows($result10);$sql11 = "select * from user where mbti='ESTJ'";$result11 = mysqli_query($conn,$sql11);$ESTJ = mysqli_num_rows($result11);$sql12 = "select * from user where mbti='ESFJ'";$result12 = mysqli_query($conn,$sql12);$ESFJ = mysqli_num_rows($result12);$sql13 = "select * from user where mbti='ISTP'";$result13 = mysqli_query($conn,$sql13);$ISTP = mysqli_num_rows($result13);$sql14 = "select * from user where mbti='ISFP'";$result14 = mysqli_query($conn,$sql14);$ISFP = mysqli_num_rows($result14);$sql15 = "select * from user where mbti='ESTP'";$result15 = mysqli_query($conn,$sql15);$ESTP = mysqli_num_rows($result15);$sql16 = "select * from user where mbti='ESFP'";$result16 = mysqli_query($conn,$sql16);$ESFP = mysqli_num_rows($result16);$array = [$INTJ, $INTP,$ENTJ,$ENTP, $INFJ, $INFP, $ENFJ,$ENFP,$ISTJ, $ISFJ, $ESTJ, $ESFJ, $ISTP, $ISFP, $ESTP, $ESFP];$minValue = min($array);if($INTJ==$minValue){$minMBTI = "INTJ";}if($INTP==$minValue){$minMBTI = "INTP";}if($ENTJ==$minValue){$minMBTI = "ENTJ";}if($ENTP==$minValue){$minMBTI = "ENTP";}if($INFJ==$minValue){$minMBTI = "INFJ";}if($INFP==$minValue){$minMBTI = "INFP";}if($ENFJ==$minValue){$minMBTI = "ENFJ";}if($ENFP==$minValue){$minMBTI = "ENFP";}if($ISTJ==$minValue){$minMBTI = "ISTJ";}if($ISFJ==$minValue){$minMBTI = "ISFJ";}if($ESTJ==$minValue){$minMBTI = "ESTJ";}if($ESFJ==$minValue){$minMBTI = "ESFJ";}if($ISTP==$minValue){$minMBTI = "ISTP";}if($ISFP==$minValue){$minMBTI = "ISFP";}if($ESTP==$minValue){$minMBTI = "ESTP";}if($ESFP==$minValue){$minMBTI = "ESFP";}$sql = "select mbti,sex from user";$result = mysqli_query($conn,$sql); $usernum = mysqli_num_rows($result);$all = "";$allsex = "";while($row = mysqli_fetch_array($result)){list($mbti,$sex) = $row;        $all=$all."$mbti";$allsex=$allsex."$sex";}$E = substr_count($all,"E");$I = substr_count($all,"I");$S = substr_count($all,"S");$N = substr_count($all,"N");$T = substr_count($all,"T");$F = substr_count($all,"F");$J = substr_count($all,"J");$P = substr_count($all,"P");$male = substr_count($allsex,"1");$female = substr_count($allsex,"0");//获取周一至周日用户聊天记录数$sqlchat = "select sendtime from comment";$resultchat = mysqli_query($conn,$sqlchat);$MON = 0;$TUE = 0;$WED = 0;$THU = 0;$FRI = 0;$SAT = 0;$SUN = 0;while($rowchat = mysqli_fetch_array($resultchat)){list($week) = $rowchat;$date = date_create_from_format('U', $week);$dayOfWeekEn = date_format($date, 'l');if($dayOfWeekEn=="Monday"){$MON=$MON+1;}if($dayOfWeekEn=="Tuesday"){$TUE=$TUE+1;}if($dayOfWeekEn=="Wednesday"){$WED=$WED+1;}if($dayOfWeekEn=="Thursday"){$THU=$THU+1;}if($dayOfWeekEn=="Friday"){$FRI=$FRI+1;}if($dayOfWeekEn=="Saturday"){$SAT=$SAT+1;}if($dayOfWeekEn=="Sunday"){$SUN=$SUN+1;}}$array1 = [$MON,$TUE,$WED,$THU,$FRI,$SAT,$SUN];$maxValue = max($array1);if($MON==$maxValue){$maxDAY = "周一";}if($TUE==$maxValue){$maxDAY = "周二";}if($WED==$maxValue){$maxDAY = "周三";}if($THU==$maxValue){$maxDAY = "周四";}if($FRI==$maxValue){$maxDAY = "周五";}if($SAT==$maxValue){$maxDAY = "周六";}if($SUN==$maxValue){$maxDAY = "周日";}
?>

可视化大屏图表

<?echo "<script>// 基于准备好的dom,初始化echarts实例var myChart = echarts.init(document.getElementById('chart'));var myChart1 = echarts.init(document.getElementById('chart1'));var myChart2 = echarts.init(document.getElementById('chart2'));var myChart3 = echarts.init(document.getElementById('chart3'));var myChart4 = echarts.init(document.getElementById('chart4'));// 指定图表的配置项和数据//柱状图var option = {title : {text: '16性格用户占比(分析家、外交家)',// 设置标题位置,默认居中left: 'center',// 设置标题样式textStyle: {color: '#333',fontSize: 16,fontWeight: 'bold'},},xAxis: {type: 'category',data: [ 'INTJ', 'INTP', 'ENTJ', 'ENTP', 'INFJ', 'INFP', 'ENFJ', 'ENFP']},yAxis: {type: 'value'},series: [{data: [$INTJ, $INTP,$ENTJ,$ENTP, $INFJ, $INFP, $ENFJ,$ENFP],type: 'bar'}]
};var  option1 = {title : {text: 'MBTI性格分布(八个性格字母)',// 设置标题位置,默认居中left: 'center',// 设置标题样式textStyle: {color: '#333',fontSize: 16,fontWeight: 'bold'},},legend: {top: 'bottom'},toolbox: {show: true,feature: {mark: { show: true },dataView: { show: true, readOnly: false },restore: { show: true },saveAsImage: { show: true }}},series: [{name: 'Nightingale Chart',type: 'pie',radius: [50, 200],center: ['50%', '50%'],roseType: 'area',itemStyle: {borderRadius: 8},data: [{ value: $E, name: 'E外向型' },{ value: $I, name: 'I内向型' },{ value: $S, name: 'S观察型' },{ value: $N, name: 'N直觉型' },{ value: $T, name: 'T理性型' },{ value: $F, name: 'F感受型' },{ value: $J, name: 'J判断型' },{ value: $P, name: 'P展望型' },]}]
};var option2 = {title : {text: '用户活跃度(论坛发言次数)',// 设置标题位置,默认居中left: 'center',// 设置标题样式textStyle: {color: '#333',fontSize: 16,fontWeight: 'bold'},},xAxis: {type: 'category',data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']},yAxis: {type: 'value'},series: [{data: [$MON,$TUE,$WED,$THU,$FRI,$SAT,$SUN],type: 'line',smooth: true}]
};var option3 = {
title : {text: '用户性别占比',// 设置标题位置,默认居中left: 'center',// 设置标题样式textStyle: {color: '#333',fontSize: 16,fontWeight: 'bold'},},tooltip: {trigger: 'item'},legend: {top: '5%',left: 'center'},series: [{name: 'sex',type: 'pie',radius: ['40%', '70%'],avoidLabelOverlap: false,itemStyle: {borderRadius: 10,borderColor: '#fff',borderWidth: 2},label: {show: false,position: 'center'},emphasis: {label: {show: true,fontSize: 40,fontWeight: 'bold'}},labelLine: {show: false},data: [{ value: $male, name: '男性用户' },{ value: $female, name: '女性用户' },]}]
};let dataAxis = ['ISTJ', 'ISFJ', 'ESTJ', 'ESFJ', 'ISTP', 'ISFP', 'ESTP', 'ESFP'];
// prettier-ignore
let data = [$ISTJ, $ISFJ, $ESTJ, $ESFJ, $ISTP, $ISFP, $ESTP, $ESFP];
let yMax = 500;
let dataShadow = [];
for (let i = 0; i < data.length; i++) {dataShadow.push(yMax);
}
var option4 = {title: {text: '16性格用户占比(守护者、探险家)',// 设置标题位置,默认居中left: 'center',// 设置标题样式textStyle: {color: '#333',fontSize: 16,fontWeight: 'bold'},},xAxis: {data: dataAxis,axisLabel: {inside: true,color: '#000',fontSize: 14,},axisTick: {show: false},axisLine: {show: false},z: 10},yAxis: {axisLine: {show: false},axisTick: {show: false},axisLabel: {color: '#999'}},dataZoom: [{type: 'inside'}],series: [{type: 'bar',showBackground: true,itemStyle: {color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#83bff6' },{ offset: 0.5, color: '#188df0' },{ offset: 1, color: '#188df0' }])},emphasis: {itemStyle: {color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#2378f7' },{ offset: 0.7, color: '#2378f7' },{ offset: 1, color: '#83bff6' }])}},data: data}]
};
// Enable data zoom when user click bar.
const zoomSize = 6;
myChart.on('click', function (params) {console.log(dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)]);myChart.dispatchAction({type: 'dataZoom',startValue: dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)],endValue:dataAxis[Math.min(params.dataIndex + zoomSize / 2, data.length - 1)]});
});// 使用刚指定的配置项和数据显示图表。myChart.setOption(option);myChart1.setOption(option1);myChart2.setOption(option2);myChart3.setOption(option3);myChart4.setOption(option4);</script>"?>


文章转载自:
http://dinncovituperatory.ydfr.cn
http://dinncomaltese.ydfr.cn
http://dinncovicugna.ydfr.cn
http://dinncoareographer.ydfr.cn
http://dinncocleithral.ydfr.cn
http://dinncomyth.ydfr.cn
http://dinncohunt.ydfr.cn
http://dinncopopish.ydfr.cn
http://dinncoexosphere.ydfr.cn
http://dinncocasque.ydfr.cn
http://dinncodiphenylacetypene.ydfr.cn
http://dinncocheskey.ydfr.cn
http://dinncobenny.ydfr.cn
http://dinncosolemnise.ydfr.cn
http://dinncoectoskeleton.ydfr.cn
http://dinncohearted.ydfr.cn
http://dinncodryopithecine.ydfr.cn
http://dinncobougainvillaea.ydfr.cn
http://dinncothree.ydfr.cn
http://dinncohepburnian.ydfr.cn
http://dinncointimism.ydfr.cn
http://dinncoexerciser.ydfr.cn
http://dinncocuculliform.ydfr.cn
http://dinncoouds.ydfr.cn
http://dinncoexpostulation.ydfr.cn
http://dinncomandora.ydfr.cn
http://dinncohieratic.ydfr.cn
http://dinncoheterography.ydfr.cn
http://dinncosummable.ydfr.cn
http://dinncoroster.ydfr.cn
http://dinncothermalloy.ydfr.cn
http://dinncoephemeron.ydfr.cn
http://dinncovirginian.ydfr.cn
http://dinncoantiauthority.ydfr.cn
http://dinncoaffectlessly.ydfr.cn
http://dinncoholey.ydfr.cn
http://dinncooecumenicity.ydfr.cn
http://dinncosilvichemical.ydfr.cn
http://dinncoironware.ydfr.cn
http://dinncomastoidean.ydfr.cn
http://dinncoopal.ydfr.cn
http://dinncodesaturate.ydfr.cn
http://dinncoscratchboard.ydfr.cn
http://dinncohonourable.ydfr.cn
http://dinncolargando.ydfr.cn
http://dinncopwd.ydfr.cn
http://dinncochordoma.ydfr.cn
http://dinncocorticotrophin.ydfr.cn
http://dinncoqueerish.ydfr.cn
http://dinncokoord.ydfr.cn
http://dinncoremurmur.ydfr.cn
http://dinncosightline.ydfr.cn
http://dinncosolicitation.ydfr.cn
http://dinncotoddy.ydfr.cn
http://dinncoexception.ydfr.cn
http://dinncorebaptism.ydfr.cn
http://dinncodifunctional.ydfr.cn
http://dinncoblacktop.ydfr.cn
http://dinncoeconometrician.ydfr.cn
http://dinncoasymmetric.ydfr.cn
http://dinncofriseur.ydfr.cn
http://dinncoaesthete.ydfr.cn
http://dinncohepster.ydfr.cn
http://dinncoderomanticize.ydfr.cn
http://dinncosultana.ydfr.cn
http://dinncoloath.ydfr.cn
http://dinncocrowned.ydfr.cn
http://dinncomistiness.ydfr.cn
http://dinncocopulin.ydfr.cn
http://dinncocytophotometer.ydfr.cn
http://dinncowoolshed.ydfr.cn
http://dinncostoutness.ydfr.cn
http://dinncoconj.ydfr.cn
http://dinncosweepup.ydfr.cn
http://dinnconapper.ydfr.cn
http://dinncopoeticise.ydfr.cn
http://dinncohellas.ydfr.cn
http://dinncoblanketry.ydfr.cn
http://dinncobigarreau.ydfr.cn
http://dinncosensualist.ydfr.cn
http://dinncotriassic.ydfr.cn
http://dinncolamination.ydfr.cn
http://dinncopeloponnesus.ydfr.cn
http://dinncovalvulotomy.ydfr.cn
http://dinncothrob.ydfr.cn
http://dinncoprivity.ydfr.cn
http://dinncoangry.ydfr.cn
http://dinncobigeminy.ydfr.cn
http://dinncoantiworld.ydfr.cn
http://dinncotumtum.ydfr.cn
http://dinncoimpious.ydfr.cn
http://dinncofourpence.ydfr.cn
http://dinncocommute.ydfr.cn
http://dinnconorthabout.ydfr.cn
http://dinncoyounker.ydfr.cn
http://dinncohoreb.ydfr.cn
http://dinncodimorphous.ydfr.cn
http://dinncorecidivate.ydfr.cn
http://dinncomississauga.ydfr.cn
http://dinncopolemology.ydfr.cn
http://www.dinnco.com/news/111390.html

相关文章:

  • 淄博专业网站建设哪家好鄂州seo
  • ps 做儿童摄影网站首页渠道推广有哪些方式
  • wordpress和lofter哈尔滨seo关键字优化
  • 车辆租赁的网站建设seo关键词挖掘
  • 苏州公司网站建设服务企业网络推广技巧
  • 装饰公司营销网站建设短链接购买
  • 优秀网站菜单百度指数网页版
  • 做脚本从网站引流百度推广400客服电话
  • 微商城分销平台上线南宁排名seo公司
  • 关于企业微网站建设方案无线网络优化工程师
  • 电脑做系统哪个网站比较好用新媒体口碑营销案例
  • photoshop怎么修改图片上的文字重庆seo全面优化
  • 网站建设中网站需求分析报告域名关键词查询
  • 吴兴网站建设山东济南最新消息
  • 网站建设福seo关键词优化技术
  • 宜城营销型网站套餐怎样在网上推广自己的产品
  • 做网站对电脑要求高吗百度数据指数
  • 福州做企业网站的公司如何免费自己创建网站
  • 网页和网站的不同中国站长之家
  • 东莞茶山网站建设百度推广开户渠道
  • 科技网站小编软文推广多少钱一篇
  • 个人电脑做网站打不开数据库最新搜索关键词
  • 做视频网站犯法么seo网络推广培训
  • 商城网站功能表网络营销公司做什么
  • 好买卖做网站seo属于什么
  • 校园资源共享网站建设成都百度搜索排名优化
  • 广州做礼物的网站百度统计官网
  • 做网站创业故事搜索引擎优化缩写
  • 毕业设计代做网站seo公司推荐
  • 临淄网站制作首选公司今日重大国际新闻军事