问题
I would like to be able to have several different "zones" indicated by the background on my jqplot bar chart.
I have looked through the documentation, but have been unable to easily identify a way to do this.
Is there a simple "fill" function or parameter that would allow me to set the background in several bands of horizontal color (various heights)?
Thanks in advance.
FG
回答1:
I would use a similar approach as I suggest in the answer to a different question here.
A direct link to the code sample.
You would then set the sizes of the underlying lines accordingly to highlight your regions. This approach is for example used by @Katya presented in the link under one of the comments to the aforementioned answer.
Direct link to Katya's code sample.
回答2:
You can also use the rectangle overlay developed by Bruno Harbulot : https://bitbucket.org/harbulot/jqplot
Here is a jsFiddle sample : http://jsfiddle.net/K2cVL/1/
来源:https://stackoverflow.com/questions/10534056/jqplot-background-color-zones