java ehcarts 渐变色 、图标偏右、yAxis 格式化ms、textStyle 改变字体颜色

java ehcarts 渐变色 、图标偏右、yAxis 格式化ms、textStyle 改变字体颜色,第1张

java ehcarts 渐变色 、图标偏右、yAxis 格式化ms、textStyle 改变字体颜色

渐变色

,
  "series": [
    {
      "name": "计划提货",
      "type": "bar",
      "color": {
        "type": "linear",
        "x": 0,
        "y": 0,
        "x2": 0,
        "y2": 1,
        "colorStops": [
          {
            "offset": 0,
            "color": "#14c8d4"
          },
          {
            "offset": 1,
            "color": "#04EBC1"
          }
        ],
        "globalCoord": false
      },
      "data": [
        2,
        4.9,
        7,
        23.2
      ],
      "itemStyle": {
        "normal": {
          "label": {
            "show": true,
            "position": "top",
            "textStyle": {
              "color": "#FFFFFF",
              "fontSize": 16
            }
          }
        }
      }
    },
    {
      "name": "实际提货",
      "type": "bar",
      "color": {
        "type": "linear",
        "x": 0,
        "y": 0,
        "x2": 0,
        "y2": 1,
        "colorStops": [
          {
            "offset": 0,
            "color": "#14c8d4"
          },
          {
            "offset": 1,
            "color": "#C3E046"
          }
        ],
        "globalCoord": false
      },
      "data": [
        2.6,
        5.9,
        9,
        26.4
      ],
      "itemStyle": {
        "normal": {
          "label": {
            "show": true,
            "position": "top",
            "textStyle": {
              "color": "#FFFFFF",
              "fontSize": 16
            }
          }
        }
      }
    }
  ]

图标偏右

 "legend": {
    "x": "right",
    "data": [
      "供应商库存量",
      "供应商已发货量"
    ],
    "textStyle": {
      "color": " #ffffff"
    }
  },

yAxis  格式化ms

   yAxis : [
        {
            type : 'value',
               axisLabel:{formatter:'{value} ms'}
        }
    ],

textStyle 改变字体颜色

 "textStyle": {
      "color": "#ffffff",
      "fontSize": 16
    },

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5597932.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存