HighCharts XAxis对数类型

时间:2013-02-17 11:29:36

标签: memory-leaks highcharts

我有一个特定的查询。

以下是我的高级图表脚本。当我运行此sript时,我遇到了内存泄漏问题。也许有人可以帮忙。我需要以指数标度显示x轴,如

100,000
1,000,000
10,000,000

等等。

var chart = new Highcharts.Chart({
            chart: {
                renderTo: 'dvCon'
            },
            title: {
                text: 'Construction: Duration vs Productive Hours'
            },
            xAxis: [{
                type: 'logarithmic',
                title: {
                    text: 'Construction Hours'
                }
            }],
            yAxis: [{
                labels: {
                    formatter: function () {
                        return this.value;
                    },
                    style: {}
                },
                showEmpty: true,
                title: {
                    text: 'Duration',
                    style: {}
                }
            }, ],
            tooltip: {
                formatter: function () {
                    return '' + this.x + ': ' + this.y;
                }
            },
            legend: {
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: '#FFFFFF'
            },
            series: [{
                name: 'Other Projects',
                type: 'scatter',
                data: [[560000, 13], [185250, 11], [3625788, 23], [1648510, 21], [265000, 14], [13000000, 43], [28000000, 34], [1567000, 19], [1190000, 20], [21000000, 31], [7000000, 33], [3805200, 30], [17000000, 29], [1503267, 21], [11332332, 29], [1485067, 20], [5000000, 30], [5400000, 22], [13000000, 23], [3810000, 26], [810000, 18], [27528218, 26], [377319, 14], [840000, 22], [550000, 13], [2643142, 26], [412800, 13], [2500000, 22], [4510000, 19], [523116, 15], [17600000, 28], [2500000, 21], [21000000, 29], [3500000, 17], [620000, 15], [163000000, 46], [134000000, 41], [45000000, 39], [13677454, 31], [167000000, 52], [47000000, 33], [49000000, 38], [31000000, 38]]
            },
            {
                name: 'User Data',
                type: 'scatter',
                data: [[40050000, 35]]
            }]
        });

1 个答案:

答案 0 :(得分:1)

代码工作正常,但yAxis对象之后的附加,除外。

jsFiddle> http://jsfiddle.net/SSCEk/

特定版本的highcharts,jquery或浏览器可能会出现问题吗?

相关问题