All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Accessibility (ARIA + keyboard):
title:anddescription:options on charts,role="img"andaria-labelon SVG elements,aria-hiddenon decorative elements (grid, crosshair, reference lines),aria-labelon data points - Empty state: Centered "No data available" message (customizable via
empty_message:) when data array is empty, with placeholder icon - Data labels:
c.data_label format: :currency, position: :topto render formatted values directly on bars, lines, scatter dots, and pie slices - Sparklines:
trackplot_sparkline @data, key: :revenuehelper for inline mini-charts (line, bar, area) via<trackplot-sparkline>custom element - Stacked bars:
c.bar :revenue, stack: "main"now renders stacked bars usingd3.stack(), matching the existing stacked area pattern - Dual Y-axis:
c.axis :y, axis_id: :rightcreates a right-side axis; series bind viay_axis: :right - Export to PNG/SVG:
element.exportPNG()andelement.exportSVG()methods on<trackplot-chart>for downloading charts - ViewComponent support:
Trackplot::Component(optional, requiresview_componentgem) - Phlex support:
Trackplot::PhlexComponent(optional, requiresphlexgem) - Brush/zoom:
c.brush(axis: :x)for interactive range selection on cartesian charts with mini preview - Real-time data append:
element.appendData(newPoints, { maxPoints: 50 })for live dashboard updates withtrackplot:data-updateevent - Heatmap chart type:
c.heatmap(x_key: :day, y_key: :hour, value_key: :count)for density/intensity visualization - Treemap chart type:
c.treemap(value_key: :size, label_key: :name)for hierarchical data with optionalparent_keygrouping
- Initial release with 10 chart types: Line, Bar, Area (with stacking), Scatter, Pie/Donut, Radar, Horizontal Bar, Candlestick, Funnel
- Declarative Ruby DSL via
trackplot_charthelper with block syntax - D3.js rendering via
<trackplot-chart>custom element - Theming system with 4 presets (default, dark, vibrant, minimal) and custom hash support
- Tooltip with crosshair for cartesian charts, hover tooltips for pie/radar/funnel
- Legend component with configurable position
- Grid lines (horizontal/vertical)
- Reference lines (horizontal/vertical) with labels, colors, and dash styles
- Format helpers (
:currency,:percent,:compact,:decimal,:integer) for axes and tooltips - Click events via
trackplot:clickcustom event with datum detail - Turbo support: stable
id:option,turbo:before-cachecleanup,updateData()/updateConfig()public API - ResizeObserver for responsive re-rendering
- Importmap integration via Rails engine
- Animated transitions with configurable
animate:option - DataAdapter: normalizes Hash, Array, ActiveRecord::Relation inputs to string-keyed hashes