简体   繁体   中英

Changing Legend symbol Highstocks

我想在我的图表中使图例符号为圆形而不是矩形,如何自定义图例符号的形状?

Unfortunately, I don't believe there's an easy fix for this. One hack that's been around for a while, is to link your area series with an empty scatter series (scatter series will use the symbol in the legend):

{
    data: [],
    name: 'USA',
    type: 'scatter',
    color: 'rgb(47,126,216)',
    marker: {
        symbol: 'circle'
    }
},
{
    name: 'USA',
    data: [null, null, null, null, null, 6 , 11, 32, 110, 235, 369, 640,
        1005, 1436, 2063, 3057, 4618, 6444, 9822, 15468, 20434, 24126,
        27387, 29459, 31056, 31982, 32040, 31233, 29224, 27342, 26662,
        26956, 27912, 28999, 28965, 27826, 25579, 25722, 24826, 24605,
        24304, 23464, 23708, 24099, 24357, 24237, 24401, 24344, 23586,
        22380, 21004, 17287, 14747, 13076, 12555, 12144, 11009, 10950,
        10871, 10824, 10577, 10527, 10475, 10421, 10358, 10295, 10104 ],
    linkedTo: ':previous'
}

Fiddle here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM