CsvChartDataSource
[AddComponentMenu("ChartGuru/Data Sources/CSV Chart Data Source")][DisallowMultipleComponent]public sealed class CsvChartDataSource : ChartFileDataSourceBase, IChartDataSourceReads CSV (or any separated-values text) from a TextAsset, project file, absolute path, StreamingAssets file, or inline string and pushes it to one or more target charts. Auto-detects delimiter, header row, and column types — but everything is overridable in the inspector.
Optionally watches the source file with a FileSystemWatcher
(Editor-only by default; opt-in at runtime via `ChartGuru.CsvChartDataSource.WatchFileAtRuntime`).
Properties
Section titled “Properties”
SourceMode
Section titled “SourceMode”public ChartFileSourceMode SourceMode { get; set; }No description is available for this member.
Returns
ChartGuru.ChartFileSourceMode — No return description is available.
TextAsset
Section titled “TextAsset”public TextAsset TextAsset { get; set; }No description is available for this member.
Returns
UnityEngine.TextAsset — No return description is available.
ProjectPath
Section titled “ProjectPath”public string ProjectPath { get; set; }No description is available for this member.
Returns
System.String — No return description is available.
AbsolutePath
Section titled “AbsolutePath”public string AbsolutePath { get; set; }No description is available for this member.
Returns
System.String — No return description is available.
StreamingAssetsPath
Section titled “StreamingAssetsPath”public string StreamingAssetsPath { get; set; }No description is available for this member.
Returns
System.String — No return description is available.
InlineText
Section titled “InlineText”public string InlineText { get; set; }No description is available for this member.
Returns
System.String — No return description is available.
WatchFileAtRuntime
Section titled “WatchFileAtRuntime”public bool WatchFileAtRuntime { get; set; }Toggle runtime file watching. Disposes the watcher when set to false.
Returns
System.Boolean — No return description is available.
Methods
Section titled “Methods”
LoadText()
Section titled “LoadText()”protected override string LoadText()Subclasses override to obtain the raw text payload synchronously. Return an empty string to signal “no data”.
Returns
System.String — No return description is available.
ParseToTabular(string)
Section titled “ParseToTabular(string)”protected override ChartTabularData ParseToTabular(string rawText)Convert raw text to a ChartGuru.ChartTabularData. Implemented per source (CSV vs JSON).
Parameters
| Name | Type | Description |
|---|---|---|
rawText |
System.String |
Returns
ChartGuru.ChartTabularData — No return description is available.
LoadFromText(string)
Section titled “LoadFromText(string)”public void LoadFromText(string csvText)Set inline CSV text and immediately refresh. Convenience shortcut for
SourceMode = InlineText; InlineText = …; Refresh();.
Parameters
| Name | Type | Description |
|---|---|---|
csvText |
System.String | |
LoadAsset(TextAsset)
Section titled “LoadAsset(TextAsset)”public void LoadAsset(TextAsset asset)Set a TextAsset source and immediately refresh. Convenience shortcut for
SourceMode = TextAsset; TextAsset = …; Refresh();.
Parameters
| Name | Type | Description |
|---|---|---|
asset |
UnityEngine.TextAsset | |
AutoDetectFormat()
Section titled “AutoDetectFormat()”public bool AutoDetectFormat()Read the configured source, auto-detect a sensible delimiter and
header mode, and write the results into _delimiterOverride /
_headerMode. Designed for the inspector “Auto Detect Format”
button — call once after picking a file to lock in explicit values
instead of relying on per-parse auto-detection (which can flip
between commits when data changes).
Returns
System.Boolean — True when detection succeeded and at least one field was updated.
OnEnable()
Section titled “OnEnable()”protected override void OnEnable()No description is available for this member.