(
chart: Chart,
rows: any[],
tableMetadata: any,
conceptShelfItems: FieldItem[],
)
| 35 | * something back. |
| 36 | */ |
| 37 | export function buildEmbeddedDataForChart( |
| 38 | chart: Chart, |
| 39 | rows: any[], |
| 40 | tableMetadata: any, |
| 41 | conceptShelfItems: FieldItem[], |
| 42 | ): any[] { |
| 43 | const fullSpec = assembleVegaChart( |
| 44 | chart.chartType, |
| 45 | chart.encodingMap, |
| 46 | conceptShelfItems, |
| 47 | rows, |
| 48 | tableMetadata, |
| 49 | 300, 300, false, chart.config, |
| 50 | ); |
| 51 | if (!fullSpec || fullSpec === 'Table') return rows; |
| 52 | const values = (fullSpec as any)?.data?.values; |
| 53 | return Array.isArray(values) ? values : rows; |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Build the Vega-Lite spec to send to the restyle agent. |
no test coverage detected