SuperAPI AI Directory

antv-g2-chart

Data & analytics

View repository

Updated 10-28 02:19

About this skill

G2 statistical charts

Applies to statistical charts, chart troubleshooting, and G2 v5 visualization. Relationship networks and process editors should use their corresponding tools and should not apply statistical chart syntax.

Execution points

First determine whether the task is comparison, trend, distribution, correlation, or composition, then choose the chart. Use bar charts for category comparison, line charts for time trends, histograms/box plots for distribution, and scatter plots for two continuous variables; pie charts should only show a small number of non-negative, additive categories. Native dashboards use the existing visualization types and encoding; do not write G2 options into DashboardSchema. For standalone HTML charts, first check the available G2 version; v5 uses Chart, options, and render; merge multiple layers in view.children, call destroy when the component unmounts, and update the container when the size changes. Convert values and dates in the data first to avoid numeric strings being treated as categories. Color must not be the only information channel; when there are too many categories, first state the Top N range and put the complete data in a detail table. Keep the full range on the time axis and sort by time; do not truncate the zero point of a bar chart just to create a trend.

Conversation examples

When the user says "this chart is too crowded", check the actual label length and category count, and provide the minimal effective fix of rotating labels/switching to horizontal bars/Top N, rather than repeatedly asking the user to specify a chart type.

How DB-GPT works

  • Communicate in the user's language. First infer intent from the selected data, prior context, dashboards, and annotations; when the expression is vague but work can proceed, state one reasonable assumption and continue. Ask one specific question only when a gap would change the result, and do not repeat generic clarification phrases.
  • The selected database is used only for read-only discovery: confirm fields, granularity, units, date range, null values, and unique keys. When there is no data, layout can still be discussed; before generating actual metrics, ask the user to select a data source. Illustrative values must be clearly labeled and must never be disguised as query results.
  • When creating an editable dashboard, call the existing dashboard tool and load the dashboard-builder workflow: first call plan_dashboard and create according to the existing confirmation process; when modifying an existing dashboard, first call load_dashboard_draft, then propose changes that match the version. Visual specifications supplement the business plan and must not skip SQL validation, saving, or publishing rules.
  • Use the report generation tool only when the user explicitly asks for an HTML report; a native dashboard must not be secretly replaced with an image or standalone HTML. The native schema uses only the fields, chart types, and theme properties allowed by the tool, and must not pass arbitrary CSS or nonexistent layout enums. Decorations that cannot be fully expressed should be reduced to usable color schemes/layouts, and the differences should be explained.
  • Before editing, preserve the user's data, metric definitions, and unmodified components. Metric changes must update the title, unit, and calculation definition in sync; for ratio aggregation, first sum the numerator and denominator. Do not fabricate targets, year-over-year values, or forecasts when there is no target data.
  • Before delivery, check empty results, long labels, narrow screens, light and dark themes, legends, zero values, and missing values; animations should respect the user's reduced-motion preference. Report only execution results confirmed by the tools.

Resources and boundaries

This directory is a DB-GPT product skill; it does not modify the host's global configuration, install external scripts, or send data to reference websites. It uses fonts already provided by the system and project, and falls back to Chinese fonts when external fonts are missing. The interface shows style examples; business values in actual use come from the selected data.

References

Reference Sive-related skills scenario and visual direction, with rules rewritten by DB-GPT Dashboard Lab; this is not an official Sive release package.