SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

Hi,

I am trying the candlestick chart and I want only 1 bar of space at the end of the chart. For this reason, I limit the chart with the xAxis.setVisibleRangeLimit(0, dataSize + 1) method. By adding +1 to the data size, I get the space at the end of the chart. However, when the chart ends, if I continue to swipe left chart is stretching. I want it to stop when chart comes to end, not stretching. I tried the ZoomPanModifier.setClipModeX (ClipMode.ClipAtExtents) method, but this causes the space at the end of the chart to disappear. How do I prevent the chart from stretching by preserving the trailing gap?

Tnx.

Version
3.1
Images
  • You must to post comments
0
0

Hi Emre,

I’m not sure, because you didn’t provide code which reproduces this issue, but I think this could happen because by default ZoomPanModifier clips to MaximumRange and when you set VisibleRangeLimit sometimes it may cause this stretching effect. Can you try to set ClipModeTargetX to VisibleRangeLimit?

  sciChartBuilder.newModifierGroup()
            .withZoomPanModifier()
            .withClipModexTargetX(ClipModeTarget.VisibleRangeLimit)
            .build();

Hope this will help you!

Best regards,
Yura

  • You must to post comments
0
0

I tried .withClipModexTargetX(ClipModeTarget.VisibleRangeLimit) but it’s not worked.
I added screen recording to one drive to show the problem: https://1drv.ms/v/s!Aq2z0EdIrh2sgcR_B-jqEJTDsVYkXg?e=6x40XB

  • Yura Khariton
    Well the problem with stretching was clear for me from screenshots. If setting ClipModeTargetX doesn’t help, then please can you provide a code which reproduces it?
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.