Skip to content

Gray out areas with no results #251

@CGenie

Description

@CGenie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions