Skip to content

Poorgramer-Zack/dart-expert-skills / skills/fl-chart

implementing-fl-chart

Verified

Implements data visualization charts in Flutter using the fl_chart package (v1.3.1). Supports LineChart, BarChart, PieChart, ScatterChart, RadarChart, and CandlestickChart with implicit animations, touch interactivity, and pan/zoom transformations. Use when building any Flutter chart, graph, or data visualization — including line graphs for trends, bar charts for comparisons, pie/donut charts for proportions, scatter plots for distributions, radar charts for multi-axis comparisons, or candlestick charts for financial OHLC data. Also use when customizing chart axes, titles, tooltips, grid lines, touch callbacks, chart animations, or chart zoom/pan behavior.

FileKindSize
SKILL.mdskill md14.3 KB
references/bar_chart.mdmarkdown6.2 KB
references/base_chart.mdmarkdown8.0 KB
references/candlestick_chart.mdmarkdown4.0 KB
references/line_chart.mdmarkdown8.0 KB
references/pie_chart.mdmarkdown3.3 KB
references/radar_chart.mdmarkdown3.8 KB
references/scatter_chart.mdmarkdown3.5 KB

references/bar_chart.md

View on GitHub
# BarChart API Reference

## BarChartData

| Property | Description | Default |
|:---------|:-----------|:--------|
| barGroups | List of [BarChartGroupData](#barchartgroupdata) — one item per group for normal bars | `[]` |
| groupsSpace | Space between groups (only for `.start`, `.center`, `.end` alignment) | `16` |
| alignment | [BarChartAlignment](#barchartalignment) — inspired by MainAxisAlignment | `spaceEvenly` |
| titlesData | [FlTitlesData](./base_chart.md#fltitlesdata) | `FlTitlesData()` |
| rangeAnnotations | [RangeAnnotations](./base_chart.md#rangeannotations) | `RangeAnnotations()` |
| backgroundColor | Background color behind chart | `null` |
| barTouchData | [BarTouchData](#bartouchdata) | `BarTouchData()` |
| gridData | [FlGridData](./base_chart.md#flgriddata) | `FlGridData()` |
| borderData | [FlBorderData](./base_chart.md#flborderdata) | `FlBorderData()` |
| maxY / minY | Y-axis bounds (explicit is more performant) | `null` |
| baselineY | Y-axis baseline | `0` |
| extraLinesData | [ExtraLinesData](./base_chart.md#extralinesdata) — vertical lines are ignored in BarChart | `ExtraLinesData()` |
| rotationQuarterTurns | Rotate chart 90° per quarter turn (1 = horizontal bar chart) | `0` |
| errorIndicatorData | Error indicator for rod `toYErrorRange` | `ErrorIndicatorData()` |

## BarChartAlignment

Enum: `start`, `end`, `center`, `spaceEvenly`, `spaceAround`, `spaceBetween`

## BarChartGroupData

| Property | Description | Default |
|:---------|:-----------|:--------|
| x | X position on horizontal axis | `null` |
| barRods | List of [BarChartRodData](#barchartroddata) | `[]` |
| barsSpace | Space between rods within the group | `2` |
| showingTooltipIndicators | Rod indexes to manually show tooltips (disable touches first) | `[]` |

## BarChartRodData

| Property | Description | Default |
|:---------|:-----------|:--------|
| fromY | Rod start Y value | `0` |
| toY | Rod end Y value | required |
| color | Rod color | `Colors.cyan` |
| gradient | Gradient fill | `null` |
| width | Rod stroke width | `8` |
| borderRadius | Edge rounding (null = fully round) | `null` |
| borderDashArray | Dash pattern for border stroke | `null` |
| borderSide | Border stroke around rod (null = no stroke) | `null` |
| backDrawRodData | [BackgroundBarChartRodData](#backgroundbarchartroddata) for background rod | `null` |
| rodStackItems | List of [BarChartRodStackItem](#barchartrodstackitem) for stacked bars | `[]` |
| toYErrorRange | [FlErrorRange](./base_chart.md#flerrorrange) for error indicator | `null` |
| label | [BarChartRodLabel](#barchartrodlabel) text label on rod | `null` |

## BackgroundBarChartRodData

| Property | Description | Default |
|:---------|:-----------|:--------|
| fromY | Start Y | `0` |
| toY | End Y | `8` |
| show | Show/hide | `false` |
| color | Color | `Colors.blueGrey` |
| gradient | Gradient | `null` |

## BarChartRodStackItem

| Property | Description | Default |
|:---------|:-----------|:--------|
| fromY | Stack item start Y | required |
| toY | Stack item end Y | required |
| color | Stack item color | required |
| gradient | Stack item gradient | `null` |
| label | Text label | `null` |
| labelStyle | TextStyle for label | `null` |
| borderSide | Border stroke per stack item | `null` |

## BarChartRodLabel

Extends [FlLabel](./base_chart.md#fllabel).

| Property | Description | Default |
|:---------|:-----------|:--------|
| show | Show/hide label | `true` |
| text | Label text | `''` |
| style | TextStyle | `null` |
| angle | Rotation in degrees | `0` |
| textDirection | TextDirection | `TextDirection.ltr` |
| offset | Offset from rod tip (`dx` horizontal, `dy` vertical) | `Offset(0, 8)` |

## BarTouchData

| Property | Description | Default |
|:---------|:-----------|:--------|
| enabled | Enable/disable touch | `true` |
| mouseCursorResolver | Custom cursor per event | `MouseCursor.defer` |
| touchTooltipData | [BarTouchTooltipData](#bartouchtooltipdata) | `BarTouchTooltipData()` |
| touchExtraThreshold | Bounding threshold for touch accuracy | `EdgeInsets.all(4)` |
| allowTouchBarBackDraw | Enable touch on background rod | `false` |
| handleBuiltInTouches | Enable built-in tooltip display | `true` |
| touchCallback | `(FlTouchEvent, BarTouchResponse?) → void` | `null` |
| longPressDuration | Custom long-press duration | `null` |

## BarTouchTooltipData

| Property | Description | Default |
|:---------|:-----------|:--------|
| tooltipBorder | Border | `BorderSide.none` |
| tooltipBorderRadius | Corner radius | `BorderRadius.circular(4)` |
| tooltipPadding | Padding | `EdgeInsets.symmetric(horizontal: 16, vertical: 8)` |
| tooltipMargin | Margin from spot | `16` |
| tooltipHorizontalAlignment | Alignment relative to bar | `FLHorizontalAlignment.center` |
| tooltipHorizontalOffset | Horizontal offset | `0` |
| maxContentWidth | Max width before text wrap | `120` |
| getTooltipItem | Callback: `(group, groupIndex, rod, rodIndex) → BarTooltipItem` | `defaultBarTooltipItem` |
| fitInsideHorizontally | Force inside bounds | `false` |
| fitInsideVertically | Force inside bounds | `false` |
| direction | Tooltip direction (top/bottom/auto) | `auto` |
| getTooltipColor | Background color callback | `Colors.blueGrey.darken(15)` |

## BarTooltipItem

| Property | Description | Default |
|:---------|:-----------|:--------|
| text | Text content | `null` |
| textStyle | TextStyle | `null` |
| textAlign | TextAlign | `TextAlign.center` |
| textDirection | TextDirection | `TextDirection.ltr` |
| children | List\<TextSpan\> for rich text | `null` |

## BarTouchResponse

| Property | Description |
|:---------|:-----------|
| touchLocation | Touch position in device pixel coordinates |
| touchChartCoordinate | Touch position in chart coordinates |
| spot | [BarTouchedSpot](#bartouchedspot) |

## BarTouchedSpot

| Property | Description |
|:---------|:-----------|
| touchedBarGroup | The touched BarChartGroupData |
| touchedBarGroupIndex | Index of touched group |
| touchedRodData | The touched BarChartRodData |
| touchedRodDataIndex | Index of touched rod |
| touchedStackItem | Touched BarChartRodStackItem (stacked charts) |
| touchedStackItemIndex | Index of stack item (-1 if none) |
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall