问题
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