[英]Jqplot situation with the last bar in the graph
Situation 情况
I'm trying to have some space over the last xaxis
options. 我试图在最后的xaxis
选项上xaxis
一些空间。
For example: 例如:
xaxis. min:-max:6
tickOption
, it doesn't appear because it is outside of the canvas. 最后一个栏仅显示一半,如果我尝试使用tickOption
,则不会出现,因为它在画布之外。 code : http://jsfiddle.net/chalien/zEQe7/ 代码 : http : //jsfiddle.net/chalien/zEQe7/
THANKS 谢谢
Your array isn't set right for the bar chart. 您的阵列未正确设置为条形图。 You don't need to tell the plot rendered it is point number 1, 2, 3, etc... It knows it by himself. 您无需告诉渲染的图它就是点号1、2、3等...它自己知道。
Just change the array definition to: 只需将数组定义更改为:
[[4, 6, 2, 5, 6]]
And your graph will be rendered correctly, with or without the min
and max
definitions. 无论有没有min
和max
定义,您的图形都将正确显示。
Here is the full code: 这是完整的代码:
<script type="text/javascript">
$.jqplot('chart2', [[4, 6, 2, 5, 6]],
{ title:'Exponential Line',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
varyBarColor: true
}
},
axes: {
xaxis: {
max:6,
min:0,
renderer: $.jqplot.LinearAxisRenderer
}
}
});
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.