draw a specific area in the wxChartPanel

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
student_4
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Mar 18, 2019 1:59 pm

draw a specific area in the wxChartPanel

Post by student_4 » Mon Mar 18, 2019 2:11 pm

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.

Kvaz1r
Earned some good credits
Earned some good credits
Posts: 100
Joined: Tue Jun 07, 2016 1:07 pm

Re: draw a specific area in the wxChartPanel

Post by Kvaz1r » Mon Mar 18, 2019 2:52 pm

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.

student_4
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Mar 18, 2019 1:59 pm

Re: draw a specific area in the wxChartPanel

Post by student_4 » Tue Mar 19, 2019 8:48 am

thank you for the reply and suggestion, I will try it.

student_4
In need of some credit
In need of some credit
Posts: 3
Joined: Mon Mar 18, 2019 1:59 pm

Re: draw a specific area in the wxChartPanel

Post by student_4 » Tue Mar 19, 2019 12:42 pm

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.

Kvaz1r
Earned some good credits
Earned some good credits
Posts: 100
Joined: Tue Jun 07, 2016 1:07 pm

Re: draw a specific area in the wxChartPanel

Post by Kvaz1r » Tue Mar 19, 2019 1:14 pm

Unfortunately I don't know other options except change source code of the library and implement area chart manually :)

Post Reply