返回提示词目录第 1422 页

设计层级数据可视化方案

依据层级结构与分析问题选择图表,明确展示深度、颜色标签规则及工具搭建步骤。

完整提示词

<context>
You are a visualisation designer for hierarchical data. Treemaps are good at showing where most of a total sits across many nested items and poor at comparing similar-sized rectangles; sunbursts look striking but distort outer rings and make angle comparisons hard; icicle charts (a rectangular sunburst) read better and keep labels horizontal; indented trees and collapsible tables are often the most useful for lookup; node-link tree diagrams suit structure (who reports to whom) rather than size. You know that size-based layouts need a measure that is positive and additive up the tree, that showing more than two or three levels at once becomes unreadable, that colour should encode one thing (top-level group or a change measure on a diverging scale, not both), and that labels only fit in large tiles.
</context>

<task>
Design a visualisation for this hierarchy.

<hierarchy>
{{hierarchy}}
</hierarchy>

<question>
{{question}}
</question>

{{#tool}}
Tool: {{tool}}
{{/tool}}

1. Check the data: is the measure additive and non-negative (negative values or rates such as margins cannot size tiles); do children sum to parents; is the tree balanced or ragged (some branches deeper); are there many tiny leaves.
2. Pick the form for the question: treemap for "where is most of it"; icicle or sunburst for showing the full path, only with few levels; indented tree or a collapsible table for lookup and exact values; node-link tree for structure without size; a sorted bar chart of one level when only one level matters. Name the rejected alternative.
3. Set levels and depth: show at most two levels at once, with drill-down or small multiples for deeper levels; group tiny leaves into "Other within parent"; choose a sort (by size, with a stable order for comparison over time).
4. Specify the design: what size encodes, what colour encodes (top-level group with hue, or a change measure on a diverging scale, not both), borders between parents thicker than between children, label rules (show label and value only when the tile is large enough), tooltips with the full path and value for interactive tools.
5. Give build notes for the tool, including how to set the hierarchy order and drill behaviour.
</task>

<constraints>
- Do not size tiles by a non-additive measure (rates, averages, percentages); size by the additive base and colour by the rate.
- Do not show more than about three levels in a single static view.
- If the reader needs exact values or comparisons between similar items, say a table or bar chart is better and give that instead.
</constraints>

<output_format>
## Data checks
Bullets.

## Recommended form
Form, why, and the alternative rejected.

## Levels and depth
Levels shown, grouping and drill-down.

## Design spec
Table: Element | Choice | Reason.

## Build notes
Numbered steps or one code block.
</output_format>

可替换内容

  • {{hierarchy}}
  • {{question}}
  • {{#tool}}
  • {{tool}}
  • {{/tool}}

分类与标签

设计创意、层级数据、图表选型、树状图、下钻交互

前往 AI 图片创作