netdata / netdata-cloud

The public repository of Netdata Cloud. Contribute with bug reports and feature requests.
GNU General Public License v3.0
41 stars 16 forks source link

[BUG] Chart image export using "Save Image As" or "Copy Image" does not capture the right image #258

Closed shyamvalsan closed 2 years ago

shyamvalsan commented 2 years ago
**Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Open any warroom (using Chrome browser on Mac OS Monterey 12.2, M1) 2. Right click on any chart 3. Select "Save Image As" or "Copy Image" 4. Saved or copied image does not capture the chart image, it grabs a blank and partially filled image instead **Expected behavior** Expected behavior is for the chart image to be reproduced exactly as shown in the Netdata UI **Screengrab** https://drive.google.com/file/d/1KnxrmBWNZwZ96VZMmiUxN-fCoiWNi-nd/view **Desktop (please complete the following information):** - OS: MacOS Monterey 12.2 (M1 processor) - Browser: Chrome version 97.0.4692.99 - Version [e.g. 22] **Additional context** Internal submit
shyamvalsan commented 2 years ago

Similar behavior on Windows as well - the chart saved is completely blank this time around.

shyamvalsan commented 2 years ago

@hugovalente-pm not sure if this is a known issue or not

novykh commented 2 years ago

This is not a bug since this is not an image :) It's a canvas, which consists of multiple images that get draw with js - hence you get like a small part of the whole chart. We can add a feature (for the future) to support image capturing for the chart, but this needs a specific implementation to create the image out of the chart via js and allow the browser to download it.

shyamvalsan commented 2 years ago

@novykh but what is "Save Image As" actually supposed to do?

novykh commented 2 years ago

This is the default right click menu of the browser, not our implementation. The browser thinks that this is an image, so it provides the user with this option.

shyamvalsan commented 2 years ago

Oh - I get it now :) so we do not offer any way for charts to be exported currently. Closing the ticket, and we can consider it as a feature in the future.

novykh commented 2 years ago

Yes, I believe the library we are using for charts has an extension for this to happen, we can do a check for the rest of the libraries (i.e. gauges, etc.) if needed. Cheers

hugovalente-pm commented 2 years ago

@shyamvalsan more as fyi, the feature is identified here netdata/product#1894