Class SeriesMetadata

java.lang.Object
com.djrapitops.plan.extension.graph.SeriesMetadata

public class SeriesMetadata extends Object
Represents series metadata presented to the user.

Series is a collection of numbers at the same index in DataPoint. VALUES OF SAME SERIES OF DATA NEED TO BE AT SAME INDEX ALL THE TIME.

  • seriesName: If null "series #n" will be shown instead - max 50 characters.
  • unitLabel: If null "" or no unit will be shown - max 50 characters.
  • formatType: If null no formatting will be applied.
  • hexColor: If null, default color series will be used - max 9 characters, in format #000000 or #00000000 to #ffffff or #ffffffff.
  • Constructor Details

    • SeriesMetadata

      public SeriesMetadata(String seriesName, String unitLabel, GraphFormatType formatType, String hexColor)
      Metadata for series in specific index of DataPoint
      Parameters:
      seriesName - name of the series (falls back to "series #n" if null)
      unitLabel - Unit of measurement the number uses (can be null)
      formatType - Formatting to apply to the number (can be null)
      hexColor - Hex color or one of GraphColors.
  • Method Details

    • builder

      public static SeriesMetadata.Builder builder()
      Get a new builder for SeriesMetadata.
      Returns:
      new builder.
    • getSeriesName

      public String getSeriesName()
    • getUnitLabel

      public String getUnitLabel()
    • getFormatType

      public GraphFormatType getFormatType()
    • getHexColor

      public String getHexColor()