jqPlot-在图形上选择范围时如何更改背景颜色 [英] jqPlot - How to change background colour when selecting range on graph

查看:98
本文介绍了jqPlot-在图形上选择范围时如何更改背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jqPlot渲染启用缩放的图形.

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

例如:

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?

我一直无法在jquery.jqplot.css中找到要调整的jqPlot CSS选项.

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

推荐答案

在此特定的绘画过程中,恐怕没有CSS涉及.尽管有一门课可以为您指明正确的方向.我怀疑是jqplot-zoom-canvas类.尽管我认为这幅画默认为灰色.

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. 直接在jqplot脚本中更改绘画.
  2. 或者在绘画缩放选择时开始更改jqplot-zoom-canvas的颜色,然后在绘画缩放停止时将其更改回默认值.但是我不知道是否有此类事件的钩子.因此,实际上您可能只剩下选项no. 1.
  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.

这篇关于jqPlot-在图形上选择范围时如何更改背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆