Highcharts - 防止大标记溢出轴 - 我的泡沫逃逸=( [英] Highcharts - prevent large marker from overflowing axes - my bubbles are escaping =(

查看:103
本文介绍了Highcharts - 防止大标记溢出轴 - 我的泡沫逃逸=(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这张照片应该说明一切。我正在尝试使用HighCharts实现气泡图(基本上,散点图的标记大小根据某个度量标准而变化)。可悲的是,我的一些泡沫正在试图摆脱图表,溢出轴线,使东西看起来凌乱和难以阅读。任何方式来防止这种情况?显然我可以操纵轴的范围,但我宁愿隐藏泡沫的溢出部分。此外,如果x轴需要从0开始(例如),则这不是一个选项。图片:

溢出(Highcharts):



没有溢出(图表导演)。这是我想要的:



解决方案

我建议您尝试使用v3.0 beta版本来解决您的问题。请看例子:



http:// jsfiddle .net / g8JcL / 68 / $ b

  $('#container')。highcharts({

图:{
type:'bubble',
plotBorderWidth:1,
zoomType:'xy'
},

title: {
text:'使用径向渐变填充的高图气泡'
},

xAxis:{
minPadding:0,
gridLineWidth:1
},

yAxis:{
startOnTick:false,
endOnTick:false
},

系列:[{
数据:[
[42,38,500],
[6,18,1],
[0,93,505],
[57,2,90 ],
[80,76,22],
[11,74,96],
[88,56,10],
[30,47,49],
[57,62,98],
[4,16,16],
[46,10,11],
[22,87,89],
[57,91,82],
[45,15,98]
]
}]

});


This picture should say it all. I'm trying to implement a bubble chart with HighCharts (basically a scatter plot with marker size changing based on some metric). Sadly, some of my bubbles are trying to escape the chart, overflowing the axis and making things look messy and hard-to-read. Any way to prevent this? Obviously I could manipulate the range of the axes, but I'd rather just hide the overflowing part of the bubble. Besides, this is not an option if the x-axis is required to start at 0 (for example). Pics:

Overflow (Highcharts):

No Overflow (Chart director). This is what I want:

解决方案

I advice to try to use v3.0 beta release which should solve your problem. Please take look at example:

http://jsfiddle.net/g8JcL/68/

 $('#container').highcharts({

    chart: {
        type: 'bubble',
        plotBorderWidth: 1,
        zoomType: 'xy'
    },

    title: {
        text: 'Highcharts bubbles with radial gradient fill'
    },

    xAxis: {
        minPadding:0,
        gridLineWidth: 1
    },

    yAxis: {
        startOnTick: false,
        endOnTick: false
    },

    series: [ {
        data: [
            [42, 38, 500],
            [6, 18, 1],
            [0, 93, 505],
            [57, 2, 90],
            [80, 76, 22],
            [11, 74, 96],
            [88, 56, 10],
            [30, 47, 49],
            [57, 62, 98],
            [4, 16, 16],
            [46, 10, 11],
            [22, 87, 89],
            [57, 91, 82],
            [45, 15, 98]
        ]
    }]

});

这篇关于Highcharts - 防止大标记溢出轴 - 我的泡沫逃逸=(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆