Advertisement

Vue + ECharts 课程分析仪表盘实战教程:完整源码、丰富图表、可视化展示,轻松打造实用数据仪表盘 “超详细从零搭建 Vue + ECharts 课程管理系统:交互式图表、动态布局、数

阅读量:

效果图

在这里插入图片描述

🌟【定制化开发服务,让您的项目领先一步】🌟

如有需求,直接私信留下您的联系方式。谢谢。
我的邮箱:2351598671@qq.com


在这里设计了一个集成了多样化数据呈现形式的课程分析仪表盘界面,并采用Vue框架与ECharts技术构建多幅图表展示。该布局不仅整合了各类课程数据的具体表现形式,还详细描绘了学生活跃度、学生成绩分布情况以及教师反馈评分系统等关键指标的信息呈现方式。

复制代码
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>课程分析仪表盘</title>
      <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
      <style>
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: Arial, sans-serif; background: #f0f2f5; color: #333; }
    .container { max-width: 1300px; margin: 20px auto; padding: 20px; display: grid; gap: 20px; grid-template-columns: 1fr 2fr; }
    .header { grid-column: 1 / -1; background: #4a90e2; color: #fff; padding: 15px; text-align: center; font-size: 24px; border-radius: 8px; }
    .card { background: #fff; padding: 20px; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); }
    .card h3 { color: #4a90e2; margin-bottom: 10px; }
    .chart { width: 100%; height: 250px; margin-top: 10px; }
    .footer { grid-column: 1 / -1; text-align: center; font-size: 14px; color: #777; padding: 10px; border-top: 1px solid #ddd; }
      </style>
    </head>
    <body>
      <div id="dashboard-app" class="container">
    <!-- 顶部标题 -->
    <div class="header">课程分析仪表盘</div>
    
    <!-- 学生成绩分布图表 -->
    <div class="card">
      <h3>学生成绩分布</h3>
      <div ref="scoreDistributionChart" class="chart"></div>
    </div>
    
    <!-- 课程参与度折线图 -->
    <div class="card">
      <h3>课程参与度</h3>
      <div ref="participationChart" class="chart"></div>
    </div>
    
    <!-- 学生活跃时间段热力图 -->
    <div class="card">
      <h3>学生活跃时间段</h3>
      <div ref="activeHoursChart" class="chart"></div>
    </div>
    
    <!-- 课程反馈评分饼图 -->
    <div class="card">
      <h3>课程反馈评分</h3>
      <div ref="feedbackChart" class="chart"></div>
    </div>
    
    <!-- 底部版权信息 -->
    <div class="footer">&copy; 2023 课程分析系统. 保留所有权利.</div>
      </div>
    
      <script>
    new Vue({
      el: '#dashboard-app',
      mounted() {
        this.initScoreDistributionChart();
        this.initParticipationChart();
        this.initActiveHoursChart();
        this.initFeedbackChart();
      },
      methods: {
        initScoreDistributionChart() {
          const chart = echarts.init(this.$refs.scoreDistributionChart);
          const option = {
            title: { text: '成绩分布', left: 'center' },
            tooltip: { trigger: 'axis' },
            xAxis: { type: 'category', data: ['60分以下', '60-70分', '70-80分', '80-90分', '90分以上'] },
            yAxis: { type: 'value' },
            series: [{ name: '学生人数', type: 'bar', data: [20, 50, 100, 120, 80] }]
          };
          chart.setOption(option);
        },
        initParticipationChart() {
          const chart = echarts.init(this.$refs.participationChart);
          const option = {
            title: { text: '课程参与度', left: 'center' },
            tooltip: { trigger: 'axis' },
            xAxis: { type: 'category', data: ['第一周', '第二周', '第三周', '第四周'] },
            yAxis: { type: 'value' },
            series: [{ name: '参与人数', type: 'line', data: [150, 180, 200, 170] }]
          };
          chart.setOption(option);
        },
        initActiveHoursChart() {
          const chart = echarts.init(this.$refs.activeHoursChart);
          const option = {
            title: { text: '学生活跃时间段', left: 'center' },
            tooltip: { position: 'top' },
            xAxis: { type: 'category', data: Array.from({ length: 24 }, (v, i) => `${i}时`) },
            yAxis: { type: 'category', data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] },
            visualMap: { min: 0, max: 200, calculable: true, show: false, color: ['#4a90e2', '#87ceeb'] },
            series: [{
              type: 'heatmap',
              data: Array.from({ length: 168 }, () => [Math.floor(Math.random() * 24), Math.floor(Math.random() * 7), Math.random() * 200]),
              emphasis: { itemStyle: { borderColor: '#333', borderWidth: 1 } }
            }]
          };
          chart.setOption(option);
        },
        initFeedbackChart() {
          const chart = echarts.init(this.$refs.feedbackChart);
          const option = {
            title: { text: '课程反馈评分', left: 'center' },
            tooltip: { trigger: 'item', formatter: '{b}: {d}%' },
            series: [{
              type: 'pie',
              radius: '50%',
              data: [
                { value: 45, name: '非常满意' },
                { value: 30, name: '满意' },
                { value: 15, name: '一般' },
                { value: 5, name: '不满意' },
                { value: 5, name: '非常不满意' }
              ],
              emphasis: {
                itemStyle: {
                  shadowBlur: 10,
                  shadowOffsetX: 0,
                  shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
              }
            }]
          };
          chart.setOption(option);
        }
      }
    });
      </script>
    </body>
    </html>

页面功能说明:

  • 成绩分布图表 :用于呈现不同分数区间内学生的数量分布情况。
    • 课程参与度折线图 :用于分析学员参与程度随时间的变化情况。
    • 学生活跃时间段热力图 :用于可视化地表示学员活跃时段在整个一周中的分布情况。
    • 课程反馈评分饼图 :用于评估学员对课程的整体满意度分布情况。

能够深入掌握课程情况以及学生的行为模式,并且适用于课程管理和教育数据分析

全部评论 (0)

还没有任何评论哟~