drawActiveChart()

in frontend/app/components/memory_viewer/program_order_chart/program_order_chart.ts [50:101]


  drawActiveChart() {
    if (!this.activeChart) {
      return;
    }

    if (!this.activeInfo) {
      this.activeChart.clearChart();
      return;
    }

    const dataTable = google.visualization.arrayToDataTable([
      ['X', 'Size'],
      [this.activeInfo.alloc, this.activeInfo.size],
      [this.activeInfo.free, this.activeInfo.size],
    ]);

    const options = {
      areaOpacity: 0.7,
      backgroundColor: 'transparent',
      chartArea: {
        left: 50,
        right: 50,
        width: '90%',
        height: '90%',
      },
      colors: [this.activeInfo.color || ''],
      focusTarget: 'none',
      hAxis: {
        baselineColor: 'transparent',
        gridlines: {color: 'transparent'},
        textPosition: 'none',
        viewWindow: {
          min: 0,
          max: this.maxOrder,
        },
      },
      vAxis: {
        baselineColor: 'transparent',
        gridlines: {color: 'transparent'},
        textPosition: 'none',
        viewWindow: {
          min: 0,
          max: this.maxSize,
        },
      },
      legend: {position: 'none'},
      lineWidth: 2,
    };

    this.activeChart.draw(
        dataTable, options as google.visualization.AreaChartOptions);
  }