79092768

Date: 2024-10-16 06:52:10
Score: 1.5
Natty:
Report link

I was able to achieve this in a way that only give x-axis not y-axis when defining in series. When giving y-axis it will display your line horizontally instead of vertically. Below is the code

series: [
          {
            name: `Max. of RES ${resPeak?.max_production}`,
            type: "line",
            stack: "Total",
            areaStyle: {},
            emphasis: {
              focus: "series",
            },
            markLine: {
              data: [
                {
                  xAxis: resPeak.max_production > 0 ? resPeakIndex : 0,
                  label: {
                    show: true,
                    formatter:
                      resPeak.max_production > 0
                        ? `Max. of RES \n${resPeak?.max_production}`
                        : `Max. of RES \n 0`,
                    position: "end",
                  },
                  lineStyle: {
                    type: "dotted",
                    color: "#00008B",
                  },
                  symbol: "circle",
                },
              ],
            },
          },[![enter image description here][1]][1]
    ]

enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ayesha Aleem