Interface specifies that Engine should not think about its own size and simply fit itself into an existing element on the document, which should be created by user.

Hierarchy

  • FitEngineToDiv

Properties

Properties

container?: string | HTMLDivElement

The DOM Element or its ID that will contain the chart. If there is no such element found, the chart will not work.

If nothing was provided, LCJS will automatically append a new DIV element on the document for the chart.

Resizing chart:

When the chart is inside a container managed by user, manual trigger of chart resize is required:

 // Example syntax, trigger chart resize on user event.
myResizeEventCallback(() => {
// Trigger chart resize manually.
chart.engine.layout()
})

For more information, see PublicEngine.