Add a link/button in the htmlExpand
在highslide應用中,對高亮顯示框中的文字新增超連結或按鈕的方法。
該例子是基於highcharts應用上的
ttp://www.w3.org/TR/html4/strict.dtd">http://www.w3.org/TR/html4/strict.dtd">
Highcharts Example
<!-- 1. Add these JavaScript. inclusions in the head of your page -->
<!-- 1. Add these JavaScript. inclusions in the head of your page -->
<!--[if IE]>
<!-- 2. Add the JavaScript. to initialize the chart on document ready -->
var chart;
//globally available
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
defaultSeriesType: 'spline'
},
title: {
text: 'Monthly Average Temperature in Tokyo'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
title: {
text: 'Month'
}
},
yAxis: {
title: {
text: 'Temperature (°C)'
}
},
legend: {
enabled: false
},
tooltip: {
formatter: function() {
return ''+ this.series.name +'
'+
this.x +': '+ this.y +'°C';
}
},
plotOptions: {
spline: {
cursor: 'pointer',
point: {
events: {
click: function() {
//alert("Hello Word!");
//window.open("line-basic.htm");
//window.navigate("line-basic.htm");
//window.location.href="line-basic.htm";
/*hs.expand(null, {
src: 'skies.jpg'
});
hs.Expander.prototype.onImageClick = function (sender) {
return window.open("line-basic.htm");
}*/
hs.htmlExpand(null, {
pageOrigin: {
x: this.pageX,
y: this.pageY
},
headingText: "\n \n"+this.series.name+"",
maincontentText: 'this.category: '+ this.category +
'
this.y: '+ this.y,
width: 200
});
}
}
}
}
}
}
}
},
series: [{
name: 'Tokyo',
dataURL: 'tokyo.json'
}]
});
});
<!-- 3. Add the container -->
series: [{
name: 'Tokyo',
dataURL: 'tokyo.json'
}]
});
});
<!-- 3. Add the container -->
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10314474/viewspace-667505/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- <button>和<input type=“button“> 的區別
- <input type="button">和<button>的區別
- jQuery :buttonjQuery
- Layui-buttonUI
- el-button
- add exttrail 和add rmttail總結AI
- this.button1.Click += new System.EventHandler(this.button1_Click);
- JavaScript event.buttonJavaScript
- Flutter Button(按鈕)Flutter
- Bootstrap風格buttonboot
- Flex元件篇:ButtonFlex元件
- git add all和git add .區別Git
- jQuery add()jQuery
- 微信小程式元件button微信小程式元件
- HTML input button按鈕HTML
- HTML input button 按鈕HTML
- c# button學習C#
- 無邊框 Button 【WPF】
- 小程式中button的邊框無法去除 button邊框如何去除
- DataTransferItemList.add()
- git add errorGitError
- add field security
- Tkinter (02) 按鈕部件 Button
- Flutter UI - button系 WidgetFlutterUI
- button和submit的區別MIT
- Android Button 點選效果Android
- 對於button元素的理解
- 自定義Button高亮狀態
- Android Button的基本使用Android
- React Native自定義ButtonReact Native
- 自定義view————開關buttonView
- android:Button控制元件Android控制元件
- Flutter之Button,寬度佔滿螢幕,四周帶icon的ButtonFlutter
- database link概述Database
- CREATE DATABASE LINKDatabase
- Database Link使用Database
- 建立Database LinkDatabase
- oracle database linkOracleDatabase