Interface ChartTheme
- All Known Implementing Classes:
BasicChartTheme
public interface ChartTheme
Chart theme interface for providing colors and fonts to renderers.
This interface defines the contract for chart theming. Implementations should be immutable to ensure thread-safety and predictable behavior during runtime theme switching.
- Since:
- 2026-01-16
- Version:
- 1.0.0
- Author:
- Arber Gashi
-
Method Summary
Modifier and TypeMethodDescriptionGets the accent color (primary highlight color).Gets the color for axis labels.Gets the background color for the chart panel.Gets the base font for chart text.default ColorGets the bearish color for financial charts.default ColorGets the bullish color for financial charts.Gets the foreground color for text and lines.Gets the grid color for axes and grid lines.getSeriesColor(int index) Gets a series color by index.
-
Method Details
-
getBackground
-
getForeground
-
getGridColor
-
getAxisLabelColor
-
getAccentColor
-
getSeriesColor
Gets a series color by index.Implementations should cycle through available colors using modulo arithmetic to ensure a valid color is always returned.
- Parameters:
index- The series index (0-based)- Returns:
- The series color for the given index
-
getBaseFont
-
getBullishColor
Gets the bullish color for financial charts.Default implementation returns green. Override for custom financial themes.
- Returns:
- The bullish color (default: green)
-
getBearishColor
Gets the bearish color for financial charts.Default implementation returns red. Override for custom financial themes.
- Returns:
- The bearish color (default: red)
-