//Get the context of the canvas element we want to select
|
|
var option = {
|
|
//Boolean - If we show the scale above the chart data 是否显示图表数据的比例尺
|
scaleOverlay : true,
|
|
//Boolean - If we want to override with a hard coded scale
|
scaleOverride : false,
|
|
//** Required if scaleOverride is true **
|
//Number - The number of steps in a hard coded scale
|
scaleSteps : null,
|
//Number - The value jump in the hard coded scale
|
scaleStepWidth : null,
|
//Number - The scale starting value
|
scaleStartValue : null,
|
|
//String - Colour of the scale line
|
scaleLineColor : "rgba(0,0,0,.1)",
|
|
//Number - Pixel width of the scale line
|
scaleLineWidth : 2,
|
|
//Boolean - Whether to show labels on the scale
|
scaleShowLabels : true,
|
|
//Interpolated JS string - can access value
|
scaleLabel : "<%=value%>",
|
|
//String - Scale label font declaration for the scale label 字体
|
scaleFontFamily : "'Arial'",
|
|
//Number - Scale label font size in pixels 字体大小
|
scaleFontSize : 12,
|
|
//String - Scale label font weight style 加粗
|
scaleFontStyle : "bold",
|
|
//String - Scale label font colour 字体颜色
|
scaleFontColor : "#666",
|
|
///Boolean - Whether grid lines are shown across the chart 是否显示网格线
|
scaleShowGridLines : true,
|
|
//String - Colour of the grid lines 网格线颜色
|
scaleGridLineColor : "rgba(0,0,0,.05)",
|
|
//Number - Width of the grid lines
|
scaleGridLineWidth : 1,
|
|
//Boolean - If there is a stroke on each bar
|
barShowStroke : false,
|
|
//Number - Pixel width of the bar stroke
|
barStrokeWidth : 1,
|
|
//Number - Spacing between each of the X value sets
|
barValueSpacing : 6,
|
|
//Number - Spacing between data sets within X values
|
barDatasetSpacing : 1,
|
|
//Boolean - Whether to animate the chart 动画
|
animation : true,
|
|
//Number - Number of animation steps 动画时间
|
animationSteps : 60,
|
|
//String - Animation easing effect 动画执行曲线
|
animationEasing : "easeOutQuart",
|
|
//Function - Fires when the animation is complete 回调函数
|
onAnimationComplete : null
|
|
}
|
|
|