dashboard-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Dashboard Creator

仪表盘生成器

Create interactive HTML dashboards with KPI cards and charts.
创建带有KPI卡片和图表的交互式HTML仪表盘。

When to Use

适用场景

  • "Create dashboard for [metrics]"
  • "Show KPI visualization"
  • "Generate performance dashboard"
  • "Make analytics dashboard with charts"
  • "为[指标]创建仪表盘"
  • "展示KPI可视化效果"
  • "生成性能仪表盘"
  • "制作带图表的分析仪表盘"

Components

组件

  1. KPI Cards: metric name, value, change %, trend icon
  2. Charts: bar/pie/line using SVG or CSS
  3. Progress Bars: completion indicators
  4. Data Tables: tabular data display
  1. KPI卡片:指标名称、数值、变化百分比、趋势图标
  2. 图表:使用SVG或CSS实现的柱状/饼状/折线图
  3. 进度条:完成度指示器
  4. 数据表:表格形式的数据展示

HTML Structure

HTML Structure

html
<!DOCTYPE html>
<html>
<head>
  <title>[Project] Dashboard</title>
  <style>
    body { font-family: system-ui; background: #f7fafc; }
    .kpi-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    .kpi-value { font-size: 36px; font-weight: bold; }
    .trend-up { color: #48bb78; }
    .trend-down { color: #e53e3e; }
  </style>
</head>
<body>
  <h1>[Dashboard Name]</h1>
  <div class="grid">
    <!-- KPI cards -->
    <!-- Charts -->
    <!-- Progress bars -->
  </div>
</body>
</html>
html
<!DOCTYPE html>
<html>
<head>
  <title>[Project] Dashboard</title>
  <style>
    body { font-family: system-ui; background: #f7fafc; }
    .kpi-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    .kpi-value { font-size: 36px; font-weight: bold; }
    .trend-up { color: #48bb78; }
    .trend-down { color: #e53e3e; }
  </style>
</head>
<body>
  <h1>[Dashboard Name]</h1>
  <div class="grid">
    <!-- KPI cards -->
    <!-- Charts -->
    <!-- Progress bars -->
  </div>
</body>
</html>

KPI Card Pattern

KPI Card Pattern

html
<div class="kpi-card">
  <div class="kpi-label">Revenue</div>
  <div class="kpi-value">$124K</div>
  <div class="trend-up">↑ 12.5%</div>
</div>
html
<div class="kpi-card">
  <div class="kpi-label">Revenue</div>
  <div class="kpi-value">$124K</div>
  <div class="trend-up">↑ 12.5%</div>
</div>

Chart Pattern (SVG Bar Chart)

Chart Pattern (SVG Bar Chart)

html
<svg viewBox="0 0 400 300">
  <rect x="50" y="100" width="40" height="150" fill="#4299e1"/>
  <rect x="120" y="80" width="40" height="170" fill="#48bb78"/>
  <!-- bars for each data point -->
</svg>
html
<svg viewBox="0 0 400 300">
  <rect x="50" y="100" width="40" height="150" fill="#4299e1"/>
  <rect x="120" y="80" width="40" height="170" fill="#48bb78"/>
  <!-- bars for each data point -->
</svg>

Workflow

工作流程

  1. Extract metrics and data
  2. Create KPI cards grid
  3. Generate charts (bar/pie/line) as SVG
  4. Add progress indicators
  5. Write to
    [name]-dashboard.html
Use semantic colors: green (positive), red (negative), blue (neutral).
  1. 提取指标和数据
  2. 创建KPI卡片网格
  3. 以SVG格式生成图表(柱状/饼状/折线图)
  4. 添加进度指示器
  5. 写入到
    [name]-dashboard.html
使用语义化颜色:绿色(正向)、红色(负向)、蓝色(中性)。