Highcharts 包含大量数据的高位图表无法显示散点类型的图形
当我试图将大量数据绑定到high chart时,high chart是一种散点类型。请告诉我怎么修。当我尝试将更少的数据绑定到它时,它工作得非常好 这是我写的代码Highcharts 包含大量数据的高位图表无法显示散点类型的图形,highcharts,Highcharts,当我试图将大量数据绑定到high chart时,high chart是一种散点类型。请告诉我怎么修。当我尝试将更少的数据绑定到它时,它工作得非常好 这是我写的代码 var _energyType; var _options = { chart: { renderTo: _container, Type: 'scatter', zoomType: 'xy', marginBottom: 100, plot
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
}]
};
var\u energy类型;
变量_选项={
图表:{
renderTo:_容器,
键入:“散布”,
zoomType:'xy',
marginBottom:100,
影子:错,
背景颜色:空
},
标题:{文本:'},
xAxis:[{
网格线宽度:1,
标题:{
启用:对,
文本:p_AttributeName+'(“+p_metricUOM+”)”,
差额:15,
时间间隔:1
}
}],
滚动条:{
已启用:true
},
打印选项:{
样条曲线:{
阈值:10000000,
}
},
亚克斯:[{
minorTickInterval:“自动”,
线宽:1,
宽度:1,
标题:{
文本:Summit.DV.Resources.Widget.Intensity+'('+p_uomtype+'/'+p_AttributeName+'('+p_metricUOM+'))'+'),
风格:{
背景颜色:“#fff”
}
}
}],
工具提示:{
十字准星:没错,
格式化程序:函数(){
var_strtoltip;
_energyType=Summit.DV.Resources.Widget.Intensity+'(“+p_计量类型+'/”+p_计量单位+”);
_strToolTip=Summit.DV.Resources.Generic.Site+':'+this.point.name+'
;
_strToolTip=_strToolTip+_energyType+':'+Summit.DV.Common.FormatNumber(this.y,p_locale,3,false)+'
;
_strToolTip=_strToolTip+p_energytype+'(“+p_uomtype+”):“+this.point.value+”
”;
_strToolTip=_strToolTip+p_AttributeName+'(“+p_metricUOM+”):“+Summit.DV.Common.FormatNumber(this.x,p_locale,0,false)+”
”;
如果(p_目标!=''){
_strToolTip=_strToolTip+Summit.DV.Resources.Widget.Target+'('+p_uomtype+'/'+p_metricUOM+'):'+Summit.DV.Common.FormatNumber(parseFloat(p_Target),p_locale,3,false)+'
;
_strtoltip=_strtoltip+'Δto Target('+p_uomtype+'/'+p_metricUOM+'):'+Summit.DV.Common.FormatNumber(parseFloat(this.y)-parseFloat(p_Target),p_locale,3,false);
}
否则{
_strToolTip=_strToolTip+Summit.DV.Resources.Widget.Target+'(“+p_uomtype+”/“+p_metricUOM+”):“+”+”
;
_strtoltip=_strtoltip+'Δ到目标('+p_uomtype+'/'+p_metricUOM+'):'+'';
}
返回(_strtoltip);
}
},
标签:{
项目:[{
风格:{
左:“40px”,
顶部:“0px”,
颜色:“#666666”,
字体:“粗体12px Calibri”,颜色:“黑色”,
已启用:false
}
}]
},
图例:{
启用:对,
布局:“水平”,
对齐:'居中',
垂直排列:“底部”,
边框宽度:0,
差额:10,
项目宽度:180,
labelFormatter:函数(){
返回此.name.substring(0,30);
}
},
出口:{
已启用:true
},
系列:[{
数据:使用情况
}]
};
这是Highcharts中的bug,据报道
解决方法是直接在选项中启用标记:
plotOptions: {
scatter: {
marker: {
enabled: true,
radius: 30.0
}
}
}
演示: