When I first entered Echarts, I would like to ask you about the use of series in Echarts.

can each series.data data in the bar chart be set to a different itemStyle style in echarts?

// 
    let todayData = [3709, 2500, 2000, 2610, 1719, 433, 2644, 4205, 3372, 4384, 4078, 5227]
    // 
    let yesterdayData = [4000, 2417, 755, 2710, 1819, 483, 2544, 4245, 3572, 2484, 4378, 5177]

    let data1 = getMinExpend()
    let data2 = getEconomyExpend()
let option = {
      title: {
        text: "",
        left: "center",
        top: "10px",
        subtext: " VS "
      },
      tooltip: {},
      xAxis: {
        type: "category",
        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
      },
      yAxis: {},
      series: [
        {
          name: getName(),
          type: "bar",
          data: data1.value,
          barWidth: 40,
          stack: "hours",
          itemStyle: {
            color: "-sharp00BFFF"
          },
          emphasis: {
            itemStyle: {
              color: "-sharp1A2F44",
              borderColor: "-sharpfff"
            }
          }
        },
        {
          name: "economyExpend",
          type: "bar",
          data: data2,
          barWidth: 40,
          stack: "hours",
          itemStyle: {

          }
        }
      ]
    }
    
    function getMinExpend() {
      let data = {
        name: [],
        value: []
      }
      for (let i=0; i<12; iPP) {
        if (todayData[i] < yesterdayData[i]) {
          data.value.push(todayData[i])
          data.name.push("today")
        } else if (todayData[i] === yesterdayData[i]){
          data.value.push(todayData[i])
          data.name.push("today")
        } else {
          data.value.push(yesterdayData[i])
          data.name.push("yesterdayData")
        }
      }
      console.log("data1", data)
      return data
    }

    function getEconomyExpend() {
      let data = []
      for (let i=0;i<12;iPP) {
        data.push(Math.abs(todayData[i] - yesterdayData[i]))
      }
      console.log("data2", data)
      return data
    }
Apr.05,2021

series : [
        {
          data:[
              {
                value:200,
                itemStyle:{
                  normal:{color:'gray'}
              }
              }, 
              {
                value:300,
                itemStyle:{
                  normal:{color:'green'}
              }
              },
              {
                value:1500,
                itemStyle:{
                  normal:{color:'yellow'}
              }
              },
              {
                value:300,
                itemStyle:{
                  normal:{color:'red'}
              }
              }
            ]
        }
    ]
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b353f9-2bfa8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b353f9-2bfa8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?