getOptionThum()

in ui/angular/src/app/service/chart.service.ts [189:266]


  getOptionThum(metric) {
    var data = this.getMetricData(metric);
    var trail = '...';
    var self = this;
    var option = {
      title: {
        text: metric.name.length > 10 ? metric.name.substring(0, 10) + trail : metric.name,
        left: "center",
        textStyle: {
          fontWeight: "normal",
          fontSize: 15,
          color: "white"
        }
      },
      backgroundColor: "transparent",
      grid: {
        right: "7%",
        left: "5%",
        bottom: "5%",
        containLabel: true
      },
      tooltip: {
        trigger: "axis",
        formatter: function (params) {
          return self.getTooltip(params);
        },
        position: function (point, params, dom) {
          return self.getTooltipPosition(point, params, dom);
        }
      },
      xAxis: {
        axisLine: {
          lineStyle: {
            color: "white"
          }
        },
        type: "time",
        splitLine: {
          show: false
        },
        axisLabel: {
          color: "white"
        },
        nameTextStyle: {
          color: "white"
        },
        splitNumber: 2
      },

      yAxis: {
        type: "value",
        scale: true,
        name: "accuracy%",
        axisLabel: {
          formatter: this.formatter_value,
          color: "white"
        },
        splitLine: {
          lineStyle: {
            type: "dashed"
          }
        },
        axisLine: {
          lineStyle: {
            color: "white"
          }
        },
        nameTextStyle: {
          color: "white"
        },
        splitNumber: 2,
        max: 100
      },
      series: {}
    };
    option.series = this.getSeries(metric);
    return option;
    // }