QCustomPlot Discussion and Comments

Filling above a graph lineReturn to overview

Awesome library. I was wondering how I might fill "above" (as opposed to below/between) graph line(s). Is there an easy way to do this?

What do you mean?

I'm afraid there's currently no easy and clean way to achieve that effect. I'll keep the idea in mind for some future release, but since it's an unusual requirement I can't make guarantees it will be implemented.

A not so clean way of achieving what you want is adding dummy graph to generate a channel fill that looks the way you want. The dummy graph is just a straight horizontal line (consisting of two data points) spanning the whole visible plot range in x and being above the visible plot range in y. You will have to adjust the data points of the dummy graph before every replot to satisfy that, but since it's only two data points, that's no problem. Now just set a channel fill between your graph and the dummy graph at the top.

Makes sense. I'm trying to plot the difference between two time series in real-time. So to make it stand out visually, I was planning on having two filled regions above and below, with whitespace in between. The dummy graph approach should work fine for now.

Thanks,
fred

I'm sorry, but i have like problem. I want to fill graph below, but what i have to do if my values are in range from 0 to -120. In that situation graph fills above, from 0 to graph values (negative values). Possible, necessary create some method for setting zero-value-line, that can be 0, or in my case -120.... And then graph will fill from zero-line to graph values.