配置详解:http://www.highcharts.com/ref/
chart:
renderTo 图表的页面显示容器
defaultSeriesType 图表的显示类型(line,spline, scatter, splinearea bar,pie,area,column)
margin 上下左右空隙
events 事件
click function(e) {}
load function(e) {}
xAxis:yAxis:
属性:
gridLineColor 网格颜色
reversed 是否反向 true ,false
gridLineWidth 网格粗细
startOnTick 是否从坐标线开始画图区域
endOnTick 是否从坐标线结束画图区域
tickmarkPlacement 坐标值与坐标线标记的对齐方式on,between
tickPosition 坐标线标记的样式向内延伸还是向外延伸(insidel,outside)
tickPixelInterval 决定着横坐标的密度
tickColor 坐标线标记的颜色
tickWidth 坐标线标记的宽度
lineColor 基线颜色
lineWidth 基线宽度
max 固定坐标最大值
min 固定坐标最小值
plotlines 标线属性
maxZoom
minorGridLineColor
minorGridLineWidth
/minorTickColor
title:
enabled: 是否显示
text: 坐标名称
Labels 坐标轴值显示类默认:defaultLabelOptions
formatter 格式化函数
enabled 是否显示坐标轴的坐标值
rotation 倾斜角度
align 与坐标线的水平相对位置
x 水平偏移量
y 垂直偏移量
style
font 字体样式默认defaultFont
color 颜色
Tooltip 数据点的提示框
enabled 鼠标经过时是否可动态呈现true,false
formatter 格式化提示框的内容样式
plotOptions 画各种图表的数据点的设置
defaultOptions 默认设置
属性
Area类:
lineWidth 线宽度
fillColor area的填充颜色组
marker{} 设置动态属性
shadow 是否阴影 true,false
states 设置状态?
Line类
dataLabels: 数据显示类
enabled 是否直接显示点的数据true,false
series
name 该条曲线名称
data[] 该条曲线的数据项
addPoint([x,y],redraw,cover) 添加描点,redraw是否重画,cover是否左移
setData: function(data, redraw)重新设置Data数组,redraw是否重画
remove: function(redraw) 删除曲线
redraw: function() 重画曲线
marker:
enabled 是否显示描点
去掉右下角的highcharts.com的方法:
在highcharts.js中找到credits:{enabled:true,text:"highcharts.com",href:"http://www.highcharts.com"
去掉text里内容就ok
Jquery highcharts用法:
1.在页面调用js
<script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Highcharts/highcharts/js/highcharts.js" type="text/javascript"></script>
2.在html页面加入一个div容器用来放报表数据
<div id="chart-container-1" style="width: 100%; height: 400px"></div>
3.一个简单的实例
$(document).ready(function(){
var chart1 = new Highcharts.Chart({
chart: { //整体控制
renderTo: 'chart-container-1',//把报表放到页面的容器中
defaultSeriesType: 'bar'
//可选,默认为line。
//控制线条样式,line:折线;
//spline:平滑的线;
//area:折线、下边有颜色块儿;
//areaspline:平滑的线、下边有颜色块儿;
//column:柱状图;
//bar:横向条形图;
//pie:饼图;
// scatter:点状图;
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['苹果', '香蕉', '橘子']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
},
series: [{
name: '小A',
data: [1, 0, 4]
}, {
name: '小B',
data: [5, 7, 3]
}]
});
});
配置详解:http://www.highcharts.com/ref/
chart:
renderTo 图表的页面显示容器
defaultSeriesType 图表的显示类型(line,spline, scatter, splinearea bar,pie,area,column)
margin 上下左右空隙
events 事件
click function(e) {}
load function(e) {}
xAxis:yAxis:
属性:
gridLineColor 网格颜色
reversed 是否反向 true ,false
gridLineWidth 网格粗细
startOnTick 是否从坐标线开始画图区域
endOnTick 是否从坐标线结束画图区域
tickmarkPlacement 坐标值与坐标线标记的对齐方式on,between
tickPosition 坐标线标记的样式向内延伸还是向外延伸(insidel,outside)
tickPixelInterval 决定着横坐标的密度
tickColor 坐标线标记的颜色
tickWidth 坐标线标记的宽度
lineColor 基线颜色
lineWidth 基线宽度
max 固定坐标最大值
min 固定坐标最小值
plotlines 标线属性
maxZoom
minorGridLineColor
minorGridLineWidth
/minorTickColor
title:
enabled: 是否显示
text: 坐标名称
Labels 坐标轴值显示类默认:defaultLabelOptions
formatter 格式化函数
enabled 是否显示坐标轴的坐标值
rotation 倾斜角度
align 与坐标线的水平相对位置
x 水平偏移量
y 垂直偏移量
style
font 字体样式默认defaultFont
color 颜色
Tooltip 数据点的提示框
enabled 鼠标经过时是否可动态呈现true,false
formatter 格式化提示框的内容样式
plotOptions 画各种图表的数据点的设置
defaultOptions 默认设置
属性
Area类:
lineWidth 线宽度
fillColor area的填充颜色组
marker{} 设置动态属性
shadow 是否阴影 true,false
states 设置状态?
Line类
dataLabels: 数据显示类
enabled 是否直接显示点的数据true,false
series
name 该条曲线名称
data[] 该条曲线的数据项
addPoint([x,y],redraw,cover) 添加描点,redraw是否重画,cover是否左移
setData: function(data, redraw)重新设置Data数组,redraw是否重画
remove: function(redraw) 删除曲线
redraw: function() 重画曲线
marker:
enabled 是否显示描点
去掉右下角的highcharts.com的方法:
在highcharts.js中找到credits:{enabled:true,text:"highcharts.com",href:"http://www.highcharts.com"
去掉text里内容就ok
Jquery highcharts用法:
1.在页面调用js
<script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Highcharts/highcharts/js/highcharts.js" type="text/javascript"></script>
2.在html页面加入一个div容器用来放报表数据
<div id="chart-container-1" style="width: 100%; height: 400px"></div>
3.一个简单的实例
$(document).ready(function(){
var chart1 = new Highcharts.Chart({
chart: { //整体控制
renderTo: 'chart-container-1',//把报表放到页面的容器中
defaultSeriesType: 'bar'
//可选,默认为line。
//控制线条样式,line:折线;
//spline:平滑的线;
//area:折线、下边有颜色块儿;
//areaspline:平滑的线、下边有颜色块儿;
//column:柱状图;
//bar:横向条形图;
//pie:饼图;
// scatter:点状图;
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['苹果', '香蕉', '橘子']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
},
series: [{
name: '小A',
data: [1, 0, 4]
}, {
name: '小B',
data: [5, 7, 3]
}]
});
});