Author |
Topic  |
|
aquacalc
2 Posts |
Posted - 01 Dec 2009 : 12:59:19
|
In my non-QCChart2D app, I override paintComponent() and pass fillPolygon() coordinates that represent the vertices of the figure I wish to fill.
I then fill either the lower or upper region of an irregular figure.
"Lower Region" => the x-axis is the lower boundary "Upper Region" => the complement of the lower region ********************************************* Thus far with QCChart2D, I can...
* fill lower regions
* fill upper regions when the fill boundary intersects the upper plot boundary, i.e. y = yMax
...but I cannot...
* fill the upper region when the boundary intersects the right plot boundary, i.e. x = xMax
* display upper fill when zooming an "upper-filled" region. In that case, the originally upper-filled region instead is displayed incorrectly as a *lower-filled* region. ********************************************* I've played with the order in which I add the vertices to the SimpleDataset object, but without success.
Am I missing a method or flag that forces filling only the upper part of a polygon?
Or can you suggest a work-around?
I can e code based on the SimpleLinePlots and ZoomExamples tutorials that illustrate this issue. *********************************************
Thanks,
--Nick Staresinic |
|
quinncurtis
1164 Posts |
Posted - 01 Dec 2009 : 14:03:28
|
Sorry, but I cannot see any workaround for what you describe. The SimpleLinePlot routines fill from the line defined by the dataset, to the y-value specified by the FillBaseValue( lineplot.setFillBaseValue). |
 |
|
aquacalc
2 Posts |
Posted - 01 Dec 2009 : 16:48:55
|
quote: The SimpleLinePlot routines fill from the line defined by the dataset to the y-value specified by the FillBaseValue( lineplot.setFillBaseValue).
Thank you for that help; that's what I needed:
Combined with passing the proper polygon vertices in the proper order, I use a boolean to switch between setFillBaseValue(myYMin) when I want to fill a lower region and setFillBaseValue(myYMax) when I want to fill an upper region. This also solves the problem of displaying the correct fill region on zooming, as long as the zoom rectangle does not extend beyond the original plot area. |
 |
|
|
Topic  |
|
|
|