Skip to content

ChartDataMappingSuggester

ClassChartGuruChartGuru
public static class ChartDataMappingSuggester

Heuristic mapping suggester. Given a parsed ChartGuru.ChartTabularData returns a ChartGuru.ChartDataMapping that “does the right thing” for the most common shapes.

Rules (in order):

  1. If the table has columns open/high/low/close (case-insensitive), build an OHLC mapping with the first date/category column as X.
  2. X column = first `ChartGuru.ChartColumnType.Date`; else first `ChartGuru.ChartColumnType.Category`; else none (use row index).
  3. Label column = X column if it's a category, otherwise the first category column.
  4. If exactly one numeric column exists and a non-X category column has cardinality > 1 and < `ChartGuru.ChartTabularData.RowCount`, use long format with that as `ChartGuru.ChartDataMapping.SeriesByColumn`.
  5. Otherwise wide format — every numeric column (excluding X) becomes a Y column.

public static ChartDataMapping Suggest(ChartTabularData data)

No description is available for this member.

Parameters

Name Type Description
data ChartGuru.ChartTabularData

Returns

ChartGuru.ChartDataMapping — No return description is available.