jqPlot - How to change background colour when selecting range on graph

你离开我真会死。 提交于 2019-12-11 11:19:21

问题


I'm using jqPlot to render a graph with zooming enabled.

For example:

http://www.jqplot.com/tests/zooming.php

In the example above, when you make a selection on the graph, the graph canvas is painted in grey (apart from the selection). Does anyone know how to customise this colour?

I've been unable to find which jqPlot CSS option to tweak in jquery.jqplot.css.


回答1:


I am afraid that no css is involved in this particular process of painting. Though there is one class which can point you in the right direction. My suspect is the jqplot-zoom-canvas class. Though I think that the painting is defaulted to grey.

Thus, I see only two options:

  1. Changing the painting directly in the jqplot script.
  2. Or on painting of zoom selection start change the colour of the jqplot-zoom-canvas then change it back to default on painting zoom stop. But I do not know if there are hooks for these sort of events. Therefore, you might actually be left with only the option no. 1.


来源:https://stackoverflow.com/questions/10334135/jqplot-how-to-change-background-colour-when-selecting-range-on-graph

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