0

我已经更新到 v3.0 并在 IE9 和 Chrome 中发现了这个问题。我有一个按钮,可以根据找到的数据创建一个新图表。图形比例 yAxis 变化?(注:图表为对数图表)。有时图表会变成:

在此处输入图像描述

4

1 回答 1

0

抱歉没有一个真实的例子:但我在按下自定义按钮时注意到了这一点(5/6次后) - 出现此问题:

笔记:

1) 使用图表创建按钮。
2) 图表可能每 5 秒更新一次 - 如果数据已更改

// handle detailed chart refresh button
function showResetZoomButton(pb_detailed_chart)
{
    // load refresh images
    var ResetZoomJPG        = 'images/gallery/reset_zoom.jpg';
    var ResetZoomPressedJPG = 'images/gallery/reset_zoom_pressed.jpg';

    // add refresh (pressed) image
    var imgResetZoomPressed = pb_detailed_chart.renderer.image(ResetZoomPressedJPG, pb_detailed_chart.chartWidth-112,10,24,20);
    imgResetZoomPressed.add();
    imgResetZoomPressed.css({'cursor':'pointer'});
    imgResetZoomPressed.attr({'title':'Reset Zoom'});

    // add refresh image
    var imgResetZoom = pb_detailed_chart.renderer.image(ResetZoomJPG, pb_detailed_chart.chartWidth-112,10,24,20);
    imgResetZoom.add();
    imgResetZoom.css({'cursor':'pointer'});
    imgResetZoom.attr({'title':'Reset Zoom'});

    // init in-action/out-action for mouse event
    var inAction = "mouseover";
    var outAction = "mouseout";
    if ( $.browser.mozila )
    {
        inAction = "mouseenter"; outAction = "mouseleave";
    }

    imgResetZoom.on(inAction, function(){
        imgResetZoomPressed.show();
        imgResetZoom.hide();
    });

    imgResetZoom.on(outAction, function(){
        imgResetZoom.show();
        imgResetZoomPressed.hide();
    });

    imgResetZoomPressed.on(inAction, function(){
        imgResetZoomPressed.show();
        imgResetZoom.hide();
    });

    imgResetZoomPressed.on(outAction, function(){
        imgResetZoom.show();
        imgResetZoomPressed.hide();
    });

    // refresh chart
    imgResetZoomPressed.on('click',function(){
        // check if master found, and if real time disabled
        if (pb_master_chart && enable_lastRoundsChart_realtime == 0)
        {
            // master chart found
            // remove plotBand
            pb_master_chart.xAxis[0].removePlotBand('mask-before');
            pb_master_chart.xAxis[0].removePlotBand('mask-after');
            pb_master_chart.xAxis[0].addPlotBand({
                id: 'mask-before',
                from: -1,
                to: 99999,
                color: 'rgba(0, 0, 0, 0.2)'
            })
        }
        // reset detailed graph
        createDetail(cache_last_rounds.last_rounds_data, window.show_top_round_ids);
    });
}
于 2013-04-10T09:34:54.157 回答