jqplot Background Color Zones?

2019-06-05 00:45发布

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

2条回答
\"骚年 ilove
2楼-- · 2019-06-05 01:13

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.

查看更多
再贱就再见
3楼-- · 2019-06-05 01:19

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/

查看更多
登录 后发表回答