开发者

Position of axis. Does it work?

Im trying simply put yaxis on 开发者_开发百科the right side, so accordingly to Flot Api my code is :

$.plot($('#values_plot'),[{
    data: values 
 }],{   
yaxis { position : "right"}
 });

As a result yaxis stays on the left side. I suppose that either I made some silly mistake or it is simply not working. Please help !


If you grabbed the latest version of Flot, the documentation is incorrect. If you want to plot against the right side, change yaxis to yaxis2 in your data object.

Here is how you would specify the series object:

series: [ { label: "Foo", yaxis: 2, data: [ [10, 1], [17, -14], [30, 5] ] } ]

I ran into the same problem and had to look at the Flot code to figure it out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜