int[id],
          seriesYAxis, renderingConfig);
    });

    // Ensure that the series at the top of the chart are drawn last.
    series.reverse();

    return series;
  }

  /**
   * Transform a list of memory dumps to a list of letter dots (with letter 'M'
   * inside).
   */
  function buildMemoryLetterDots(memoryDumps) {
    const backgroundMemoryColorId =
        ColorScheme.getColorIdForReservedName('background_memory_dump');
    const lightMemoryColorId =
        ColorScheme.getColorIdForReservedN