Ta4j Wiki

Documentation, examples and further information of the ta4j project

View the Wiki On GitHub

This project is maintained by ta4j Organization

PRD: Charting Refactor Checklist

Status: Completed (2026-01-31)

Goals

Guiding principles

Current focus area

Prioritized refactor opportunities

  1. P0 - TradingChartFactory is a god class (dataset creation, axis config, renderer styling, overlays, tooltips). Minimal path: extract focused helpers (AxisFactory, DatasetFactory, OverlayRenderer) without changing behavior.
  2. P0 - Repeated REAL_TIME vs BAR_INDEX branching across dataset creation, tooltips, and axis labels. Minimal path: introduce a TimeAxisModeStrategy interface that supplies axis, x-values, and tooltip formatting.
  3. P1 - ChartWorkflow has many overloads with repeated validation. Minimal path: shared validation + chart creation helpers, keep current overloads delegating.
  4. P1 - ChartBuilder stores timeAxisMode on builder but does not expose it in a dedicated config object. Minimal path: introduce ChartDefinitionMetadata or ChartContext that carries timeAxisMode + domain series.
  5. P2 - Chart styling (background, anti-alias, title paint) is duplicated across factory methods. Minimal path: private applyChartStyling(JFreeChart chart) helper.

Implementation status

Test coverage gaps

Step-by-step checklist

Open questions

References