chartificial 0.0.2 copy "chartificial: ^0.0.2" to clipboard
chartificial: ^0.0.2 copied to clipboard

Cartesian charts for Flutter on the two-dimensional viewport: lazy paged loading, recycled widget axis labels, scrolling time axes, pluggable series.

Changelog #

0.0.2 #

Scrolling and lazy loading #

  • Loading no longer gates scrolling: while a direction can still load, the scroll boundary stays ahead of the position ("receding runway"), so the user scrolls freely into not-yet-loaded regions instead of bouncing off the loaded edge. The empty region keeps a live axis, pages land behind the user without moving what is on screen, and exhaustion eases the view back to the loaded edge.
  • ChartLoadRequest.suggestedSpanX now also covers the distance the user has scrolled beyond the loaded edge, so a source honoring the hint fills the whole visible gap in one page.
  • New ChartificialController.canLoadMore(direction): whether a direction has a loader callback and has not latched exhausted.
  • isAtLatest / scrollToLatest (and therefore followLatest) now target the newest datum's rest position rather than the scroll extents, which can reach beyond the data while a newer-side loader is active.

0.0.1 #

Initial release.

Chart #

  • Chartificial — a cartesian chart built on Flutter's two-dimensional viewport, with ChartificialController owning data and scroll-domain state and ChartificialTheme for chrome defaults.
  • Bounded-constraint viewport semantics: the chart composes inside SizedBox, Expanded and friends rather than sizing itself to its content.

Series #

  • LineSeries — straight, cardinal and monotone-half-x curves; below-line solid or gradient fill; dashed strokes; position-space stroke gradients; point markers and an endMarker that overflows the plot; explicit gap handling via GapPolicy.
  • BarSeries — floating bars (fromY/toY), per-point styles, gradients, rounded corners, borders, BarBackground tracks, cumulative BarStackSegment stacks, and clustering via xOffsetPx + barClusterOffset. Widths in pixels or in x-domain span.
  • ChartSeries is an open base class: BarSeries is built on the same public interface a consumer would use, and ChartPoint can be subclassed (yExtent keeps auto-ranging correct for range-like data).

Axes #

  • NumericAxis, DateTimeAxis and LogarithmicAxis, over pluggable AxisScale transforms (LinearScale, LogScale).
  • Range policies: AxisRange.auto, .fixed, and .visible (the y axis follows the visible x window). AxisRange is open for implementation and the built-ins compose by delegation.
  • Tick strategies: fixed interval, time interval, target count, pixel-spaced, automatic (numeric and calendar-aware), and decades. AxisTicks is open for implementation.
  • Axis labels are recycled widgets via AxisLabelConfig.builder, with edge clamping, configurable band extent, and an opposed (right) y axis.

Scrolling and lazy loading #

  • AxisResolution.perUnit / .interval make an axis scrollable by fixing pixels-per-unit; AxisAnchor.end pins the newest point to the right edge and scrolls into the past.
  • ChartLoader pages data in as the user approaches either loaded edge, with a prefetch margin, single-flight requests, and latched exhaustion.
  • Prepending history keeps the on-screen pixels stable; followLatest pins a chart resting at the newest edge to incoming points.

Interaction #

  • TrackballBehavior — tap, long-press or hover activation, a snapping tracker line, per-series markers, and a widget tooltip builder.
  • Series own what a pointer snaps to via ChartSeries.snap, so clustered bars snap in visual space and custom series can redefine "nearest" or opt out.
  • Raw onTap / onLongPress / onHover callbacks carrying ChartHitInfo, plus onVisibleRangeChanged.

Painting #

  • ChartDecoration layers behind or above the series; the default grid (GridDecoration) is one of them and can be removed or replaced.
  • ChartColorScale.stops / .bands define color in value space, so band edges stay exact through any axis transform.
  • SeriesRenderSnapshot.geometry lets a series publish per-frame paint products to decorations painted above it.
  • Public geometry and path helpers for custom painters: effectiveSegments, verticalLineCrossings, addCardinal, addMonotoneHalfX, dashPath, belowFillRect, boundsOf.
10
likes
160
points
158
downloads
screenshot

Documentation

API reference

Publisher

verified publisherglynskyi.com

Weekly Downloads

Cartesian charts for Flutter on the two-dimensional viewport: lazy paged loading, recycled widget axis labels, scrolling time axes, pluggable series.

Repository (GitHub)
View/report issues
Contributing

Topics

#chart #visualization #graph #time-series

License

MIT (license)

Dependencies

flutter

More

Packages that depend on chartificial