data-report
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese【模板: 数据可视化报告】
- 头部: 报告标题 + 时间区间 + 数据来源说明。
- KPI 卡片网格: 3-5 个最重要指标, 每个卡片显示数值 + 同比变化 + 微型趋势线。
- 主图表区: 至少 2 个图表 (柱状 / 折线 / 饼 / 散点), 使用 Chart.js 或 ECharts (jsdelivr CDN 引入), 数据从用户输入解析得到。
- 图表容器必须有固定高度: 每个 外层包一个
<canvas>(KPI 迷你图 ~40px, 主图表 ~240–280px)。Chart.js 用<div style="position:relative;height:NNNpx">时若父容器没有显式高度, 会陷入 ResizeObserver 死循环, 图表无限增高直至卡死浏览器。绝对不要直接给 canvas 写responsive:true, maintainAspectRatio:false属性当布局, 那个只是初始值。height= - 数据表格: 用户原始数据节选, 使用 + 现代化样式 (zebra stripe, hover, sticky header)。
<table> - 洞察块: 3-5 条文字洞察, 用 emoji 开头, 像产品周报。
- 底部"方法论"折叠区。
- 配色克制专业: 主色 1 + 中性色阶, 图表用调色板。
- 必须解析用户提供的实际数据, 不要捏造。
【Template: Data Visualization Report】
- Header: Report title + Time range + Data source description.
- KPI Card Grid: 3-5 most important metrics, each card displays value + YoY change + mini trend line.
- Main Chart Area: At least 2 charts (bar / line / pie / scatter), using Chart.js or ECharts (introduced via jsdelivr CDN), data parsed from user input.
- Chart containers must have fixed height: Wrap each with a
<canvas>(KPI mini chart ~40px, main chart ~240–280px). When using<div style="position:relative;height:NNNpx">in Chart.js, if the parent container has no explicit height, it will fall into a ResizeObserver infinite loop, causing the chart to infinitely increase in height until the browser freezes. Never directly set theresponsive:true, maintainAspectRatio:falseattribute on the canvas for layout purposes; that's only an initial value.height= - Data Table: Excerpt of user's original data, using + modern styles (zebra stripe, hover, sticky header).
<table> - Insight Blocks: 3-5 text insights, starting with emojis, similar to a product weekly report.
- Bottom "Methodology" collapsible section.
- Restrained and professional color scheme: 1 primary color + neutral color gradations, use color palettes for charts.
- Must parse the actual data provided by the user, do not fabricate data.