package io.github.jjsimas.chart2d;

import java.awt.Color;
import java.util.List;
import java.util.Objects;

public record CartesianSeries(String name, List<Double> values, SeriesRenderer renderer, Color color) {

  public CartesianSeries {
    name = Objects.requireNonNullElse(name, "");
    values = List.copyOf(Objects.requireNonNull(values, "values"));
    renderer = Objects.requireNonNull(renderer, "renderer");
    color = Objects.requireNonNull(color, "color");
  }
}
