DataPoint
public struct DataPointA single data point for chart rendering. Blittable struct optimized for GPU upload. Size: 32 bytes for cache-line friendly layout.
Fields
Section titled “Fields”
public float XX-axis Value (primary axis).
Returns
System.Single
public float YY-axis Value (value axis).
Returns
System.Single
public float XEndOptional X-end for range data (Gantt charts, range bars).
Returns
System.Single
public float YEndOptional Y-end for range data.
Returns
System.Single
SeriesIndex
Section titled “SeriesIndex”public int SeriesIndexSeries index for multi-series charts (assigned during grouping).
Returns
System.Int32
public int IdUnique identifier for animation stability. Auto-generated if not provided.
Returns
System.Int32
CategoryIndex
Section titled “CategoryIndex”public int CategoryIndexCategory index for categorical X values.
Returns
System.Int32
Constructors
Section titled “Constructors”
DataPoint(float, float)
Section titled “DataPoint(float, float)”public DataPoint(float x, float y)Creates a scalar XY point whose end coordinates match its start and whose stable identity is derived from both values.
Parameters
| Name | Type |
|---|---|
x |
System.Single |
y |
System.Single |
DataPoint(float, float, int)
Section titled “DataPoint(float, float, int)”public DataPoint(float x, float y, int id)Creates a scalar XY point with a caller-controlled identity for stable animation matching.
Parameters
| Name | Type |
|---|---|
x |
System.Single |
y |
System.Single |
id |
System.Int32 |
DataPoint(float, float, float, float)
Section titled “DataPoint(float, float, float, float)”public DataPoint(float x, float y, float xEnd, float yEnd)Creates a two-dimensional range point and derives its stable identity from all four boundaries.
Parameters
| Name | Type |
|---|---|
x |
System.Single |
y |
System.Single |
xEnd |
System.Single |
yEnd |
System.Single |
Methods
Section titled “Methods”
Equals(DataPoint)
Section titled “Equals(DataPoint)”public readonly bool Equals(DataPoint other)Parameters
| Name | Type |
|---|---|
other |
ChartGuru.DataPoint |
Returns
System.Boolean
Equals(object)
Section titled “Equals(object)”public override readonly bool Equals(object obj)Parameters
| Name | Type |
|---|---|
obj |
System.Object |
Returns
System.Boolean
GetHashCode()
Section titled “GetHashCode()”public override readonly int GetHashCode()Returns
System.Int32
Lerp(DataPoint, DataPoint, float)
Section titled “Lerp(DataPoint, DataPoint, float)”public static DataPoint Lerp(DataPoint a, DataPoint b, float t)Linearly interpolates between two data points.
Parameters
| Name | Type |
|---|---|
a |
ChartGuru.DataPoint |
b |
ChartGuru.DataPoint |
t |
System.Single |
Returns
ChartGuru.DataPoint
ToString()
Section titled “ToString()”public override readonly string ToString()Returns
System.String
Operators
Section titled “Operators”
operator ==(DataPoint, DataPoint)
Section titled “operator ==(DataPoint, DataPoint)”public static bool operator ==(DataPoint left, DataPoint right)Reports whether both points have the same stable identity hash.
Parameters
| Name | Type |
|---|---|
left |
ChartGuru.DataPoint |
right |
ChartGuru.DataPoint |
Returns
System.Boolean
operator !=(DataPoint, DataPoint)
Section titled “operator !=(DataPoint, DataPoint)”public static bool operator !=(DataPoint left, DataPoint right)Reports whether the points have different stable identity hashes.
Parameters
| Name | Type |
|---|---|
left |
ChartGuru.DataPoint |
right |
ChartGuru.DataPoint |
Returns
System.Boolean
Properties
Section titled “Properties”
IsRange
Section titled “IsRange”public readonly bool IsRange { get; }Whether this point represents a range (has different start/end).
Returns
System.Boolean
Position
Section titled “Position”public readonly float2 Position { get; }Gets the position as a float2 (X, Y).
Returns
Unity.Mathematics.float2
EndPosition
Section titled “EndPosition”public readonly float2 EndPosition { get; }Gets the end position for range data as a float2.
Returns
Unity.Mathematics.float2
CenterPosition
Section titled “CenterPosition”public readonly float2 CenterPosition { get; }Gets the center position for range data.
Returns
Unity.Mathematics.float2
public readonly float Width { get; }Gets the width of the range (XEnd - X).
Returns
System.Single
Height
Section titled “Height”public readonly float Height { get; }Gets the height of the range (YEnd - Y).
Returns
System.Single