Jqplot自定义图表颜色
Jqplot自定义图表颜色
// 水平柱状图
var plot = $.jqplot('chart1', [], {
title: '按系统统计符合情况',
seriesColors: colors,
dataRenderer: sineRenderer1,
seriesDefaults: {
renderer:$.jqplot.BarRenderer,
// 显示单个柱状图的数据
pointLabels: {
show: false,
location: 'e',
edgeTolerance: -15
},
//阴影角度
shadowAngle: 135,
// 设置柱状图的各项属性,例如:barDirection: 'horizontal'水平方向
rendererOptions: {
barDirection: 'horizontal',
barWidth:20,
barMargin: 5
}
},
axes: {
xaxis: {
min: 0,
max: 100,
tickInterval: 10,
tickOptions: {formatString: '%d\%' ,fontSize: 14}
},
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
},
grid:{
drawBorder: false,
shadow: false,
background:'#FFFFFF',
},
cursor: {
showTooltip: true,
followMouse: false,
showTooltipUnitPosition: false
},
highlighter: { show: true }
});