Class StreamgraphRenderer

java.lang.Object
com.arbergashi.charts.render.BaseRenderer
com.arbergashi.charts.render.specialized.StreamgraphRenderer
All Implemented Interfaces:
ChartRenderer

public final class StreamgraphRenderer extends BaseRenderer
Streamgraph renderer: stacked, flowing area plots with optional smoothing. Avoids allocations in the main draw loop by reusing buffers and Path2D.
Since:
2026-01-01
Version:
1.0.0
Author:
Arber Gashi
  • Constructor Details

    • StreamgraphRenderer

      public StreamgraphRenderer()
  • Method Details

    • getPreferredYRange

      public double[] getPreferredYRange(ChartModel model)
      Description copied from interface: ChartRenderer
      Optional Y-range override for autoscaling.

      Renderers may return a {minY, maxY} array when the visible range should be based on derived data rather than the model's raw Y-values (e.g. indicators like MACD).

      Parameters:
      model - the layer model
      Returns:
      {minY, maxY} or null to use model Y-values
    • drawData

      protected void drawData(Graphics2D g2, ChartModel model, PlotContext context)
      Description copied from class: BaseRenderer
      Implementation-specific drawing logic. Must follow Zero-Allocation rules.
      Specified by:
      drawData in class BaseRenderer