Lattice Grid Buy a licence

Kanban ยท console.warn

flow.renderChart needs createChart and createGrid handed in (e.g. from 'lattice-grid/modules/charts' and 'lattice-grid').

Printed by Kanban, prefixed [lattice], since 1.38.0.

Warnings referencekanban:flow-chart-deps

Identifier
kanban:flow-chart-deps
Raised by
Kanban
Since
1.38.0

What happened

flow.renderChart() draws a flow metric as a chart, and it takes both factories as arguments rather than importing them, so that a board that never charts does not pull the charts bundle in. One or both were missing, so nothing was drawn and null was returned.

The fix

Import both and pass them in the deps object.

The smallest fix

import { createChart } from '@toclocoinc/lattice-grid/modules/charts';
import { createHeadlessGrid } from '@toclocoinc/lattice-grid';
board.flow.renderChart('cfd', el, { createChart, createGrid: createHeadlessGrid });

Reference

Covered in full at the API reference.