MCPcopy Create free account
hub / github.com/chartjs/Chart.js / removeBox

Function removeBox

src/core/core.layouts.js:318–323  ·  view source on GitHub ↗

* Remove a layoutItem from a chart * @param {Chart} chart - the chart to remove the box from * @param {LayoutItem} layoutItem - the item to remove from the layout

(chart, layoutItem)

Source from the content-addressed store, hash-verified

316 * @param {LayoutItem} layoutItem - the item to remove from the layout
317 */
318 removeBox(chart, layoutItem) {
319 const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;
320 if (index !== -1) {
321 chart.boxes.splice(index, 1);
322 }
323 },
324
325 /**
326 * Sets (or updates) options on the given `item`.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected