  }

    // Create one common axis for all memory chart series.
    const seriesYAxis = new tr.ui.tracks.ChartSeriesYAxis(0);

    // Build a chart series for each id.
    const series = ids.map(function(id) {
      const colorId = ColorScheme.getColorIdForGeneralPurposeString(
          idToName[id] || id);
      const renderingConfig = {
        chartType: tr.ui.tracks.ChartSeriesType.AREA,
        colorId,
        backgroundOpacity: 0.8
      };
      return new tr.ui.tracks.ChartSeries(idToTimestampToPo