Page 1 of 1

draw a specific area in the wxChartPanel

Posted: Mon Mar 18, 2019 2:11 pm
by student_4
Hi all,
could you please help me, I have two line curves(minimum curve and maximum one), those curves form a band. My problem is how to color the area in between two curves.
my XYDynamicDataset contains two XYDynamicSerie objects, each Serie represent one of two curves.
I used XYAreaRenderer to color the area in between but it always paints from the maximum curve to the horizontal axis.

Re: draw a specific area in the wxChartPanel

Posted: Mon Mar 18, 2019 2:52 pm
by Kvaz1r
Such type of chart usually named as area chart, check maybe library, which you use has support of this type.
If no - you could also draw area from min curve to line y = 0 (horizontal axis) with color equal background color of chart.

Re: draw a specific area in the wxChartPanel

Posted: Tue Mar 19, 2019 8:48 am
by student_4
thank you for the reply and suggestion, I will try it.

Re: draw a specific area in the wxChartPanel

Posted: Tue Mar 19, 2019 12:42 pm
by student_4
dear Kvaz1r, i applied what you suggested ...it works, but the columns and rows of the grid panel which are located below the minimum curve disappeared.now it is acceptable and thank you for the help again but if there is more efficient solution, I would grateful.

Re: draw a specific area in the wxChartPanel

Posted: Tue Mar 19, 2019 1:14 pm
by Kvaz1r
Unfortunately I don't know other options except change source code of the library and implement area chart manually :)