|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [0.2.0] - Unreleased |
| 9 | + |
| 10 | +### Added |
| 11 | +- **Accessibility (ARIA + keyboard)**: `title:` and `description:` options on charts, `role="img"` and `aria-label` on SVG elements, `aria-hidden` on decorative elements (grid, crosshair, reference lines), `aria-label` on data points |
| 12 | +- **Empty state**: Centered "No data available" message (customizable via `empty_message:`) when data array is empty, with placeholder icon |
| 13 | +- **Data labels**: `c.data_label format: :currency, position: :top` to render formatted values directly on bars, lines, scatter dots, and pie slices |
| 14 | +- **Sparklines**: `trackplot_sparkline @data, key: :revenue` helper for inline mini-charts (line, bar, area) via `<trackplot-sparkline>` custom element |
| 15 | +- **Stacked bars**: `c.bar :revenue, stack: "main"` now renders stacked bars using `d3.stack()`, matching the existing stacked area pattern |
| 16 | +- **Dual Y-axis**: `c.axis :y, axis_id: :right` creates a right-side axis; series bind via `y_axis: :right` |
| 17 | +- **Export to PNG/SVG**: `element.exportPNG()` and `element.exportSVG()` methods on `<trackplot-chart>` for downloading charts |
| 18 | +- **ViewComponent support**: `Trackplot::Component` (optional, requires `view_component` gem) |
| 19 | +- **Phlex support**: `Trackplot::PhlexComponent` (optional, requires `phlex` gem) |
| 20 | +- **Brush/zoom**: `c.brush(axis: :x)` for interactive range selection on cartesian charts with mini preview |
| 21 | +- **Real-time data append**: `element.appendData(newPoints, { maxPoints: 50 })` for live dashboard updates with `trackplot:data-update` event |
| 22 | +- **Heatmap chart type**: `c.heatmap(x_key: :day, y_key: :hour, value_key: :count)` for density/intensity visualization |
| 23 | +- **Treemap chart type**: `c.treemap(value_key: :size, label_key: :name)` for hierarchical data with optional `parent_key` grouping |
| 24 | + |
| 25 | +## [0.1.0] - 2025-01-01 |
| 26 | + |
| 27 | +### Added |
| 28 | +- Initial release with 10 chart types: Line, Bar, Area (with stacking), Scatter, Pie/Donut, Radar, Horizontal Bar, Candlestick, Funnel |
| 29 | +- Declarative Ruby DSL via `trackplot_chart` helper with block syntax |
| 30 | +- D3.js rendering via `<trackplot-chart>` custom element |
| 31 | +- Theming system with 4 presets (default, dark, vibrant, minimal) and custom hash support |
| 32 | +- Tooltip with crosshair for cartesian charts, hover tooltips for pie/radar/funnel |
| 33 | +- Legend component with configurable position |
| 34 | +- Grid lines (horizontal/vertical) |
| 35 | +- Reference lines (horizontal/vertical) with labels, colors, and dash styles |
| 36 | +- Format helpers (`:currency`, `:percent`, `:compact`, `:decimal`, `:integer`) for axes and tooltips |
| 37 | +- Click events via `trackplot:click` custom event with datum detail |
| 38 | +- Turbo support: stable `id:` option, `turbo:before-cache` cleanup, `updateData()` / `updateConfig()` public API |
| 39 | +- ResizeObserver for responsive re-rendering |
| 40 | +- Importmap integration via Rails engine |
| 41 | +- Animated transitions with configurable `animate:` option |
| 42 | +- DataAdapter: normalizes Hash, Array, ActiveRecord::Relation inputs to string-keyed hashes |
0 commit comments