update
This commit is contained in:
		@@ -106,7 +106,12 @@ function getOptions(source, period, trend) {
 | 
			
		||||
  if (trend[source].length === 0) return null;
 | 
			
		||||
  return {
 | 
			
		||||
    color: ["#FFD160", "#12FFF5", "#2760FF"],
 | 
			
		||||
    grid: { top: 40, right: 12, bottom: 20, left: 56 },
 | 
			
		||||
    grid: {
 | 
			
		||||
      top: 40,
 | 
			
		||||
      right: 12,
 | 
			
		||||
      bottom: 20,
 | 
			
		||||
      left: source == "O2_float" ? 56 : 72,
 | 
			
		||||
    },
 | 
			
		||||
    xAxis: {
 | 
			
		||||
      type: "category",
 | 
			
		||||
      //   data: Array(7)
 | 
			
		||||
@@ -136,14 +141,14 @@ function getOptions(source, period, trend) {
 | 
			
		||||
      name: source == "O2_float" ? "单位:%" : "单位mg/m³",
 | 
			
		||||
      nameTextStyle: {
 | 
			
		||||
        color: "#fff",
 | 
			
		||||
        fontSize: 16,
 | 
			
		||||
        fontSize: 13,
 | 
			
		||||
        align: "right",
 | 
			
		||||
      },
 | 
			
		||||
      type: "value",
 | 
			
		||||
      axisLabel: {
 | 
			
		||||
        color: "#fff",
 | 
			
		||||
        fontSize: 14,
 | 
			
		||||
        formatter: "{value} %",
 | 
			
		||||
        formatter: "{value}",
 | 
			
		||||
      },
 | 
			
		||||
      axisLine: {
 | 
			
		||||
        show: true,
 | 
			
		||||
@@ -162,7 +167,11 @@ function getOptions(source, period, trend) {
 | 
			
		||||
    },
 | 
			
		||||
    series: [
 | 
			
		||||
      {
 | 
			
		||||
        data: trend[source].map((item) => !(item.value == null || isNaN(+item.value)) ? (+item.value).toFixed(2) : null),
 | 
			
		||||
        data: trend[source].map((item) =>
 | 
			
		||||
          !(item.value == null || isNaN(+item.value))
 | 
			
		||||
            ? (+item.value).toFixed(2)
 | 
			
		||||
            : null
 | 
			
		||||
        ),
 | 
			
		||||
        type: "line",
 | 
			
		||||
        areaStyle: {
 | 
			
		||||
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,7 @@ function getOptions(source, period, trend) {
 | 
			
		||||
  if (trend[source].length == 0) return null;
 | 
			
		||||
  return {
 | 
			
		||||
    color: ["#FFD160", "#12FFF5", "#2760FF"],
 | 
			
		||||
    grid: { top: 40, right: 12, bottom: 20, left: 56 },
 | 
			
		||||
    grid: { top: 40, right: 12, bottom: 20, left: 64 },
 | 
			
		||||
    xAxis: {
 | 
			
		||||
      type: "category",
 | 
			
		||||
      //   data: Array(7)
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,7 @@ function getOptions(source, period, trend) {
 | 
			
		||||
  if (trend[source].length == 0) return null;
 | 
			
		||||
  return {
 | 
			
		||||
    color: ["#FFD160", "#12FFF5", "#2760FF"],
 | 
			
		||||
    grid: { top: 40, right: 12, bottom: 20, left: 56 },
 | 
			
		||||
    grid: { top: 40, right: 12, bottom: 20, left: 64 },
 | 
			
		||||
    xAxis: {
 | 
			
		||||
      type: "category",
 | 
			
		||||
      //   data: Array(7)
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,7 @@ function getOptions(source, period, trend) {
 | 
			
		||||
  if (trend[source].length == 0) return null;
 | 
			
		||||
  return {
 | 
			
		||||
    color: ["#FFD160", "#12FFF5", "#2760FF"],
 | 
			
		||||
    grid: { top: 40, right: 12, bottom: 20, left: 56 },
 | 
			
		||||
    grid: { top: 40, right: 12, bottom: 20, left: 64 },
 | 
			
		||||
    xAxis: {
 | 
			
		||||
      type: "category",
 | 
			
		||||
      //   data: Array(7)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user