chart-visualization
Original:🇺🇸 English
Not Translated
1 scripts
This skill should be used when the user wants to visualize data. It intelligently selects the most suitable chart type from 26 available options, extracts parameters based on detailed specifications, and generates a chart image using a JavaScript script.
6installs
Sourcebytedance/deer-flow
Added on
NPX Install
npx skill4agent add bytedance/deer-flow chart-visualizationSKILL.md Content
Chart Visualization Skill
This skill provides a comprehensive workflow for transforming data into visual charts. It handles chart selection, parameter extraction, and image generation.
Workflow
To visualize data, follow these steps:
1. Intelligent Chart Selection
Analyze the user's data features to determine the most appropriate chart type. Use the following guidelines (and consult for detailed specs):
references/- Time Series: Use (trends) or
generate_line_chart(accumulated trends). Usegenerate_area_chartfor two different scales.generate_dual_axes_chart - Comparisons: Use (categorical) or
generate_bar_chart. Usegenerate_column_chartfor frequency distributions.generate_histogram_chart - Part-to-Whole: Use or
generate_pie_chart(hierarchical).generate_treemap_chart - Relationships & Flow: Use (correlation),
generate_scatter_chart(flow), orgenerate_sankey_chart(overlap).generate_venn_chart - Maps: Use (regions),
generate_district_map(points), orgenerate_pin_map(routes).generate_path_map - Hierarchies & Trees: Use or
generate_organization_chart.generate_mind_map - Specialized:
- : Multi-dimensional comparison.
generate_radar_chart - : Process stages.
generate_funnel_chart - : Percentage/Progress.
generate_liquid_chart - : Text frequency.
generate_word_cloud_chart - or
generate_boxplot_chart: Statistical distribution.generate_violin_chart - : Complex node-edge relationships.
generate_network_graph - : Cause-effect analysis.
generate_fishbone_diagram - : Process flow.
generate_flow_diagram - : Tabular data or pivot tables for structured data display and cross-tabulation.
generate_spreadsheet
2. Parameter Extraction
Once a chart type is selected, read the corresponding file in the directory (e.g., ) to identify the required and optional fields.
Extract the data from the user's input and map it to the expected format.
references/references/generate_line_chart.mdargs3. Chart Generation
Invoke the script with a JSON payload.
scripts/generate.jsPayload Format:
json
{
"tool": "generate_chart_type_name",
"args": {
"data": [...],
"title": "...",
"theme": "...",
"style": { ... }
}
}Execution Command:
bash
node ./scripts/generate.js '<payload_json>'4. Result Return
The script will output the URL of the generated chart image.
Return the following to the user:
- The image URL.
- The complete (specification) used for generation.
args
Reference Material
Detailed specifications for each chart type are located in the directory. Consult these files to ensure the passed to the script match the expected schema.
references/args