Загрузка данных


const initialIndicators = flatten(
  panesSnapshot.map((pane) =>
    pane.indicators.map((indicator) => ({
      ...indicator,
      paneId: pane.id,
    })),
  ),
);

const indicatorSnapshots = initialIndicators.filter(
  (indicator) => indicator.indicatorType !== undefined,
);

const compareSnapshots = initialIndicators.filter(
  (indicator) => indicator.indicatorType === undefined,
);

this.indicatorManager = new IndicatorManager({
  eventManager,
  initialIndicators: indicatorSnapshots,
  DOM: this.DOM,
  dataSource: this.dataSource,
  lwcChart: this.lwcChart,
  paneManager: this.paneManager,
  chartOptions,
});

this.compareManager = new CompareManager({
  chart: this.lwcChart,
  initialIndicators: compareSnapshots,
  eventManager: this.eventManager,
  dataSource: this.dataSource,
  indicatorManager: this.indicatorManager,
  paneManager: this.paneManager,
});