1
Y轴标签始终从0开始,直到稍大于图中的最大值。我想从50开始,直到100(50,60,70,80,90,100)。如何控制电子书中Y轴上的标签
我使用的代码如下:
HTML代码: DIV ID = 'chart_1' 风格= '高度:200像素;宽度:400像素;'/DIV
JavaScript代码:
$(document).ready(function() {
$.elycharts.templates['line_basic_3'] = {
type: "line",
margins: [22, 10, 20, 30],
defaultSeries: {
type: "line",
rounded: false,
plotProps: {
"stroke-width": 5
}
},
series: {
serie1: {
type: "line",
color: "#AAAAAA"
},
serie2: {
type: "line",
color: "#00AA00"
},
serie3: {
type: "line",
color: "#0000BB"
},
serie4: {
type: "line",
color: "green"
},
serie5: {
type: "line",
color: "black"
}
},
defaultAxis: {
labels: true,
labelsProps: {
fill: "#FFF",
"font-size": "10px"
}
},
features: {
grid: {
draw: [true, false],
forceBorder: true,
//ny: 3, // use 10 divisions for y grid
//nx: 5, // 10 divisions for x grid
props: {
stroke: "#FFF" // color for the grid
}
},
legend: {
horizontal: true,
width: 360,
height: 20,
x: 30,
y: 0,
borderProps: {
"fill-opacity": 0.1
}
}
}
}
$('#chart_1').chart({ template: 'line_basic_3', legend: {serie1:'2011',serie2:'2012',serie3:'2013'}, labels: ['Jan','Feb','Mar'], values: {serie1:[20,45,10],serie2:[40,15,35],serie3:[10,30,5]}});"
});
病检查elycharts文档。没有改变轴范围的选择...还检查这个小提琴:http://jsfiddle.net/SyDWF/第一系列的最小值是-1000,在图表上它是0 ...这个插件是像一个地狱。 – Kasyx 2013-04-19 08:58:52