Skip to content

Data Visualization + Dashboard

Mở đầu

1 chart tốt hơn 1000 dòng data. Visualization biến số trừu tượng → visual trực quan, hiểu story sau data trong vài giây. Từ Excel chart đến Grafana monitor — visualization có mọi nơi.

Bạn sẽ học:

  • Chart selection: chọn chart đúng theo mục đích
  • Design principles: core design
  • Dashboard layout: pattern theo loại
  • Tool ecosystem: tool mainstream
  • Common traps: tránh misleading
ChươngNội dung
1Chart type selection
2Visualization principles
3Dashboard layout
4Tool selection
5Common traps

0. Toàn cảnh: sao cần visualization?

Não người xử visual nhanh hơn text 60000 lần. 1 line chart cho biết "tháng qua sale giảm" trong 1 giây; table → 30 giây.

Core value:

  • Phát hiện pattern: trend, cycle, outlier rõ trong chart
  • Hỗ trợ decision: cho non-tech hiểu data
  • Giao tiếp: 1 hình ≥ 1000 lời, giảm ambiguity

Visualization ≠ đẹp

Goal truyền info, không show off. 1 bar chart mộc nhưng accurate > 3D chart fancy nhưng khó hiểu.


1. Chart type selection

Step 1: không phải "tôi thích chart nào", mà "tôi muốn truyền info gì".

图表类型选择器
选择你的数据目的,查看推荐的图表类型
📊
比较
📈
趋势
🍩
占比
🔔
分布
🕸️
关系
比较:推荐图表
▐▐▐
柱状图
比较不同类别的数值大小
示例:各部门销售额对比
▐▐ ▐▐
分组柱状图
多维度分组比较
示例:各季度各产品线收入
雷达图
多维度综合对比
示例:候选人能力评估

Cheat sheet

Mục đíchRecommend Không nênLý do
So sizeBar, columnPieMắt nhạy length hơn angle
Show trendLine, areaBarLine continuity suggests time
Show proportionPie (≤5), stacked bar3D pie3D perspective bóp méo area
Show distributionHistogram, box plotLineDistribution cần frequency, không trend
Show relationshipScatter, bubbleBar2 continuous var cần 2D space

Decision rule đơn giản

  • 1 var → histogram (distribution) / number card (KPI)
  • 2 var → line (time vs value) / scatter (value vs value)
  • Multi category → bar (compare) / pie (proportion, ≤5)
  • Multi-dim → radar / parallel coordinates

2. Visualization design

Edward Tufte trong "The Visual Display of Quantitative Information" đưa core principles:

PrincipleNoteAnti-example
Data-ink ratio"Ink" cho data caoGrid line thừa, decoration
Min non-dataBỏ visual không truyền info3D, shadow, gradient bg
Consistent scaleY axis từ 0, scale đềuY từ 95 (phóng đại diff)
Color hợp lýEncode info, không decorationRainbow cho ordered data
Label rõTitle, axis, legend đủKhông unit, không time range

Color rules

  1. Same metric same color: revenue luôn blue
  2. Ordered data dùng gradient: temperature low-high → blue-red
  3. Colorblind-friendly: ~8% nam có red-green colorblind

Data-ink ratio

Xoá hết element không truyền info.

XoáGiữ
3D, shadow, gradientData point, axis label
Grid line thừaReference line (target value)
Decoration iconLegend (multi-series)
Fancy bgTitle + unit rõ

Consistency

  • Color: cùng dim cùng color
  • Scale: Y từ 0 (trừ khi có lý do)
  • Time: axis interval đều, không jump

Readability

  • Title nói conclusion: không "Monthly Sales", mà "Sales giảm liên tục 3 tháng"
  • Annotate key points: outlier, turning point
  • Control density: 1 chart 1-2 insight, không nhét nhiều

Tufte quote

"Excellence in statistical graphics consists of complex ideas communicated with clarity, precision, and efficiency."


3. Dashboard layout: scenario khác, pattern khác

Dashboard = nhiều chart combine. Tốt = không pile chart, mà chọn pattern theo use case.

仪表盘布局模式
点击查看不同类型的仪表盘布局
全局概览型
对比分析型
下钻分析型
实时监控型
全局概览型
顶部核心指标卡片 + 中间趋势图 + 底部明细表
DAU 12.5万
收入 ¥85万
转化率 3.2%
客单价 ¥268
趋势折线图
明细数据表
适用场景:管理层日报、运营大盘

4 patterns

PatternStructureUseDesign
OverviewKPI card + trend + detailMgmt daily, ops overviewCore metric trên cùng
CompareSymmetric layoutA/B test, YoY/MoMDim consistent, highlight diff
Drill-downSummary → detail từng layerSales analysis, user behaviorSupport click, deep dive
RealtimeBig number + curve + alert12.12 wall, monitoringAuto refresh, dark bg, big screen

5 design principles

  1. "Ai xem": CEO → strategic; ops → process; engineer → tech
  2. 5-second rule: hiểu core info trong 5s
  3. Info hierarchy: top-left quan trọng nhất (F-pattern reading)
  4. Tránh scroll: 1 screen hiển thị core
  5. White space: đừng nhét full, để thở

Dashboard vs Report

  • Dashboard: realtime, interactive, monitor + decide nhanh
  • Report: periodic (daily/weekly/monthly), static, detail analysis + archive

Không thay thế, mà bổ sung. Dashboard phát hiện vấn đề, report deep dive.


4. Tool selection

3 tiers:

4.1 Code-level chart library

ToolLangĐặc điểmUse
EChartsJSOut-of-box, type chart phong phúBusiness system embedded
D3.jsJSLow-level flexibleHigh customization
Chart.jsJSLightweightSimple chart
MatplotlibPythonScientific standard, staticAnalysis, paper
PlotlyPython/JSInteractive, 3D supportExploration, Jupyter

4.2 BI platform (no/low-code)

ToolPositionLợiTeam
GrafanaMonitoringTime-series tốt, alertOps/SRE
MetabaseLightweight BIOpen free, SQL dễMid team
Apache SupersetEnterprise BIOpen, big data sourceCó data team
TableauCommercial BIDrag-drop, đẹpBusiness analyst
Power BICommercial BIMicrosoft ecosystemMS shop

Selection

  • Dev embedded chart → ECharts hoặc Chart.js
  • Data analyst → Plotly + Jupyter hoặc Metabase
  • Ops monitoring → Grafana
  • Business self-service → Metabase (open) hoặc Tableau (commercial)
  • High custom → D3.js (learning steep, unlimited)

5. Common traps: charts đang nói dối bạn

5.1 Truncated axis

Y axis bắt đầu từ số lớn → diff nhỏ trông khổng lồ.

ScenarioRealVisual
Y từ 0A 98 điểm, B 95 điểmDiff nhỏ
Y từ 90Cùng dataA như gấp nhiều lần B

Khi nào truncate được? Khi value tuyệt đối lớn nhưng thay đổi nhỏ (vd stock 100→105). Phải explicit label.

5.2 3D pie chart trap

3D perspective làm sector gần viewer trông lớn hơn. 25% sector trong 3D có thể trông như 35%.

Solution: đừng dùng 3D pie. Dùng pie thường, donut, hoặc bar chart.

5.3 Color abuse

Sai Đúng
Red-green (colorblind unfriendly)Blue-orange (colorblind-safe)
Mỗi category 1 color (rainbow)Same series same hue, shade đậm-nhạt
Color encode continuous data không legendAlways provide legend + value
BG color + data color contrast thấpWCAG AA contrast

5.4 Other errors

TrapIssueFix
Dual Y axis2 metric không liên quan share X → suggest causalitySplit thành 2 chart
Area misleadingDùng radius vs areaValue double → area double, không radius double
Uneven time axisTháng 1, 3, 12 same spacingTheo real time proportion
Quá nhiều categoryPie có 15 sector>5 → bar chart hoặc "Other"

Ethics

Visualization goal hỗ trợ hiểu, không manipulate cognition. Mỗi chart hỏi:

  • Reader có rút conclusion sai không?
  • Có hide unfavorable data?
  • Axis, scale, color có công bằng?

Tổng kết

Visualization = "last mile" truyền value data.

  1. Mục đích trước → chart: compare bar, trend line, proportion pie
  2. Data-ink ratio: xoá element không truyền info
  3. Dashboard pattern: overview, compare, drill-down, realtime
  4. Tool theo need: ECharts product, Grafana monitor, Metabase analyze
  5. Tránh trap: truncated axis, 3D pie, color abuse

2026 cho VN dev

  • AI + viz: Vercel v0, Plotly Dash, Streamlit, gradio — AI gen chart code từ description
  • Modern stack: Apache Superset / Metabase open-source mainstream cho VN startup
  • VN enterprise: PowerBI dominant (Microsoft), Tableau (banking)
  • Realtime: Grafana + Prometheus chuẩn DevOps; ECharts cho frontend dashboard
  • AI analytics: ChatGPT/Claude tạo chart từ CSV qua code interpreter — 0-code analytics

Tài liệu