highstock remove series 後動態新增series
具體效果參考我在jsFiddle的例子:http://jsfiddle.net/7pKV9/,程式碼如下:
<div id="container" style="height: 400px; min-width: 600px"></div>
<button id="button">Remove series and Add series</button>
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript" src="http://www.highcharts.com/samples/data/three-series-1000-points.js"></script>
$(function() {
$('#container').highcharts('StockChart', {
scrollbar: {
enabled: true
},
navigator: {
enabled: true
},
rangeSelector: {
selected: 1
},
series: [{
name: 'MSFT',
data: MSFT
}]
});
$('#button').click(function() {
var chart = $('#container').highcharts();
for(var i=0;i<chart.series.length;i++)
chart.series[i].remove();
chart.addSeries({
name: 'ADBE',
data: ADBE
});
chart.addSeries({
name: 'MSFT',
data: MSFT
});
$(this).attr('disabled', true);
});
});
相關文章
- Time Series DatabasesDatabase
- async原始碼之series原始碼
- Pandas庫的使用--Series
- pd.Series()函式解析函式
- 【pandas學習筆記】Series筆記
- 【矩陣乘法】Matrix Power Series矩陣
- Python之Series 學習Python
- Lesson3——Pandas Series結構
- Pandas - pandas.Series.pipe 函式函式
- JavaScript 判斷 iPhone X Series 機型JavaScriptiPhone
- python中獲取如何Series值Python
- pandas中的series資料型別資料型別
- python list tuple str dic series dataframePython
- Spring Series---@Scheduled使用深度理解Spring
- Oracle Reporting 4 - Time Series CalculationsOracle
- 優化Microsoft Windows Media Services 9 Series優化ROSWindows
- Python資料分析 Series 筆記Python筆記
- Spring Series---事務中JDBC是否自動提交解析SpringJDBC
- Security Series: Cross-domain resource sharing CORSROSAICORS
- RocketMQ Series---No route info of this topic異常分析MQ
- Scrum series | How we do product backlogs薦Scrum
- PostgreSQL的generate_series函式應用SQL函式
- From BIO to NIO series —— BIO source code interpretation
- Netty series: handling CORS in nettyNettyCORS
- InfluxDB 2.x Open Source Time Series DatabaseUXDatabase
- (11.2)James Stewart Calculus 5th Edition:Series
- 蘋果Apple Watch Series 2釋出:支援防水蘋果APP
- echarts bar series下的label position問題Echarts
- Pandas - Series.str.xxx 常用函式函式
- Pandas Series物件有哪些屬性?六大類!物件
- <Python>判斷變數是否是DataFrame 或者 SeriesPython變數
- 蘋果手錶——Apple watch series 6健康功能提升蘋果APP
- pandas 學習(1): pandas 資料結構之Series資料結構
- WMI Series 4:Win32類及其管理物件 (轉)Win32物件
- python-資料分析-Pandas-1、Series物件Python物件
- Spring Series---Springboot指定不同的啟動環境方法總結Spring Boot
- 華為Watch 2與蘋果 Series 2對比 誰更強?蘋果
- POJ 3233 Matrix Power Series(矩陣+二分)矩陣