The problem of params value transfer of formatter in echarts

topic description

In the example of the K diagram on the official Echarts website, params [0] .value [0] is the first data value, but when I copy the code over, params [0] .value [0] becomes the data subscript and params [0] .value [1] becomes the first data value. I copied the whole code directly, and all the functions can be realized, so here comes bug

.

sources of topics and their own ideas

related codes

/ / Please paste the code text below (do not replace the code with pictures)

formatter: function (params) {
var res = params[0].seriesName + " " + params[0].name;
res += "<br/> :" + params[0].value[0] + "  :" + params[0].value[3];
        res += "<br/>   : " + params[0].value[1] + "   : " + params[0].value[2];
        return res;
    }

what result do you expect? What is the error message actually seen?

May.31,2021

echarts version problem. For the higher version, you can change it to less than 3.6or change the code in formatter


is not only the params value, but also the first value of the array is subscript when rewriting the data view. Directly change the reference subscript and rewrite the data view

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-1b2bad7-2baa5.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-1b2bad7-2baa5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?