Package limn.components.chart
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 inChart.series()index- the position within the series, the category index, or the slicelabel- the category label forindex, or""when the chart has fewer labels than valuesvalue- the value itself, as the application set it (never the animated in-between)- what fraction of its whole this value is (of the ring in a donut, of its stack in a stacked bar or area), orDouble.NaNwhen the chart stacks nothing and the question has no answerx- 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 arcy- 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
ConstructorsConstructorDescriptionChartPoint(ChartSeries series, int seriesIndex, int index, String label, double value, double share, float x, float y) Creates an instance of aChartPointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.label()Returns the value of thelabelrecord component.series()Returns the value of theseriesrecord component.intReturns the value of theseriesIndexrecord component.doubleshare()Returns the value of thesharerecord component.final StringtoString()Returns a string representation of this record class.doublevalue()Returns the value of thevaluerecord component.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
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 aChartPointrecord class.- Parameters:
series- the value for theseriesrecord componentseriesIndex- the value for theseriesIndexrecord componentindex- the value for theindexrecord componentlabel- the value for thelabelrecord componentvalue- the value for thevaluerecord componentshare- the value for thesharerecord componentx- the value for thexrecord componenty- the value for theyrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
series
Returns the value of theseriesrecord component.- Returns:
- the value of the
seriesrecord component
-
seriesIndex
public int seriesIndex()Returns the value of theseriesIndexrecord component.- Returns:
- the value of the
seriesIndexrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
value
public double value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-