ManualChartDataSource
public class ManualChartDataSource : ChartDataSourceValues typed in the Inspector or set from code, published as a ChartDataFrame: a label, date or
X column followed by one value column per series. Like every data source it feeds the chart on its GameObject and
the charts below it that have no data of their own.
Remarks
Section titled “Remarks”Colors, gradients, symbols, reference rules and 3D mark settings belong to the chart definition. The fields a Chart Guru 1.3 scene saved for them stay serialized and are not applied.
Fields
Section titled “Fields”
LabelColumnName
Section titled “LabelColumnName”public const string LabelColumnName = "Label"Name of the text column that holds the point labels.
Returns
System.String
DateColumnName
Section titled “DateColumnName”public const string DateColumnName = "Date"Name of the date column published when every label is an ISO date.
Returns
System.String
XColumnName
Section titled “XColumnName”public const string XColumnName = "X"Name of the number column published when points carry explicit X values.
Returns
System.String
DefaultValueColumnName
Section titled “DefaultValueColumnName”public const string DefaultValueColumnName = "Value"Name of the value column when the series has no name.
Returns
System.String
CategoryColumnName
Section titled “CategoryColumnName”public const string CategoryColumnName = "Category"Optional per-point columns of Single Series mode. Each is published only when a point uses it.
Returns
System.String
ColorColumnName
Section titled “ColorColumnName”public const string ColorColumnName = "Color"Returns
System.String
OpacityColumnName
Section titled “OpacityColumnName”public const string OpacityColumnName = "Opacity"Returns
System.String
SizeColumnName
Section titled “SizeColumnName”public const string SizeColumnName = "Size"Returns
System.String
SymbolColumnName
Section titled “SymbolColumnName”public const string SymbolColumnName = "Symbol"Returns
System.String
RotationColumnName
Section titled “RotationColumnName”public const string RotationColumnName = "Rotation"Returns
System.String
ClipShapeColumnName
Section titled “ClipShapeColumnName”public const string ClipShapeColumnName = "ClipShape"Returns
System.String
ClipInsetColumnName
Section titled “ClipInsetColumnName”public const string ClipInsetColumnName = "ClipInset"Returns
System.String
XStartColumnName
Section titled “XStartColumnName”public const string XStartColumnName = "XStart"Start of a range on X. A point saved with range data keeps it in its X value.
Returns
System.String
XEndColumnName
Section titled “XEndColumnName”public const string XEndColumnName = "XEnd"Returns
System.String
YStartColumnName
Section titled “YStartColumnName”public const string YStartColumnName = "YStart"Returns
System.String
YEndColumnName
Section titled “YEndColumnName”public const string YEndColumnName = "YEnd"Returns
System.String
ZColumnName
Section titled “ZColumnName”public const string ZColumnName = "Z"Returns
System.String
ZEndColumnName
Section titled “ZEndColumnName”public const string ZEndColumnName = "ZEnd"Returns
System.String
Methods
Section titled “Methods”
AddDataPoint(string, float)
Section titled “AddDataPoint(string, float)”public void AddDataPoint(string label, float value)Adds a labelled point to the single series.
Parameters
| Name | Type |
|---|---|
label | System.String |
value | System.Single |
AddDataPoint(string, float, Color)
Section titled “AddDataPoint(string, float, Color)”public void AddDataPoint(string label, float value, Color color)Adds a labelled point with its own color, published in the Color column.
Parameters
| Name | Type |
|---|---|
label | System.String |
value | System.Single |
color | UnityEngine.Color |
AddDataPoint(float, float)
Section titled “AddDataPoint(float, float)”public void AddDataPoint(float x, float y)Adds a point with an explicit X value to the single series.
Parameters
| Name | Type |
|---|---|
x | System.Single |
y | System.Single |
InsertDataPoint(int, string, float)
Section titled “InsertDataPoint(int, string, float)”public void InsertDataPoint(int index, string label, float value)Inserts a labelled point into the single series.
Parameters
| Name | Type |
|---|---|
index | System.Int32 |
label | System.String |
value | System.Single |
InsertDataPoint(int, float, float)
Section titled “InsertDataPoint(int, float, float)”public void InsertDataPoint(int index, float x, float y)Inserts a point with an explicit X value into the single series.
Parameters
| Name | Type |
|---|---|
index | System.Int32 |
x | System.Single |
y | System.Single |
RemoveDataPointAt(int)
Section titled “RemoveDataPointAt(int)”public void RemoveDataPointAt(int index)Removes one point of the single series. An index outside the list is ignored.
Parameters
| Name | Type |
|---|---|
index | System.Int32 |
SetValue(int, float)
Section titled “SetValue(int, float)”public void SetValue(int index, float value)Changes the value of one point of the single series. Bound charts update the value in place.
Parameters
| Name | Type |
|---|---|
index | System.Int32 |
value | System.Single |
ClearData()
Section titled “ClearData()”public void ClearData()Removes every point and series and withdraws the published frame.
SetData(string[], float[])
Section titled “SetData(string[], float[])”public void SetData(string[] labels, float[] values)Replaces the single series with labelled values. Extra labels or values are ignored.
Parameters
| Name | Type |
|---|---|
labels | System.String[] |
values | System.Single[] |
SetData(Dictionary<string, float>)
Section titled “SetData(Dictionary<string, float>)”public void SetData(Dictionary<string, float> data)Replaces the single series with the entries of a dictionary, in its enumeration order.
Parameters
| Name | Type |
|---|---|
data | System.Collections.Generic.Dictionary{System.String,System.Single} |
SetData(float[])
Section titled “SetData(float[])”public void SetData(float[] values)Replaces the single series with values at X positions 0, 1, 2 and so on.
Parameters
| Name | Type |
|---|---|
values | System.Single[] |
SetData(float[], float[])
Section titled “SetData(float[], float[])”public void SetData(float[] xValues, float[] yValues)Replaces the single series with X and Y pairs. Extra X or Y values are ignored.
Parameters
| Name | Type |
|---|---|
xValues | System.Single[] |
yValues | System.Single[] |
SetData(Vector2[])
Section titled “SetData(Vector2[])”public void SetData(Vector2[] points)Replaces the single series with points, X and Y taken from each vector.
Parameters
| Name | Type |
|---|---|
points | UnityEngine.Vector2[] |
SetData(IEnumerable, Func<T, string>, Func<T, float>)
Section titled “SetData(IEnumerable, Func<T, string>, Func<T, float>)”public void SetData<T>(IEnumerable<T> data, Func<T, string> labelSelector, Func<T, float> valueSelector)Replaces the single series with labelled values selected from a collection.
Parameters
| Name | Type |
|---|---|
data | System.Collections.Generic.IEnumerable{{T}} |
labelSelector | System.Func{{T},System.String} |
valueSelector | System.Func{{T},System.Single} |
SetData(IEnumerable, Func<T, float>, Func<T, float>)
Section titled “SetData(IEnumerable, Func<T, float>, Func<T, float>)”public void SetData<T>(IEnumerable<T> data, Func<T, float> xSelector, Func<T, float> ySelector)Replaces the single series with X and Y pairs selected from a collection.
Parameters
| Name | Type |
|---|---|
data | System.Collections.Generic.IEnumerable{{T}} |
xSelector | System.Func{{T},System.Single} |
ySelector | System.Func{{T},System.Single} |
ConfigureSingleSeries(string, IEnumerable)
Section titled “ConfigureSingleSeries(string, IEnumerable)”public void ConfigureSingleSeries(string seriesName, IEnumerable<ChartDataEntry> dataPoints)Switches to Single Series mode with the given name and points. The list is copied.
Parameters
| Name | Type |
|---|---|
seriesName | System.String |
dataPoints | System.Collections.Generic.IEnumerable{ChartGuru.ChartDataEntry} |
ConfigureMultiSeries(List)
Section titled “ConfigureMultiSeries(List)”public void ConfigureMultiSeries(List<ChartDataSeries> dataSeries)Switches to Multi Series mode with the given series. The list is used as passed.
Parameters
| Name | Type |
|---|---|
dataSeries | System.Collections.Generic.List{ChartGuru.ChartDataSeries} |
Refresh()
Section titled “Refresh()”public override void Refresh()Builds the frame from the current points and publishes it. Without points the frame is withdrawn.
Constructors
Section titled “Constructors”
ManualChartDataSource()
Section titled “ManualChartDataSource()”public ManualChartDataSource()Properties
Section titled “Properties”
DataMode
Section titled “DataMode”public DataMode DataMode { get; set; }Whether the points come from ManualChartDataSource.DataPoints or from ManualChartDataSource.DataSeries.
Returns
ChartGuru.DataMode
SeriesName
Section titled “SeriesName”public string SeriesName { get; set; }Name of the value column in Single Series mode.
Returns
System.String
DataPoints
Section titled “DataPoints”public List<ChartDataEntry> DataPoints { get; set; }The points of Single Series mode. Call ManualChartDataSource.Refresh() after changing the list or an entry in place.
Returns
System.Collections.Generic.List{ChartGuru.ChartDataEntry}
DataSeries
Section titled “DataSeries”public List<ChartDataSeries> DataSeries { get; set; }The series of Multi Series mode. Call ManualChartDataSource.Refresh() after changing the list or a series in place.
Returns
System.Collections.Generic.List{ChartGuru.ChartDataSeries}
public int Count { get; }Number of points in Single Series mode, number of series in Multi Series mode.
Returns
System.Int32
HasUnappliedLegacySettings
Section titled “HasUnappliedLegacySettings”public bool HasUnappliedLegacySettings { get; }True when saved Chart Guru 1.3 styling or extra marks are present that this source no longer applies.
Returns
System.Boolean