ChartTabularData
public sealed class ChartTabularDataLightweight, in-memory tabular dataset shared by every ChartGuru file and live data source. Produced by ChartGuru.DataSources.Parsers.CsvParser and ChartGuru.DataSources.Parsers.JsonToTabular; consumed by ChartGuru.ChartTabularDataToMarks.
The model is intentionally narrow — strings on disk, typed lookups via
helper methods. This keeps parsing cheap (no boxing of every cell into
object) and lets the mapping layer convert lazily based on the
chosen [ChartGuru.ChartColumnType](/tools/chartguru/api/chartguru-chartcolumntype/).
Properties
Section titled “Properties”
Columns
Section titled “Columns”public string[] Columns { get; }Column display names (header row, or generated Col1..ColN).
Returns
System.String[] — No return description is available.
public ChartColumnType[] Types { get; }Inferred type for each column — same length as ChartGuru.ChartTabularData.Columns.
Returns
ChartGuru.ChartColumnType[] — No return description is available.
public string[] Cells { get; }Row-major cell storage. Cells[r * ColumnCount + c].
Returns
System.String[] — No return description is available.
RowCount
Section titled “RowCount”public int RowCount { get; }Number of data rows (excludes the header).
Returns
System.Int32 — No return description is available.
ColumnCount
Section titled “ColumnCount”public int ColumnCount { get; }Number of columns.
Returns
System.Int32 — No return description is available.
Fields
Section titled “Fields”
public static readonly ChartTabularData EmptyEmpty singleton — handy null-object for failed parses.
Returns
ChartGuru.ChartTabularData — No return description is available.
Constructors
Section titled “Constructors”
ChartTabularData(string[], ChartColumnType[], string[], int)
Section titled “ChartTabularData(string[], ChartColumnType[], string[], int)”public ChartTabularData(string[] columns, ChartColumnType[] types, string[] cells, int rowCount)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
columns |
System.String[] | |
types |
ChartGuru.ChartColumnType[] | |
cells |
System.String[] | |
rowCount |
System.Int32 |
Methods
Section titled “Methods”
IndexOf(string)
Section titled “IndexOf(string)”public int IndexOf(string columnName)Returns the index of the named column, or -1.
Parameters
| Name | Type | Description |
|---|---|---|
columnName |
System.String |
Returns
System.Int32 — No return description is available.
GetCell(int, int)
Section titled “GetCell(int, int)”public string GetCell(int row, int col)Raw cell text at [row, col].
Parameters
| Name | Type | Description |
|---|---|---|
row |
System.Int32 | |
col |
System.Int32 |
Returns
System.String — No return description is available.
GetFloat(int, int, float)
Section titled “GetFloat(int, int, float)”public float GetFloat(int row, int col, float fallback = 0)Parse a cell as System.Single using invariant culture. Returns fallback on failure.
Parameters
| Name | Type | Description |
|---|---|---|
row |
System.Int32 | |
col |
System.Int32 | |
fallback |
System.Single |
Returns
System.Single — No return description is available.
TryGetDateTime(int, int, string, CultureInfo, out DateTime)
Section titled “TryGetDateTime(int, int, string, CultureInfo, out DateTime)”public bool TryGetDateTime(int row, int col, string format, CultureInfo culture, out DateTime value)Parse a cell as System.DateTime using format (or any standard format).
Parameters
| Name | Type | Description |
|---|---|---|
row |
System.Int32 | |
col |
System.Int32 | |
format |
System.String | |
culture |
System.Globalization.CultureInfo | |
value |
System.DateTime |
Returns
System.Boolean — No return description is available.
EnumerateRows()
Section titled “EnumerateRows()”public IEnumerable<ChartTabularRow> EnumerateRows()Iterates rows. Each yielded item is bound to the underlying storage; do not capture across iterations.
Returns
System.Collections.Generic.IEnumerable{ChartGuru.ChartTabularRow} — No return description is available.
ShapeEquals(ChartTabularData, ChartTabularData)
Section titled “ShapeEquals(ChartTabularData, ChartTabularData)”public static bool ShapeEquals(ChartTabularData a, ChartTabularData b)Compares the shape of two datasets — column names, column types,
and row count. Used by the diff fast-path to decide between
Chart.SetValues() (shape unchanged) and Chart.SetData().
Parameters
| Name | Type | Description |
|---|---|---|
a |
ChartGuru.ChartTabularData | |
b |
ChartGuru.ChartTabularData |
Returns
System.Boolean — No return description is available.