简体   繁体   English

Highcharts导航器错误:无效的负值 <rect> 属性宽度

[英]Highcharts navigator error: Invalid negative value for <rect> attribute width

Does anyone know why I am seeing this error - "error: Invalid negative value for attribute width" while using the Highstock navigator? 有没有人知道为什么我看到这个错误 - “错误:属性宽度的负值无效”使用Highstock导航器? Please see this JsFiddle for my code - http://jsfiddle.net/Yrygy/250/ 请参阅这个JsFiddle我的代码 - http://jsfiddle.net/Yrygy/250/

var chart = new Highcharts.StockChart({
    chart: {
        renderTo: 'container',
        height: 120
    },
    navigator: {
        series: {
            data: chartData
        }
    },
    series: [{
        data: [null],
        markers: {
            enabled:true
        }
    }]
});

Your data is all on one day. 您的数据全部都在一天之内。 The minRange of highstock is one day by default. highstock的minRange默认为一天。 So, the reason it appears your rangeselector is unusable when you have your data correctly defined within the series is that you are already zoomed into one day. 因此,当您在系列中正确定义数据时,看起来您的rangeselector无法使用的原因是您已经放大了一天。
Move the data from the navigator to a series and change the xAxis minRange to be a smaller number (I choose 1 minute) 将数据从导航器移动到一个系列,并将xAxis minRange更改为较小的数字(我选择1分钟)

var chart = new Highcharts.StockChart({
    chart: {
        renderTo: 'container'
    },
    series: [{
        data: chartData,
        markers: {
            enabled:true
        }
    }],
    xAxis : {
        minRange: 60 * 1000 // one minute
    },
});

http://jsfiddle.net/blaird/Yrygy/256/ http://jsfiddle.net/blaird/Yrygy/256/

I have this error when I used navigator.series.setData() . 我使用navigator.series.setData()时出现此错误。 All you need is set min and max values with chart.xAxis[0].setExtremes(min, max) 您只需使用chart.xAxis[0].setExtremes(min, max)设置最小值和最大值

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JqxChart给出错误错误:无效的负值 <rect> attribute height =“ - 1” - JqxChart Giving error Error: Invalid negative value for <rect> attribute height=“-1” Iframe 渲染错误:<rect> 属性宽度:负值无效</rect> - Iframe rendering error : <rect> attribute width: A negative value is not valid HighChart HighStock错误:的负值无效<rect> - HighChart HighStock Error: Invalid negative value for <rect> 错误: <rect> 属性width:预期长度,highcharts中的“NaN” - Error: <rect> attribute width: Expected length, “NaN” in highcharts 错误:的值无效 <rect> 属性width =“ NaN” 6d3.v3.min.js:1错误:的值无效 <text> 属性x =“ NaN” - Error: Invalid value for <rect> attribute width=“NaN” 6d3.v3.min.js:1 Error: Invalid value for <text> attribute x=“NaN” 莫里斯·巴图(错误: <rect> 属性宽度:负值无效。 (“ -0.2634408602150538”)出现在第一次点击即时通讯中 - Morris Bar-chart(Error: <rect> attribute width: A negative value is not valid. (“-0.2634408602150538”) in the first click im getting like this 缩放 d3 的直方图 x 域会导致“无效的负值<rect>属性”错误 - Scaling d3's histogram x domain causes "Invalid negative value for <rect> attribute" errors Highcharts 错误:<rect> 属性 x:预期长度,“NaN”</rect> - Highcharts Error: <rect> attribute x: Expected length, “NaN” 高图:希伯来语中的负值 - Highcharts: negative value in hebrew 错误:<rect> 属性宽度:预期长度,“NaN”。 和<text>属性 dx:预期长度,“NaN” - Error: <rect> attribute width: Expected length, "NaN". and <text> attribute dx: Expected length, "NaN"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM