Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính5.9k · #14535

dataviz

Skill này làm gì

Skill này hướng dẫn cách xây dựng biểu đồ và hình ảnh dữ liệu mà người đọc dễ hiểu. Skill dành cho bất kỳ ai làm biểu đồ, đồ thị hoặc bảng điều khiển bằng bất kỳ công cụ nào, từ code đến hình ảnh.

Khi nào nên dùng

  • ✓Khi bạn chuẩn bị tạo bất kỳ biểu đồ, đồ thị hoặc hình ảnh dữ liệu nào.
  • ✓Khi bạn cần chọn màu biểu đồ vừa dễ tiếp cận vừa nhất quán.
  • ✓Khi bạn đang bố trí một bảng điều khiển hoặc các ô số liệu và muốn có thứ bậc rõ ràng.

Liên kết skill

https://github.com/JimLiu/baoyu-design/blob/main/skills/dataviz/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/JimLiu/baoyu-design/blob/main/skills/dataviz/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Vẽ biểu đồ so sánh doanh số của ba sản phẩm trong mười hai tháng, với màu dễ tiếp cận.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent trước tiên chọn dạng biểu đồ dựa trên nhiệm vụ của dữ liệu, sau đó gán màu theo ý nghĩa, rồi kiểm tra bảng màu bằng công cụ xác thực trước khi vẽ biểu đồ.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Data Visualization

A chart is read by people and executed by you. This skill turns "make it look good" into a procedure with checks, so the result is right by construction rather than by taste.

The method here is design-system-agnostic. Nothing in the procedure, the form heuristic, the six checks, or the mark specs is specific to one product. A design system supplies a small set of parameters (its ramps, a categorical order, a diverging pair, a status palette, a texture, its surfaces, its filter components); the method consumes them unchanged. A validated default palette is the reference instance, fully specified in references/palette.md. To target your brand, read that file's structure and substitute its values - touch nothing else.

The single most important habit: the color part is computable, so compute it. Never eyeball whether a palette is colorblind-safe - run scripts/validate_palette.js.

The procedure - do these in order

Color comes LAST. Most bad charts pick colors first.

  1. Pick the form. What is the data's job - magnitude, identity, polarity, a single headline, change-over-time? The job picks the chart type, and sometimes the answer is not a chart (a stat tile or hero number). -> references/choosing-a-form.md
  2. Assign color by the job it does. Categorical (identity), sequential (magnitude), diverging (polarity), or status (state) - each has one rule. Assign categorical hues in fixed order, never cycled. -> references/color-formula.md
  3. VALIDATE the palette - run the script, don't reason about Delta E. node scripts/validate_palette.js "<hex,hex,...>" --mode light (relative to this skill's base directory - or load it as <script type="module"> in the chart's own page, where it reads data-palette off <body> and logs a console.table report). It returns pass/fail on the lightness band, chroma floor, adjacent-pair CVD separation, the normal-vision floor, and contrast. Fix anything that FAILs before continuing. Re-run for --mode dark with that mode's surface.
  4. Apply mark specs & spacers. Thin marks, 4px rounded data-ends anchored to the baseline, 2px lines, >=8px markers, a 2px surface gap between fills (stacked segments and adjacent bars alike) and a 2px surface ring on overlapping marks, selective direct labels. -> references/marks-and-anatomy.md
  5. Add the hover layer - by default. An HTML/SVG chart is interactive; ship a crosshair+tooltip on line/area and a per-mark hover tooltip on bar/dot/cell. The only form that skips it is a bare stat tile with no plot. Hit targets bigger than the mark; filters in one row above the charts. -> references/interaction.md
  6. Final accessibility pass. For >= 2 series a legend is always present and <= 4 are also direct-labeled (a single series needs no legend box - the title names it), so identity is never color-alone; a table view exists; dark mode is selected - its own steps from the same ramps, validated against the dark surface, not an automatic flip; texture is available for the CVD/print/forced-colors case.
  7. Render it and look at it. The validator checks color, not layout - open or screenshot the output and eyeball it for label collisions, geometry, and overflow before calling it done.

Then check the result against references/anti-patterns.md - it is the catalog of what goes wrong. If your chart matches an entry, it's wrong.

Non-negotiables (true in every design system)

  • Assign categorical hues in fixed order, never cycled. A 9th series is never a generated hue - it folds into "Other," small multiples, or composite encoding.
  • One axis. Never a dual-axis chart (two y-scales). Two measures of different scale -> two charts, small multiples, or indexed to a common base. (This is the #1 chart mistake - see anti-patterns.)
  • Color follows the entity, never its rank. A filter that changes the series count must not repaint the survivors.
  • Sequential = one hue, light->dark. Diverging = two hues + a neutral gray midpoint. Never a rainbow; never a hue at the diverging midpoint.
  • Run the validator before shipping any categorical palette. CVD Delta E >= 8 is the target (OKLab x100); 6-8 is a floor that is legal ONLY with secondary encoding. A normal-vision floor below 15 is a hard FAIL - full-color readers can't tell the pair apart; re-step it on the adjacent pairlist (secondary encoding does not excuse this one); under --pairs all cut series or facet
Câu hỏi thường gặp

Skill có chỉ dùng được với một thư viện biểu đồ không?

Không. Phương pháp này hoạt động với mọi đầu ra, như code, SVG, PNG hay thư viện biểu đồ.

Màu được chọn như thế nào?

Màu được gán theo vai trò của chúng, chẳng hạn nhận diện hoặc độ lớn, rồi kiểm tra khả năng tiếp cận.

Skill có kiểm tra mù màu không?

Có. Một công cụ xác thực kiểm tra bảng màu thay vì dựa vào cảm nhận bằng mắt.

Chi tiết

Mô tả gốc của tác giả

Use this skill whenever you are about to create ANY chart, graph, plot, dashboard, or data visualization, in ANY output medium (HTML/React artifact, inline SVG, matplotlib/plotly/d3/Recharts, PNG). Read it BEFORE writing the first line of chart code, choosing chart colors, building a stat tile / KPI row, or laying out a dashboard. Teaches a design-system-agnostic method - form heuristic, color formula with a runnable validator, mark specs, interaction rules. Default palette in references/palette.md.

repo: JimLiu/baoyu-design

Độ phổ biến

Sao GitHub
5.9k
Vị trí xếp hạng
#14535
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự