MCPcopy Create free account
hub / github.com/microsoft/data-formulator / resolveChartForTable

Function resolveChartForTable

src/app/useFormulateData.ts:94–97  ·  view source on GitHub ↗

* Resolve the actual chart that's rendered for a derived table. The * `trigger.chart` saved on the table is just an "Auto" stub generated * during the agent run — the chart the user actually sees lives in the * Redux `charts` slice. Mirrors the lookup in `SimpleChartRecBox`.

(tableId: string)

Source from the content-addressed store, hash-verified

92 * Redux `charts` slice. Mirrors the lookup in `SimpleChartRecBox`.
93 */
94 function resolveChartForTable(tableId: string) {
95 return charts.find(c => c.tableRef === tableId && c.source === 'trigger')
96 || charts.find(c => c.tableRef === tableId);
97 }
98
99 /** Map a chart's encodingMap to `{ channel: fieldName }` (skips empties). */
100 function chartEncodingsByName(chart: Chart | undefined): Record<string, string> {

Callers 2

buildFocusedThreadFunction · 0.85
buildOtherThreadsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected