我正在AM-Charts中构建一个气泡图,但是在X轴上绘制字符串值时遇到了问题

时间:2015-09-03 16:39:38

标签: charts amcharts

我是AM-charts的新手,我正在AM图表http://www.amcharts.com/demos/bubble-chart/中构建气泡图。

我想在气泡图中绘制以下数据,其中名称应出现在X轴上,作业应该在Y轴上。

[{"name":"abc","jobs":15, "value":63500},{{"name":"pqr","jobs":15, "value":33000}}]

我的气泡图配置如下 -

{
    "type": "xy",
    "theme": "light",
    "titles": [
        {
            "text": title,
            "size": 16
        }
    ],
    "balloon": {
        "fixedPosition": true,

    },
    "dataProvider": [{"name":"abc","job":15, "value":63500},{{"name":"pqr","job":15, "value":33000}}],
    "valueAxes": [
        {
            "position": "bottom",
            "axisAlpha": 0
        },
        {
            "minMaxMultiplier": 1.2,
            "axisAlpha": 0,
            "position": "left"
        }
    ],
    "startDuration": 1.5,
    "graphs": [
        {
            "balloonText": "Name: <b>[[name]]</b> Jobs: <b>[[job]]</b><br>value: <b>[[value]]</b>",
            "bullet": "round",
            "bulletBorderAlpha": 0.2,
            "bulletAlpha": 0.8,
            "lineAlpha": 0,
            "fillAlphas": 0,
            "valueField": "value",
            "xField": "name",
            "yField": "job",
            "maxBulletSize": 50,
            "minBulletSize": 20
        }
    ],
    "marginLeft": 46,
    "marginBottom": 35,
    "export": {
        "enabled": true
    },
    "chartScrollbar": {
        "offset": 15,
        "scrollbarHeight": 5
    }
}

我无法通过此配置查看气泡图。控制台中没有错误或警告。

有人可以建议我解决这个问题吗?

提前致谢。

0 个答案:

没有答案