Pre loader

chartSurface padding in v4.0

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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.

Version
4.0.918
Images
  • You must to post comments
0
0

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?

  • You must to post comments
0
0

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.

  • Jim Risen
    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 to post comments
0
0

Ok sure, here’s the screenshot of charts with VerticalGroup with yAxis on the left and and padding on the right.

Images
  • Jim Risen
    This looks like a correct behavior. This is how it worked with v3.5, right?
  • Edwin Liu
    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 to post comments
0
0

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.

Images
  • You must to post comments
0
0

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

  • You must to post comments
0
0

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?

  • You must to post comments
0
0

Hi, yes for the time being the workaround will do the job.
Cheers

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.