whycwx
2022-06-13 628f0cc20b8a120b4b11ac3c061aec4e869754b8
src/components/chart/js/getMarkLineData.js
@@ -1,48 +1,73 @@
import getOption from '@/assets/js/config';
function getMarkLineData() {
    return [
        {
            name: '低告警',
            yAxis: 0,
            lineStyle: {
  let arr = [
            {
              name: '低告警',
              yAxis: 0,
              lineStyle: {
                width: 2,
                color: "#f9b253",
            },
            label: {
              },
              label: {
                color: "#000",
                fontSize: 16,
                formatter:"{b}:{c}",
                formatter: "{b}:{c}",
                position: 'middle',
                padding: [6, 4, 2, 4],
                backgroundColor: "#f9b253",
                borderWidth: 2,
                borderColor: "#ffffff",
            },
            emphasis: {
              },
              emphasis: {
                type: "dashed",
              },
            },
        },
        {
            name: '高告警',
            yAxis: 0,
            lineStyle: {
            {
              name: '高告警',
              yAxis: 0,
              lineStyle: {
                width: 2,
                color: "#f83030",
            },
            label: {
              },
              label: {
                color: "#ffffff",
                fontSize: 16,
                formatter:"{b}:{c}",
                formatter: "{b}:{c}",
                position: 'middle',
                padding: [6, 4, 2, 4],
                backgroundColor: "#f83030",
                borderWidth: 2,
                borderColor: "#ffffff",
            },
            emphasis: {
              },
              emphasis: {
                type: "dashed",
              },
            },
        },
    ]
          ];
          if(getOption.clientName.name == "cdsh"){
            arr.push({
              name: '参考线',
              yAxis: 0,
              lineStyle: {
                width: 2,
                color: "#00f7f9",
              },
              label: {
                color: "#000",
                fontSize: 16,
                formatter: "{b}:{c}",
                position: 'middle',
                padding: [6, 4, 2, 4],
                backgroundColor: "#f9b253",
                borderWidth: 2,
                borderColor: "#ffffff",
              },
              emphasis: {
                type: "dashed",
              },
            },)
          }
  return arr;
}
export default getMarkLineData;