(charts)
| 63 | const _shouldAutoNameChart = (chartId) => _getStoredPendingChartIds().includes(chartId); |
| 64 | |
| 65 | const _getNewChartLayout = (charts) => { |
| 66 | const layouts = getDashboardLayout(charts); |
| 67 | const chartLayout = {}; |
| 68 | |
| 69 | Object.keys(layouts).forEach((bp) => { |
| 70 | const w = bp === "lg" ? 4 : bp === "md" ? 5 : bp === "sm" ? 3 : bp === "xs" ? 2 : 2; |
| 71 | const pos = placeNewWidget(layouts[bp] || [], { w, h: 2 }, bp); |
| 72 | chartLayout[bp] = [pos.x, pos.y, pos.w, pos.h]; |
| 73 | }); |
| 74 | |
| 75 | return chartLayout; |
| 76 | }; |
| 77 | |
| 78 | /* |
| 79 | Container used for setting up a new chart |
no test coverage detected