2014-11-21 49 views
-1

当我尝试将大数据绑定到散点图类型的高图。请告诉我解决问题的方法。当我试图将更少的数据绑定到它时,它完美地工作。highcharts与巨大的数据无法显示图形是分散型

这里是我写的代码。

var _energyType; 
    var _options = { 

    chart: { 
     renderTo: _container, 
     Type: 'scatter', 
     zoomType: 'xy', 
     marginBottom: 100, 
     plotShadow: false, 
     backgroundColor: null 
    }, 
    title: { text: '' }, 

    xAxis: [{ 
     gridLineWidth: 1, 
     title: { 
      enabled: true, 
      text: p_AttributeName + ' (' + p_metricUOM + ')', 
      margin: 15, 
      tickInterval: 1 
     } 

    }], 
    scrollbar: { 
     enabled: true 
    }, 
    plotOptions: { 
     spline: { 
      turboThreshold: 10000000, 
     } 
    }, 

    yAxis: [{ 
     minorTickInterval: 'auto', 
     lineWidth: 1, 
     tickWidth: 1, 
     title: { 
      text: Summit.DV.Resources.Widget.Intensity + ' (' + p_uomtype + '/' + p_AttributeName + ' (' + p_metricUOM + ') ' + ')', 
      style: { 
       backgroundColor: '#fff' 
      } 
     } 
    }], 
    tooltip: { 
     crosshairs: true, 
     formatter: function() { 
      var _strToolTip; 
      _energyType = Summit.DV.Resources.Widget.Intensity + ' (' + p_uomtype + '/' + p_metricUOM + ')'; 
      _strToolTip = Summit.DV.Resources.Generic.Site + ' : ' + this.point.name + '<br/>'; 
      _strToolTip = _strToolTip + _energyType + ' : ' + Summit.DV.Common.FormatNumber(this.y, p_locale, 3, false) + '<br/>'; 
      _strToolTip = _strToolTip + p_energytype + ' (' + p_uomtype + ') : ' + this.point.value + '<br/>'; 
      _strToolTip = _strToolTip + p_AttributeName + ' (' + p_metricUOM + ') : ' + Summit.DV.Common.FormatNumber(this.x, p_locale, 0, false) + '<br/>'; 
      if (p_target != '') { 
       _strToolTip = _strToolTip + Summit.DV.Resources.Widget.Target + ' (' + p_uomtype + '/' + p_metricUOM + ') : ' + Summit.DV.Common.FormatNumber(parseFloat(p_target), p_locale, 3, false) + '<br/>'; 
       _strToolTip = _strToolTip + 'Δ to Target (' + p_uomtype + '/' + p_metricUOM + ') : ' + Summit.DV.Common.FormatNumber(parseFloat(this.y) - parseFloat(p_target), p_locale, 3, false); 

      } 
      else { 
       _strToolTip = _strToolTip + Summit.DV.Resources.Widget.Target + ' (' + p_uomtype + '/' + p_metricUOM + ') : ' + ' ' + '<br/>'; 
       _strToolTip = _strToolTip + 'Δ to Target (' + p_uomtype + '/' + p_metricUOM + ') : ' + ' '; 

      } 
      return (_strToolTip); 

     } 
    }, 
    labels: { 
     items: [{ 
      style: { 
       left: '40px', 
       top: '0px', 
       color: '#666666', 
       font: 'bold 12px Calibri', color: 'Black', 
       enabled: false 
      } 
     }] 
    }, 

    legend: { 
     enabled: true, 
     layout: 'horizontal', 
     align: 'center', 
     verticalAlign: 'bottom', 
     borderWidth: 0, 
     margin: 10, 
     itemWidth: 180, 
     labelFormatter: function() { 
      return this.name.substring(0, 30); 
     } 
    }, 
    exporting: { 
     enabled: true 
    }, 
    series: [{ 
     data: usage 
    }] 
}; 

回答

0

这是Highcharts中的错误,报告here

解决方法是直接在选项使标记:

plotOptions: { 
    scatter: { 
     marker: { 
      enabled: true, 
      radius: 30.0 
     } 
    } 
} 

演示:http://jsfiddle.net/hn5ntm8q/5/