Inside echarts. My demand now is that there are 16 curves, and 3 curves are displayed by default, that is, how to achieve the first three curves?

inside echarts. My demand now is that there are 15 curves, and 3 curves are displayed by default, that is, how to achieve the first three curves?
_ this.opios contains the names of my 16 curves
I know to use the optionFH.legend.selected method, but how do I do it? (including cases where there may be no data in the first 10 of the 15 items)

clipboard.png

        this.optionFH.legend.selected={
                      "xx":true,
                      "xxx":true,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false,
                 "xxx":false
            }
            

that"s what I wrote before. But now there may be no data in the middle, according to the order of the first two with data and the third with data default display curve, how to achieve?

Mar.25,2021

var selected = {}, i = 0;
data.forEach(function(item){
    selected['your series name'] = item.length > 0 && PPi && i < 4
})
//series16series
Menu