Skip to content

Highlight Background Bars #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Venerons opened this issue Aug 31, 2016 · 6 comments
Closed

Highlight Background Bars #892

Venerons opened this issue Aug 31, 2016 · 6 comments

Comments

@Venerons
Copy link

I have not found this feature neither an alternative way to accomplish this, so I'd like to submit a feature request if possible.

What I'd like to have is the feature to specify some regions to highlight on the chart, so between the given ranges (on the example based on X axis, but would be cool if also available on Y axis) the background is of a different, specified, color.

What I mean is something similar to the orange and darkgrey zones in the following example:

highlights

@sglyon
Copy link

sglyon commented Aug 31, 2016

Does the temperature example here do what you want? Note that you can change the color of those sections if you would like

@Venerons
Copy link
Author

Wow, yes, seems exactly what I was searching for, thanks!
I should use this configuration while using the Javascript version right?

@sglyon
Copy link

sglyon commented Aug 31, 2016

The json for the layout in that example is:

  "layout": {
    "width": 500,
    "shapes": [
      {
        "opacity": 0.2,
        "x0": "2015-02-04",
        "x1": "2015-02-06",
        "y0": 0,
        "type": "rect",
        "y1": 1,
        "fillcolor": "#d3d3d3",
        "line": {
          "width": 0
        },
        "xref": "x",
        "yref": "paper"
      },
      {
        "opacity": 0.2,
        "x0": "2015-02-20",
        "x1": "2015-02-22",
        "y0": 0,
        "type": "rect",
        "y1": 1,
        "fillcolor": "#d3d3d3",
        "line": {
          "width": 0
        },
        "xref": "x",
        "yref": "paper"
      }
    ],
    "height": 500
  }

@sglyon
Copy link

sglyon commented Aug 31, 2016

@Venerons
Copy link
Author

It's exaclty what I was searching for, thanks, sorry for bothering you! :)

@sglyon
Copy link

sglyon commented Aug 31, 2016

No problem -- happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants