Issue with free-form layout when uploaded via API

I am facing issues while uploading my analysis to Quicksight with free-form layout via API.
All my components are getting aligned to left instead of their correct position.
Image:

And after clicking on the apply there come to their right position.
Image:

This is my layout json which I used via Api:

“layouts” : [ {
“configuration” : {
“gridLayout” : null,
“freeFormLayout” : {
“elements” : [ {
“elementId” : “d97cda9a-4af5-4633-a585-0786f90f553f”,
“elementType” : “VISUAL”,
“width” : “412px”,
“height” : “784px”,
“visibility” : “VISIBLE”,
“renderingRules” : null,
“borderStyle” : null,
“selectedBorderStyle” : null,
“backgroundStyle” : null,
“loadingAnimation” : null,
“yaxisLocation” : “8px”,
“xaxisLocation” : “8px”
}, {
“elementId” : “f4e48d75-ea18-4c56-a740-7b3c6d46be78”,
“elementType” : “VISUAL”,
“width” : “412px”,
“height” : “784px”,
“visibility” : “VISIBLE”,
“renderingRules” : null,
“borderStyle” : null,
“selectedBorderStyle” : null,
“backgroundStyle” : null,
“loadingAnimation” : null,
“yaxisLocation” : “8px”,
“xaxisLocation” : “420px”
} ],
“canvasSizeOptions” : {
“screenCanvasSizeOptions” : {
“optimizedViewPortWidth” : “1024px”
}
}
},
“sectionBasedLayout” : null
}
} ],
“sheetControlLayouts” : [ {
“configuration” : {
“gridLayout” : {
“elements” : [ {
“elementId” : “ab3ccb77-b5a3-4219-9a03-50f7165e765b”,
“elementType” : “FILTER_CONTROL”,
“columnIndex” : null,
“columnSpan” : 2,
“rowIndex” : null,
“rowSpan” : 1
} ],
“canvasSizeOptions” : null
}
}
} ],
“contentType” : null
},

Should I add some other details for getting the objects on right place.

Hi @Aditjain20

Got a quick follow up. After you upload the analysis via the API, the components are left aligned until you click apply, then at which point they move to their correct positions.

Would it be possible to download after saving via the describe-analysis-definition API, then provide the new layout found in this thread. I would like to do a diff on this.

Thanks

@dgirling