Class MultiPlot

java.lang.Object
org.aesh.charts.layout.MultiPlot

public class MultiPlot extends Object
Stacks multiple charts vertically with an optional shared X-axis.

Each chart renders independently with its own Y-axis, but they share the same width and can share a common time axis at the bottom.

Example:

 MultiPlot plot = MultiPlot.builder()
         .width(80)
         .build();
 plot.addChart(cpuChart);
 plot.addChart(memChart);
 plot.addChart(latencyChart);
 System.out.println(plot.render());
 
  • Method Details

    • builder

      public static MultiPlot.Builder builder()
    • addChart

      public MultiPlot addChart(LineChart chart)
    • scrollLeft

      public void scrollLeft(int amount)
      Scroll all charts left by the given amount.
    • scrollRight

      public void scrollRight(int amount)
      Scroll all charts right by the given amount.
    • render

      public String render()
      Render all charts stacked vertically with separators.