Hi,
I upgraded scichart.js from 3.5.774 to 4.0.918, my chart now has a padding on the right side even though it was not there before.
I only added yAxis to the left side of the chart and not the right (please see attached image).
I’ve already set padding to 0:
sciChartSurface.padding = Thickness.fromString(‘0 0 0 0’)
If I want to get rid of the padding, I now have to change it to:
sciChartSurface.padding = Thickness.fromString(‘0 -11 0 0’)
The breaking changes page only mention padding change to the SciChartSubSurface, but I am not using that. https://www.scichart.com/documentation/js/v4/whats-new/breaking-changes-v3-v4/
I only have one sciChartSurface.
const { sciChartSurface, wasmContext } = await SciChartSurface.create(divElementId)
Please let me know what might be causing this, thanks.
- Edwin Liu asked 5 months ago
- last edited 5 months ago
- You must login to post comments
Hi,
Yes, this kind of a bug is not expected during the migration.
I would suggest checking if there are any other relevant configurations around the chart.
Otherwise, if you think this is the library specific issue, please provide more details.
Because we would need to be able to reproduce this.
For example, could you reproduce it with one of our demos?
- Jim Risen answered 5 months ago
- You must login to post comments
Hi Jim,
I’m in the middle of investigating this, currently I found this happens because I have multiple charts added to SciChartVerticalGroup.
Removing the VerticalGroup and the padding goes away. Removing yAxis title also makes the padding go away (even though the yAxis is on the left hand side of the chart, whereas the unwanted padding is on the right).
This issue does not happen in the previous version (3.5.774). I’ll be working on recreating it in an online demo. In the meantime, please let me know if there’s something I can do to SciChartVerticalGroup that could resolved this.
Thanks in advance.
- Edwin Liu answered 5 months ago
OK, yeah, VerticalGroup could be affecting this. We will be waiting for the repro. Meanwhile, you can send us a screenshot that includes all of the charts that share the VerticalGroup so that we can see the full picture with this assumption in mind.
- You must login to post comments
Ok sure, here’s the screenshot of charts with VerticalGroup with yAxis on the left and and padding on the right.
- Edwin Liu answered 5 months ago
This looks like a correct behavior. This is how it worked with v3.5, right?
With 3.5 if I set padding to Thickness.fromString(‘0 0 0 0’), the right hand side white space will go away. Now I have to set it to (‘0 -11 0 0’) for it to go away.
- You must login to post comments
btw as a reference, this is what I want to achieve – no white padding on the rhs.
And it’s how it looks if I don’t use VerticleGroup.
- Edwin Liu answered 5 months ago
- You must login to post comments
HI,
I am able to reproduce this in Stackblitz. Please see the link below.
https://stackblitz.com/edit/vitejs-vite-jgwsgpjy?file=src%2FcreateChart.ts
- Edwin Liu answered 5 months ago
- last edited 5 months ago
- You must login to post comments
HI,
Thanks for the example. We have logged a task for it https://abtsoftware.myjetbrains.com/youtrack/issue/SCJS-2355/Padding-is-ignored-with-VerticalGroup
It seems like I was able to resolve the issues on the example by swapping these 2 lines:
chartGroup.addSurfaceToGroup(sciChartSurface);
sciChartSurface.padding = Thickness.fromString('0 0 0 0');
So, meanwhile you could try this workaround.
Let us know if that works for you?
- Jim Risen answered 4 months ago
- You must login to post comments
Hi, yes for the time being the workaround will do the job.
Cheers
- Edwin Liu answered 4 months ago
- You must login to post comments
Please login first to submit.

