jquery - 我们如何将 X 和 Y 轴移动到气泡图中的中心 (JQPlot)

标签 jquery css jqplot

我正在尝试将气泡图的 X 轴和 Y 轴移到中心。我找不到确切的配置。

目前我得到的图表如下所示

enter image description here

我要获取如下图

enter image description here

请帮帮我

最佳答案

我没有看到任何 api options改变轴的位置。所以,我能想到的最好办法就是使用 CSS 进行设置。

var plot2 = $.jqplot('chart1',[arr],{
    title: 'Transparent Bubbles',
    seriesDefaults:{
        renderer: $.jqplot.BubbleRenderer,
        rendererOptions: {
            bubbleAlpha: 0.6,
            highlightAlpha: 0.8
        },
        shadow: true,
        shadowAlpha: 0.05
    },
    axes:{yaxis:{tickOptions: {showMark:false},min:-500,max:500}, //disable the ticks
          xaxis:{tickOptions: {showMark:false},min:-500,max:500}}
}); 

$('.jqplot-xaxis').css({'zIndex':10,'top':'150px','font-weight':'bold'}); // move the axis to the center of the chart
$('.jqplot-yaxis').css({'zIndex':10,'left':'300px','font-weight':'bold'});

fiddle here .

产生:

enter image description here

关于jquery - 我们如何将 X 和 Y 轴移动到气泡图中的中心 (JQPlot),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21306945/

相关文章:

javascript - jqplot:嵌套 donut chart 中不同颜色的任何方式

jqplot - 使用JQPlot,如何将图例放置在图表之外的特定位置?

jquery - ASP.NET MVC 中使用 jQuery 进行 Ajax 调用不传递参数

javascript - 使用 jquery 在 svg 中选择图像

html - 使用 CSS 删除多个额外的 break 标签

css - 子 div 的不透明度是否可以高于具有 css 的父 div?

c# - 如何在页面上运行 GET/POST 和 JSON RESULT?

javascript - 可放置元素的位置计算不正确

css - 如何使用css从中心创建两种颜色的渐变效果?

javascript - 使用EnhancedLegendRenderer打开和关闭系列时删除系列并使用新值重新绘制