是否可以删除highstock / highcharts中的窗格? [英] Is it possible to remove a pane in highstock/highcharts?
问题描述
我已经像下面这样动态地添加了窗格(所以我的轴有Id等)
chartX.addAxis ({// Secondary yAxis
id:studyName,
title:{
text:studyText
},
isX:false,
lineWidth:2,
lineColor:'#08F',
//对面:true,
top:startHeight,$ b $ height:100,
offset:0
}) ;
var chartToUpdate = chartX.addSeries({
name:'ADBE',
id:'studyNew',
color:'black',
data:studyData,
yAxis:studyName
});
$(#selectStudy)。append(< option value ='+ countNoOfStudiesAdded +'>+ studyName +< / option>)
}
是否有可能如上所述删除窗格。任何其他方法,可以帮助实现动态删除窗格将不胜感激。
谢谢。
您可以使用Axis.remove()函数删除轴。
http:// api。 highcharts.com/highcharts#Axis.remove()
Suppose I have two panes in my highstock, can I remove one of the panes dynamically. So if I click on a pane, I should be able to trap the event alongwith the id of the pane(yaXis) and subsequently delete the axis alongwith its series. I have added the panes dynamically like following( so I axis have Id etc. with me)
chartX.addAxis({ // Secondary yAxis
id: studyName,
title: {
text: studyText
},
isX: false,
lineWidth: 2,
lineColor: '#08F',
//opposite: true,
top: startHeight,
height: 100,
offset: 0
});
var chartToUpdate=chartX.addSeries({
name: 'ADBE',
id: 'studyNew',
color: 'black',
data: studyData,
yAxis: studyName
});
$("#selectStudy").append("<option value='"+countNoOfStudiesAdded+"'>"+studyName+"</option>")
}
Is it possible to delete the pane as mentioned above. Any other method that can help achieve dynamic removal of the pane will be appreciated.
Thanks.
You can use Axis.remove() function to remove axis.
http://api.highcharts.com/highcharts#Axis.remove()
这篇关于是否可以删除highstock / highcharts中的窗格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!