Token导航 LogoToken导航

Agent Skill · 前端设计

flutter-chart(Flutter chart 命令行)

flutter-chart 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

flutter-chart 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,305。

总安装 1,409周安装 57GitHub Stars 1,819下载 442核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:flutter-chart(Flutter chart 命令行)
来源仓库:https://github.com/entronad/graphic
仓库路径:skills/flutter-chart
安装命令:
npx skills add https://github.com/entronad/graphic --skill flutter-chart
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/entronad/graphic --skill flutter-chart

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

flutter-chart 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/flutter-chart

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/entronad/graphic --skill flutter-chart;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

flutter-chart 怎么安装?

在终端执行 npx skills add https://github.com/entronad/graphic --skill flutter-chart。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

flutter-chart 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

flutter-chart 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

flutter-chart 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

flutter-chart 用的人多吗?

公开数据是累计安装 1,409 次,近一周安装 57 次,下载 442 次,GitHub 1,819 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

flutter-chart 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 1,819 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
flutter-chart

Flutter chart 命令行 · 本页

1,4091,819需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Flutter Chart with Graphic

A skill for helping users build data visualizations in Flutter using the Graphic library — a Grammar of Graphics-based charting library.

When to Use

  • User wants to create any type of chart in Flutter (bar, line, area, pie, scatter, heatmap, etc.)
  • User needs help configuring chart appearance, interactivity, or animations
  • User asks about Graphic library APIs or usage patterns
  • User wants to convert data into visual representations
  • User wants to create custom, bespoke visualizations — Graphic's customization system is its most powerful feature and a key strength of AI-assisted development

Why Custom Charts?

Standard chart types (bar, line, pie) only cover a fraction of data visualization needs. Graphic is built on Grammar of Graphics theory, which means every visual layer is independently customizable:

  • Custom Shapes — Render any geometry (triangles, lollipops, arrows, gauges, bullet charts, sparklines, etc.)
  • Custom Tooltips — Fully custom interactive overlays with any layout
  • Custom Annotations — Draw any graphics at data or absolute positions
  • Custom Encoders — Map data to visuals using arbitrary logic
  • Custom Modifiers — Define custom collision/arrangement behavior

This makes AI-assisted development especially valuable: the AI can write custom shape renderers, coordinate math, and drawing code that would be tedious to implement manually.

Always consider customization when the user's requirements don't perfectly match a standard chart type. See references/customization.md for the comprehensive customization guide.

Quick Start

Installation

Add to pubspec.yaml:

dependencies:
  graphic: ^latest

Then run flutter pub get.

Import

import 'package:graphic/graphic.dart';

Minimal Example

Chart(
  data: [
    {'category': 'A', 'value': 10},
    {'category': 'B', 'value': 20},
    {'category': 'C', 'value': 15},
  ],
  variables: {
    'category': Variable(
      accessor: (Map map) => map['category'] as String,
    ),
    'value': Variable(
      accessor: (Map map) => map['value'] as num,
    ),
  },
  marks: [IntervalMark()],
  axes: [Defaults.horizontalAxis, Defaults.verticalAxis],
)

Core Concepts

Graphic follows the Grammar of Graphics theory. A chart is composed of independent, declarative layers:

data → Variable → Scale → Encode → Mark → Shape → Render

Everything is configured through the single Chart<D> widget constructor. There are no imperative APIs — all configuration is declarative.

The Chart Widget

Chart<D> is the only public widget. The type parameter D is the data item type. Key parameters:

ParameterTypePurpose
dataList<D>Required. Data to visualize
variablesMap<String, Variable<D, dynamic>>Required. How to extract values from data
marksList<Mark>Required. Geometry types to render
coordCoord?Coordinate system (default: RectCoord)
axesList<AxisGuide>?Axis configuration
tooltipTooltipGuide?Tooltip on interaction
crosshairCrosshairGuide?Crosshair on interaction
annotationsList<Annotation>?Static annotations
selectionsMap<String, Selection>?Named selection behaviors
transformsList<VariableTransform>?Data transforms (filter, sort, proportion)
paddingEdgeInsets Function(Size)?Padding around the plot area
transition—Set on each Mark, not on Chart

See references/chart-widget.md for full parameter details.

Variables

Variables define how raw data maps to abstract values:

variables: {
  'date': Variable(
    accessor: (MyData d) => d.date,
    scale: TimeScale(formatter: (t) => DateFormat.MMMd().format(t)),
  ),
  'value': Variable(
    accessor: (MyData d) => d.value,
    scale: LinearScale(min: 0),
  ),
}

Each variable can have a Scale that controls domain-to-range mapping. See references/scales.md.

Marks

Marks are the geometric elements that represent data:

MarkUse CaseDefault Shape
IntervalMarkBar charts, histograms, pie chartsRectShape
LineMarkLine charts, sparklinesBasicLineShape
AreaMarkArea charts, stream graphsBasicAreaShape
PointMarkScatter plots, bubble chartsCircleShape
PolygonMarkHeatmaps, treemapsHeatmapShape
CustomMarkCandlestick, custom shapesAny Shape

See references/marks.md for parameters and references/shapes.md for shape options.

Encodes (Aesthetic Mappings)

Encodes map data values to visual properties. Every encode supports three modes:

  1. Fixed value: ColorEncode(value: Colors.blue)
  2. Variable mapping: ColorEncode(variable: 'type', values: Defaults.colors10)
  3. Custom function: ColorEncode(encoder: (tuple) => myColorLogic(tuple))

Available encodes: ColorEncode, SizeEncode, ShapeEncode, LabelEncode, GradientEncode, ElevationEncode.

See references/encodes.md for details.

Position Algebra (Varset)

Position is specified using Varset algebra with three operators:

OperatorNameEffect
*CrossAssigns variables to different dimensions (x, y)
+BlendCombines variables on the same dimension
/NestGroups data by a variable
// x=date, y=value, grouped by type
position: Varset('date') * Varset('value') / Varset('type')

See references/algebra.md for details.

Coordinates

  • RectCoord — Cartesian coordinates (default). Supports transposed, horizontalRange, verticalRange.
  • PolarCoord — Polar/radial coordinates for pie charts, radar charts, rose charts. Supports startAngle, endAngle, startRadius, endRadius.

See references/coordinates.md for details.

Interaction

Define named selections and use them in encode updaters:

selections: {
  'tap': PointSelection(dim: Dim.x),
},
marks: [
  IntervalMark(
    color: ColorEncode(
      value: Colors.blue,
      updaters: {
        'tap': {
          true: (color) => color.withAlpha(255),   // selected
          false: (color) => color.withAlpha(100),  // not selected
        },
      },
    ),
  ),
],

See references/selections.md for selection types and gesture configuration.

Modifiers

Modifiers handle geometry collision/arrangement:

  • StackModifier() — Stack elements (stacked bar, stacked area)
  • DodgeModifier() — Place side by side (grouped bar)
  • JitterModifier() — Random scatter (strip plot)
  • SymmetricModifier() — Center symmetrically (stream graph)

See references/modifiers.md.

Animation

IntervalMark(
  transition: Transition(duration: Duration(seconds: 1), curve: Curves.easeOut),
  entrance: {MarkEntrance.y},  // Animate from y=0
  tag: (tuple) => tuple['id'].toString(),  // Element matching for transitions
)

See references/animation.md.

Common Chart Recipes

Bar Chart

marks: [IntervalMark()]
coord: RectCoord()  // default

Horizontal Bar Chart

marks: [IntervalMark()]
coord: RectCoord(transposed: true)

Grouped Bar Chart

marks: [
  IntervalMark(
    position: Varset('x') * Varset('y') / Varset('group'),
    color: ColorEncode(variable: 'group', values: Defaults.colors10),
    modifiers: [DodgeModifier()],
  ),
]

Stacked Bar Chart

marks: [
  IntervalMark(
    position: Varset('x') * Varset('y') / Varset('group'),
    color: ColorEncode(variable: 'group', values: Defaults.colors10),
    modifiers: [StackModifier()],
  ),
]

Line Chart

marks: [LineMark()]

Smooth Line Chart

marks: [
  LineMark(shape: ShapeEncode(value: BasicLineShape(smooth: true))),
]

Area Chart

marks: [AreaMark()]

Pie Chart

transforms: [Proportion(variable: 'value', as: 'percent')],
marks: [
  IntervalMark(
    position: Varset('percent') / Varset('category'),
    color: ColorEncode(variable: 'category', values: Defaults.colors10),
    modifiers: [StackModifier()],
  ),
],
coord: PolarCoord(transposed: true, dimCount: 1),

Scatter Plot

marks: [
  PointMark(
    size: SizeEncode(variable: 'magnitude', values: [2, 20]),
    color: ColorEncode(variable: 'type', values: Defaults.colors10),
  ),
]

Rose Chart

marks: [IntervalMark(color: ColorEncode(variable: 'name', values: Defaults.colors10))],
coord: PolarCoord(startRadius: 0.15),

See references/examples.md for more complete examples.

Custom Chart Development

Graphic's greatest strength is its fully customizable rendering pipeline. When standard chart types don't meet requirements, create custom visualizations by implementing your own shapes, tooltips, annotations, and encoders.

Custom Shapes — The Core Extension Point

Create entirely new chart geometries by extending a Shape base class and implementing drawGroupPrimitives():

class LollipopShape extends IntervalShape {
  LollipopShape({this.radius = 6});
  final double radius;

  @override
  List<MarkElement> drawGroupPrimitives(
    List<Attributes> group, CoordConv coord, Offset origin,
  ) {
    final rst = <MarkElement>[];
    for (var item in group) {
      if (item.position.any((p) => !p.dy.isFinite)) continue;
      final style = getPaintStyle(item, false, 0, null, null);
      final base = coord.convert(item.position[0]);
      final tip = coord.convert(item.position[1]);

      // Stem line
      rst.add(PolylineElement(
        points: [base, tip],
        style: PaintStyle(strokeColor: style.fillColor, strokeWidth: 2),
        tag: item.tag,
      ));
      // Circle head
      rst.add(CircleElement(
        center: tip, radius: radius, style: style, tag: item.tag,
      ));
    }
    return rst;
  }

  @override
  bool equalTo(Object other) =>
    other is LollipopShape && radius == other.radius;
}

Available base classes: IntervalShape, LineShape, AreaShape, PointShape, PolygonShape

Available drawing primitives: RectElement, CircleElement, PolygonElement, PolylineElement, ArcElement, SectorElement, SplineElement, PathElement, LabelElement, GroupElement

Custom Tooltip Renderer

tooltip: TooltipGuide(
  renderer: (Size size, Offset anchor, Map<int, Tuple> selected) {
    final t = selected.values.first;
    return [
      RectElement(
        rect: Rect.fromCenter(center: anchor, width: 100, height: 36),
        borderRadius: BorderRadius.circular(6),
        style: PaintStyle(fillColor: Colors.black87, elevation: 4),
      ),
      LabelElement(
        text: '${t['name']}: ${t['value']}',
        anchor: anchor,
        style: LabelStyle(
          textStyle: TextStyle(color: Colors.white, fontSize: 12),
          align: Alignment.center,
        ),
      ),
    ];
  },
)

Custom Encoder Functions

Every encode supports arbitrary logic via encoder:

color: ColorEncode(encoder: (tuple) {
  final v = tuple['value'] as num;
  return v > 100 ? Colors.red : v > 50 ? Colors.orange : Colors.green;
}),

label: LabelEncode(encoder: (tuple) => Label(
  '${tuple['value']}%',
  LabelStyle(textStyle: TextStyle(
    fontSize: (tuple['value'] as num) > 50 ? 14 : 10,
    fontWeight: FontWeight.bold,
  )),
)),

Key Classes for Custom Development

ClassPurpose
AttributesEncoded data element — contains position, color, gradient, size, label, tag
CoordConvConverts normalized [0,1] positions to canvas pixels via convert()/invert()
PaintStyleFull paint specification — fill, stroke, gradient, dash, elevation, shadow
MarkElementDrawing primitives — the building blocks for custom rendering
getPaintStyle()Utility to extract PaintStyle from Attributes

See references/customization.md for the comprehensive guide including coordinate handling, all drawing primitives, custom annotations, custom modifiers, and best practices.

Guides & Annotations

  • Axes: Use Defaults.horizontalAxis, Defaults.verticalAxis for quick setup, or customize with AxisGuide. See references/guides.md.
  • Tooltip: TooltipGuide() with optional custom renderer. See references/guides.md.
  • Crosshair: CrosshairGuide(). See references/guides.md.
  • Annotations: LineAnnotation, RegionAnnotation, TagAnnotation, CustomAnnotation. See references/annotations.md.

Styling

  • PaintStyle — Fill/stroke colors, gradients, dash patterns, shadows
  • LabelStyle — Text style, alignment, rotation, offset
  • Defaults — Built-in color palettes (colors10, colors20), preset axes, default styles

See references/styling.md.

Event Streams

Charts expose StreamController parameters for external event coupling:

  • gestureStream — Send/receive gesture events
  • resizeStream — React to resize events
  • changeDataStream — React to data change events
  • selectionStream (on Mark) — Programmatically set selections

Dynamic Data

Simply update the data parameter via setState():

setState(() {
  data = newData;
});

The chart automatically re-renders with transition animations when tag is set.

Important Notes

  • The Chart widget is the only public widget — all configuration is via its constructor
  • color and gradient on encodes are mutually exclusive
  • Pie charts require Proportion transform + PolarCoord(transposed: true, dimCount: 1)
  • Use tag on marks for smooth transition animations between data states
  • Varset / (nest) operator is required for grouping (multi-series, stacked, dodged)
  • Function-typed properties are always treated as "unchanged" in equality comparisons

Reference Files

FileContent
references/customization.mdCustom chart development guide — shapes, tooltips, annotations, encoders, drawing primitives
references/chart-widget.mdFull Chart widget parameter reference
references/marks.mdAll mark types and parameters
references/encodes.mdAesthetic encoding reference
references/shapes.mdShape types for each mark
references/scales.mdScale types and configuration
references/coordinates.mdCoordinate system reference
references/guides.mdAxis, Tooltip, Crosshair reference
references/annotations.mdAnnotation types reference
references/selections.mdSelection and interaction reference
references/modifiers.mdGeometry modifier reference
references/transforms.mdData transform reference
references/algebra.mdVarset algebra reference
references/animation.mdTransition and entrance animation reference
references/styling.mdPaintStyle, LabelStyle, Defaults reference
references/examples.mdComplete chart examples

When answering user questions, read the source code for the most accurate and up-to-date API details. The library uses extensive code comments as documentation. Key source directories:

  • lib/src/chart/ — Chart widget
  • lib/src/mark/ — Mark types
  • lib/src/encode/ — Encode types
  • lib/src/shape/ — Shape implementations
  • lib/src/scale/ — Scale types
  • lib/src/coord/ — Coordinate systems
  • lib/src/guide/ — Axis, Tooltip, Crosshair, Annotations
  • lib/src/interaction/ — Selection, gestures
  • lib/src/variable/ — Variable and transforms
  • lib/src/algebra/ — Varset algebra
  • lib/src/common/ — Shared types (Label, PaintStyle, Defaults)

平台分布

Codex

35.11%
按下载量换算155

Claude

29.89%
按下载量换算132

Cursor

20.17%
按下载量换算89

Gemini CLI

10.55%
按下载量换算47

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills