Hello!

I've been experiencing an issue lately that I'm not sure where it originates from. Currently, I'm using version 4.0.2. When I create a dashboard and add a column, for some reason, when I add a chart to that column and later enlarge the column, the new dimensions of my chart are not updated correctly in the position_json configuration. As a result, when using the API to download the chart's image, it downloads with incorrect dimensions. I've attached images to make it a bit clearer:

Image 1: I create a column in my dashboard. image1

Image 2: I add a chart to my column. image2

Image 3: I enlarge the size of my column. image3

Image 4: When I remove my chart from the column, it doesn't maintain the resized dimensions after enlarging the column. Apache Superset Issue with Chart Dimensions Not Updating in position_json After Resizing Dashboard Column

In summary, and just to clarify, my problem is that when varying the dimensions of a column, these changes are not reflected in the position_json that I access via the API to download the dashboard's images. Furthermore, you don't necessarily need to look at the JSON to observe the issue, as it can also be seen directly in the dashboard: when extracting the chart from the column, it reverts to its default or original size as when a chart is first added to the dashboard.

Currently, as a workaround, I adjust my charts to the desired size before adding them to a column, which resolves the issue. However, I believe it's important to highlight this in case it's behavior that should not be happening.

Thank you

Comment From: dosubot[bot]

The issue you're experiencing with the position_json not updating correctly after resizing a dashboard column in Superset version 4.0.2 might be related to how the resizing events are handled in the frontend. The position_json should be updated when a column containing a chart is resized, reflecting the new dimensions in the meta attribute of the chart holder [1].

The resizing process is managed by the ResizableContainer component, which uses the Resizable component from the re-resizable library. The resizeComponent function is responsible for updating the component's dimensions in the Redux store, which should then update the position_json [2][3].

If the position_json is not updating as expected, it could be due to a bug or a specific condition in version 4.0.2 that prevents the update. Unfortunately, I couldn't find any specific known issues or configurations that might cause this problem in the available data [1].

As a workaround, you might consider manually triggering the update of the position_json after resizing, or continue using your current method of adjusting chart sizes before adding them to a column. If this behavior persists, it might be worth investigating further in the codebase or checking for any updates or patches that address this issue.

To continue talking to Dosu, mention @dosu.

Comment From: rusackas

Can you validate that this is still happening in 4.1.2 / 5.0.0rc2?

Comment From: rusackas

We haven't heard back from anyone that this is still happening in current releases (or on master) and I haven't encountered it or seen any other reports. We'll close this out, but if you can validate the bug is still currently happening, we can happily reopen/revisit.