Highchart分散点未连接 [英] Highchart scatter point not connected

查看:123
本文介绍了Highchart分散点未连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了 lineWidth 来让每个点都相互连接,但它仍然不起作用。请帮助我检查下面的示例数据以及选项设置。

  [{x:101.4,y: 69.235, 标志物:{ 填充颜色: #BF0B23}},{ ×:101.23, Y:69.24},{ ×:101.03, Y:69.24},{ x 的:100.82, Y:69.22},{ ×:100.61, Y:69.21},{ ×:100.41, Y:69.21},{ ×:99.95, Y:69.19 },{ ×:99.96, Y:69.19},{ ×:100, Y:69.14},{ ×:100.03, Y:69.1},{ ×:100.04 , Y:69.1},{ ×:100.09, Y:69.085},{ ×:100.15, Y:69.08},{ ×:100.08, Y:69.135} { ×:100.03, Y:69.095},{ ×:100.06, Y:69.07},{ ×:100.1, Y:69.07},{ ×:100.25, Y :69.045},{ × :100.18, Y :69.105},{ × :102.82, Y :68.925},{ × :102.52, Y :68.89},{ X :102.2, Y :68.86},{ × :102.18, Y :68.87},{ × :102.25, Y :68.855},{ × :102.21, Y :68.845},{ ×:102.82, Y:69.595},{ ×:102.9, Y:69.575},{ ×:102.86, Y:69.595},{ x 的:102.8, Y:69.775},{ ×:102.83, Y:69.695},{ ×:102.83, Y:69.755},{ ×:102.82, Y:69.615 },{ ×:102.91, Y:69.615},{ ×:102.88, Y:69.575},{ ×:102.98, Y:69.585},{ ×:103.16 , Y:69.655},{ ×:103, Y:69.655},{ ×: 102.91, Y:69.595},{ ×:102.82, Y:69.595},{ ×:102.7, Y:69.575},{ ×:102.76, Y:69.625} ,{ ×:102.77, Y:69.575},{ ×:102.76, Y:69.545},{ ×:102.85, Y:69.505},{ ×:102.99, Y:69.505},{ ×:103.02, Y:69.505},{ ×:102.88, Y:69.515},{ ×:103, Y:69.845},{ ×:103.19, Y:69.805},{ ×:103.1, Y:69.725},{ ×:102.79, Y:69.675},{ ×:102.96,Y :69.735},{ × :103.14, Y :69.625},{ × :103.02, Y :69.615},{ × :103.27, Y :69.785},{ × :103.19, Y :69.765},{ × :102.88, Y :69.475},{ × :103, Y :69.475},{ × :102.99, Y: {x:99.49,y:69.195},{x:99.32,y:69.215,marker:{fillColor:black}}] 

这不是整个数据。数据不适合SO textarea



选项

  options = {
图表:{
类型:'scatter',
动画:false
$,
plotOptions:{
scatter:{
turboThreshold:9999
}
},
series:[{
name:'滞后',
数据:[],
lineWidth:2
}]
}

这里我尝试使用 jsFiddle 并且它正在工作。但是,对于您的信息,我动态加载数据如 chart.series [0] .setData()并且它不工作
$ b $ console.log($('ele')。highcharts());





这是替代方案,我尝试过,我如何将数据推到系列之前发起highcharts

  options.series [0] .data.push ({
x:parseFloat(model.get('xreading')),
y:parseFloat(model.get('yreading')),
marker:{fillColor:'#BF0B23',符号:'triangle'},标签:model.get('iv_date')
});

任何可能的选项都可能阻止它画线




  • 检查您的数据。确保x和y可用,如果普通推数组

  • 不适合你,为什么不尝试构建json字符串,然后再解析它?


这就是所有人


I set the lineWidth already to let every point connected to each other but it's still won't work. Please help me to inspect the sample data below and also the options setting

[{"x":101.4,"y":69.235,"marker":{"fillColor":"#BF0B23"}},{"x":101.23,"y":69.24},{"x":101.03,"y":69.24},{"x":100.82,"y":69.22},{"x":100.61,"y":69.21},{"x":100.41,"y":69.21},{"x":99.95,"y":69.19},{"x":99.96,"y":69.19},{"x":100,"y":69.14},{"x":100.03,"y":69.1},{"x":100.04,"y":69.1},{"x":100.09,"y":69.085},{"x":100.15,"y":69.08},{"x":100.08,"y":69.135},{"x":100.03,"y":69.095},{"x":100.06,"y":69.07},{"x":100.1,"y":69.07},{"x":100.25,"y":69.045},{"x":100.18,"y":69.105},{"x":102.82,"y":68.925},{"x":102.52,"y":68.89},{"x":102.2,"y":68.86},{"x":102.18,"y":68.87},{"x":102.25,"y":68.855},{"x":102.21,"y":68.845},{"x":102.82,"y":69.595},{"x":102.9,"y":69.575},{"x":102.86,"y":69.595},{"x":102.8,"y":69.775},{"x":102.83,"y":69.695},{"x":102.83,"y":69.755},{"x":102.82,"y":69.615},{"x":102.91,"y":69.615},{"x":102.88,"y":69.575},{"x":102.98,"y":69.585},{"x":103.16,"y":69.655},{"x":103,"y":69.655},{"x":102.91,"y":69.595},{"x":102.82,"y":69.595},{"x":102.7,"y":69.575},{"x":102.76,"y":69.625},{"x":102.77,"y":69.575},{"x":102.76,"y":69.545},{"x":102.85,"y":69.505},{"x":102.99,"y":69.505},{"x":103.02,"y":69.505},{"x":102.88,"y":69.515},{"x":103,"y":69.845},{"x":103.19,"y":69.805},{"x":103.1,"y":69.725},{"x":102.79,"y":69.675},{"x":102.96,"y":69.735},{"x":103.14,"y":69.625},{"x":103.02,"y":69.615},{"x":103.27,"y":69.785},{"x":103.19,"y":69.765},{"x":102.88,"y":69.475},{"x":103,"y":69.475},{"x":102.99,"y":69.395},{"x":99.49,"y":69.195},{"x":99.32,"y":69.215,"marker":{"fillColor":"black"}}]

this is not the whole data. The data is not fit in in SO textarea

the options

options = {
    chart: {
        type: 'scatter',
        animation:false             
    },              
    plotOptions: {
        scatter: {
            turboThreshold: 9999
        }                   
    },              
    series: [{
        name: 'Hysteresis',
        data: [],
        lineWidth: 2
    }]
}

Here my attempt to use with jsFiddle and it's working. But for your information, I dynamically load the data like this chart.series[0].setData() and it's not working

screenshot of console.log($('ele').highcharts());

this is the alternative that I tried, how I push the data to the series before initiated highcharts

options.series[0].data.push({
    x: parseFloat(model.get('xreading')), 
    y: parseFloat(model.get('yreading')), 
    marker:{ fillColor: '#BF0B23', symbol: 'triangle' }, label: model.get('iv_date')
});

Any possible options that might prevent it from draw the line

解决方案

to solve this little problem when it is not connected,

  • check your data. Make sure x and y is available if normal push array
  • not working for you, why not you try build json string then later parse it

that's all folks

这篇关于Highchart分散点未连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆