flot jquery y axis option is not working

有些话、适合烂在心里 提交于 2019-12-11 19:53:42

问题


This is my yasix option

yaxes: {
                   min: 0,
                   max: 100,
                   tickFormatter: function (val, axis) {
                       return val + '%';
                   }
               },

but when I run the chart, the max is not 100, plus there is no % sign.

what wrong did i do pleaes?

I didn't post other code becuase I think the problem from the code above, if you see that my code is correct and you need more code kindly tell me please


回答1:


If you only have a single value, the option is yaxis instead of yaxes. If you have multiple values, you should provide an array.




回答2:


From the code you provided, see yaxes instead of yaxis . And check if val is in Number or String.. print and see if it is showing as object



来源:https://stackoverflow.com/questions/25364240/flot-jquery-y-axis-option-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!