Record Class ChartPoint

java.lang.Object
java.lang.Record
limn.components.chart.ChartPoint
Record Components:
series - the series the value belongs to (in a donut, the ring's series)
seriesIndex - the series' position in Chart.series()
index - the position within the series, the category index, or the slice
label - the category label for index, or "" when the chart has fewer labels than values
value - the value itself, as the application set it (never the animated in-between)
share - what fraction of its whole this value is (of the ring in a donut, of its stack in a stacked bar or area), or Double.NaN when the chart stacks nothing and the question has no answer
x - the mark's anchor x in the chart's local coordinates: the middle of a bar's outer end, the point on a line, the middle of a slice's arc
y - the mark's anchor y in the chart's local coordinates

public record ChartPoint(ChartSeries series, int seriesIndex, int index, String label, double value, double share, float x, float y) extends Record
One datum a chart can point at: what was hovered, what was clicked, what a tooltip row is about.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChartPoint(ChartSeries series, int seriesIndex, int index, String label, double value, double share, float x, float y)
    Creates an instance of a ChartPoint record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the index record component.
    Returns the value of the label record component.
    Returns the value of the series record component.
    int
    Returns the value of the seriesIndex record component.
    double
    Returns the value of the share record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the value record component.
    float
    x()
    Returns the value of the x record component.
    float
    y()
    Returns the value of the y record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ChartPoint

      public ChartPoint(ChartSeries series, int seriesIndex, int index, String label, double value, double share, float x, float y)
      Creates an instance of a ChartPoint record class.
      Parameters:
      series - the value for the series record component
      seriesIndex - the value for the seriesIndex record component
      index - the value for the index record component
      label - the value for the label record component
      value - the value for the value record component
      share - the value for the share record component
      x - the value for the x record component
      y - the value for the y record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • series

      public ChartSeries series()
      Returns the value of the series record component.
      Returns:
      the value of the series record component
    • seriesIndex

      public int seriesIndex()
      Returns the value of the seriesIndex record component.
      Returns:
      the value of the seriesIndex record component
    • index

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • value

      public double value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • share

      public double share()
      Returns the value of the share record component.
      Returns:
      the value of the share record component
    • x

      public float x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public float y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component