Pre loader

Cleaning up SciChartVerticalGroup

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


Looking into I see I can add surfaces to the group, but what about removing them?

I’ve constructed a problematic codepen to show a potential issue:

Any reason for not being able to remove surfaces from the group?


  • You must to post comments
Best Answer

So for reference. Now SciChartVerticalGroup has a method for removing a surface subscription.


Also, notice that it is called internally when the surface is being deleted.

  • You must to post comments

Hello, we are working on a proper fix.
Meanwhile, try using a workaround by adding


when removing a chart.

  • You must to post comments

Wouldn’t that possibly leave groupLeftSize and groupRightSize with wrong values?

I’m using my own makeshift class for now:

class VerticalAlignedGroup extends SciChartVerticalGroup {
  removeSurfaceFromGroup(surface) {
    const idx = this.layoutManagers.findIndex(
      (l) => ===
    if (idx !== -1) {
      const synchronisedLayoutManager = this.layoutManagers[idx];
      this.layoutManagers.splice(idx, 1);
      // might get away with a custom object with mocked functions, as this 
      // won't contribute to actual layout, and should be GC'ed soon
      synchronisedLayoutManager.verticalGroup = new SciChartVerticalGroup();
      this.onLeftSizeChanged(, 0);
      this.onRightSizeChanged(, 0);
  • Jim Risen
    Right, that will not reset the layout sizes on other surfaces of the chart. So you need a way to recalculate them. Your approach looks good.
  • Andrew Burnett-Thompson
    Update for both Jim & Joao. Did we add a function into SciChartVerticalGroup to remove a chart? And if so have we released?
  • João Velasques
    I do notice it is present already in version 3.2.481. Upgrading today!
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.