Relative Content

Tag Archive for pythonpyqtqtcharts

Values are not saved in the graph after converting it into an image

I’ve been working to intergrate a print function for my PyQt desktop app program where the users can print a document with the generated graphs added on it. Before I do that, I need to find a way to save the graphs as images. After many attempts, I only managed to print out images of the graphs before the data was to be added, even though I saved these images right after adding the values from a CSV file into the graph. However, I’m having some kind of issue of converting the graphs into images.
Here’s what the graph should look like.
When I save the grap as an image, however, the values (the colored bars) are not present. How can I fix this?

Values are not saved in the graph after converting it into an image through PyQt

I’ve been working to intergrate a print function for my desktop app program where the users can print a document with the generated graphs added on it. Before I do that, I need to find a way to save the graphs as images. After many attempts, I only managed to print out images of the graphs before the data was to be added, even though I saved these images right after adding the values from a CSV file into the graph. However, I’m having some kind of issue of converting the graphs into images. Here’s what the graph should look like:
The graph before image convertion
When I save the grap as an image, however, the values (the colored bars) are not present. How can I fix this?