Bug #8051
openWCartesianChart bad styled pdf print
0%
Description
I have a WCartesianChart with zoom functionality, that should be print to pdf. (See chart1.png, example in hello.cpp)
Please check the following 3 use cases:
1.) Everything is fine if no zoom is applied. Chart in pdf is well styled and the entire area is visible. (See chart1.pdf)
2.) If you apply zoom with mousewheel and do nothing else, Chart in pdf is also well styled, but still the entire area is visible. (I admit, that this might also be a desired function)
3.) If you apply zoom and enter a date in the DatePicker below, so that WCartesianChart::setFormData(const FormData& formData) is called by the client, transform-parameters are changing and in the following the pdf chart shows only a part of the data (but not exactly the zoom area), and has also a bad styled x-Axis. (See chart2.png and chart2.pdf)
Is that something, I doing wrong, or how can I get a well styled pdf, no matter if zoomed or not ?
If this is a bug, and can be fixed. How can I force WCartesianChart::setFormData to ensure, that pdf shows zoomed area, before Button is pressed and WResource::handleRequest occurs ?
regards,
Files
Updated by Korneel Dumon almost 4 years ago
In general, when you render a widget to a PDF, it's best to make a completely new widget rather than using one that is shown in the browser. If you don't do this, then the same widget is rendered in two different places, which can cause some unexpected issues.
For this specific case, all I can say is that interactive zooming is only supported for a canvas paintdevice.