简体   繁体   English

高图中的标记大小不同?

[英]Different marker sizes in highcharts?

For my scatter chart in highcharts I would like different series to have different marker radius. 对于高图中的散点图,我希望不同的系列具有不同的标记半径。 Is this possible? 这可能吗?

"plotOptions": {"series": {"marker": {"enabled": true
                                     ,"symbol": "circle"
                                     ,"radius": 15}
                                     }
                           }
                {

It does not work to use: 它不能使用:

    "plotOptions": {"series": {"marker": {"enabled": true
                                     ,"symbol": "circle"
                                     ,"radius": 15,20,10,5,2}
                                     }
                           }
                {

You can provide marker option for radius in each individual data series So series will be as 您可以在每个单独的数据系列中为半径提供标记选项,因此系列将如下所示

        series: [{
        name: 'Female',
        color: 'rgba(223, 83, 83, .5)',
        data: [[161.2, 51.6], [167.5, 59.0], [159.5, 49.2], [157.0, 63.0], [155.8, 53.6],
            [170.0, 59.0], [159.1, 47.6], [166.0, 69.8], [176.2, 66.8], [160.2, 75.2],
            [172.5, 55.2], [170.9, 54.2], [172.9, 62.5], [153.4, 42.0], [160.0, 50.0]
            ],
            marker: {
            radius: 10
        },

    }, {
        name: 'Male',
        color: 'rgba(119, 152, 191, .5)',
        data: [[174.0, 65.6], [175.3, 71.8], [193.5, 80.7], [186.5, 72.6], [187.2, 78.8],
            [181.5, 74.8], [184.0, 86.4], [184.5, 78.4], [175.0, 62.0], [184.0, 81.6],
            [180.0, 76.6], [177.8, 83.6], [192.0, 90.0], [176.0, 74.6], [174.0, 71.0]
  ],

            marker: {
            radius: 20
        },
    }]

Hope this help Fiddle Link 希望这有助于小提琴链接

You have to set a marker for each serie. 您必须为每个系列设置一个标记。 So you have to do something like this. 所以你必须做这样的事情。

...
series: [{
    name: 'Serie 1',
    data: ...
    marker: {
        enabled: true,
        symbol: "circle",
        radius: 5
    }
},{
    name: 'Serie 2',
    data: ...
    marker: {
        enabled: true,
        symbol: "circle",
        radius: 10
    }
},{
    name: 'Serie 3',
    data: ...
    marker: {
        enabled: true,
        symbol: "circle",
        radius: 15
    }
}]

I hope this helps :) 我希望这有帮助 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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