[收录] Highcharts-ng —— AngularJS 的图表扩展
2024-08-30 09:54:11
原文:http://www.tuicool.com/articles/u6VZJjQ
Highcharts-ng 是一个 AngularJS 的指令扩展,实现了在AngularJS 应用中集成Highcharts 图表库的功能。
演示地址: http://jsfiddle.net/pablojim/46rhz/
使用方法:
var myapp = angular.module('myapp', ["highcharts-ng"]);
HTML:
<highchart id="chart1" config="chartConfig"></highchart>
chartConfig:
//This is not a highcharts object. It just looks a little like one!
var chartConfig = {
options: {
//This is the Main Highcharts chart config. Any Highchart options are valid here.
//will be overriden by values specified below.
chart: {
type: 'bar'
},
tooltip: {
style: {
padding: 10,
fontWeight: 'bold'
}
}
},
//The below properties are watched separately for changes.
//Series object (optional) - a list of series using normal highcharts series options.
series: [{
data: [10, 15, 12, 8, 7]
}],
//Title configuration (optional)
title: {
text: 'Hello'
},
//Boolean to control showng loading status on chart (optional)
//Could be a string if you want to show specific loading text.
loading: false,
//Configuration for the xAxis (optional). Currently only one x axis can be dynamically controlled.
//properties currentMin and currentMax provied 2-way binding to the chart's maximimum and minimum
xAxis: {
currentMin: 0,
currentMax: 20,
title: {text: 'values'}
},
//Whether to use HighStocks instead of HighCharts (optional). Defaults to false.
useHighStocks: false,
//size (optional) if left out the chart will default to size of the div or something sensible.
size: {
width: 400,
height: 300
},
//function (optional)
func: function (chart) {
//setup some logic for the chart
}
};
快速使用Romanysoft LAB的技术实现 HTML 开发Mac OS App,并销售到苹果应用商店中。《HTML开发Mac OS App 视频教程》
- 土豆网同步更新:http://www.tudou.com/plcover/VHNh6ZopQ4E/
- 百度网盘同步:http://pan.baidu.com/s/1jG1Q58M
- 分享 [中文纪录片]互联网时代 http://pan.baidu.com/s/1qWkJfcS
官方QQ群:(申请加入,说是我推荐的)
- App实践出真知 434558944
- App学习交流 452180823
最新文章
- KVO设计模式
- RISC指令集的五个周期
- IntelliJ IDEA 目录技巧
- Js高程笔记->;引用类型
- mybatis like 查询
- [转载]AOP面向方面编程
- 关于ASPOSE.WORD使用上的一个小问题
- common-lang——StringUtils
- SGU 111.Very simple problem
- 误差逆传播(error BackPropagation, BP)算法推导及向量化表示
- MFC中函数名前加 :: 原因
- Java中常用加减密方式
- Unity MMORPG游戏开发教程(一)——初识Unity
- Luogu5176 公约数 莫比乌斯反演、线性筛
- SlidingMenu第一篇 --- 导入SlidingMenu库
- 【Linux】shell数组
- golang语言调试
- storyboard中UIButton setframe 不起作用
- Linux 配置文件管理
- python 爬虫之 正则的一些小例子
热门文章
- 学习鸟哥的Linux私房菜笔记(7)——文件查找与文件管理1
- [GeekBand] C++ 基础知识之 The Big Three
- Struts2——(6)表单校验
- hdu 2037 这个夏天不AC
- python爬虫 BeautifulSoup
- python 强制类型转换 以及 try expect
- CP_ACP : CP_OEMCP
- WPF图形/文字特别效果之一:交叉效果探讨(续)
- Windows Presentation Foundation(WPF)中的数据绑定(使用XmlDataProvider作控件绑定)
- 使用WPF创建画图箭头