Skip to content
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

Gray out areas with no results #251

Open
CGenie opened this issue Apr 19, 2023 · 0 comments
Open

Gray out areas with no results #251

CGenie opened this issue Apr 19, 2023 · 0 comments

Comments

@CGenie
Copy link

CGenie commented Apr 19, 2023

Hello,

Thank you for this nice library.

I'm trying to create a line plot where I want to add a light gray rectangle where there are no results. I do have some heuristic on how to tell which data I want to gray out (since it's discrete anyways).

My plot is more or less like this:

  plot_lines_style .= (line_width .~ 2 $ line_color .~ opaque red $ def)
  plot_lines_values .= [[(ts, v.avg) | (ts, v) <- values]]

ts is of type UTCTime so the axis is determined automatically by the library to be of date-time type.

I'm guessing the code should be close to the one in Graphics.Rendering.Chart.Plot.FillBetween:

https://hackage.haskell.org/package/Chart-1.9.4/docs/Graphics-Rendering-Chart-Plot-FillBetween.html.

However, I'm not sure how to set y axis so that the whole y axis range is greyed out.

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

1 participant