Pre loader

Why in MountainRenderable I set XRange(0, 9), but chart always show gap?

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

1
1

Hi there,
Here is my xaml setting :

 <s:SciStockChart.XAxisStyle>
     <Style TargetType="s:CategoryDateTimeAxis">
         <Setter Property="VisibleRange" Value="{Binding ParentViewModel.XRange}" />
         <Setter Property="AutoRange" Value="{Binding ParentViewModel.AutoRangeX}"/>
     </Style>
 </s:SciStockChart.XAxisStyle>

And I also set, XRange = new IndexRange(0, 9), AutoRangeX = AutoRange.Never, but the chart show like image, always has gap there.

What should I do?

Version
7.0.1.27055
Images
  • CHIA CHUN TANG
    I follow the suggestion, set GrowBy to “0.0, 0.0”, but the result is same, do I missing something?
  • You must to post comments
1
0

Hi Chia Chun Tang,

Thanks for your question.
SciStockChart is a preconfigured SciChartSurface version having some properties on its elements set to default values. Please take a look at the corresponding article for more info:
https://www.scichart.com/documentation/win/current/webframe.html#SciStockChart%20-%20Simplified%20Financial%20Charts.html

The spaces you see on the sides are controlled by the Axis.GrowBy property:
https://www.scichart.com/documentation/win/current/webframe.html#SciChart.Charting~SciChart.Charting.Visuals.Axes.AxisCore~GrowBy.html

To get rid of these spaces you can override the default value by setting the GrowBy property for the XAxis to “0.0, 0.0”.

With best regards,

Lex S., MSEE
SciChart Technical Support Engineer

  • You must to post comments
1
0

Hi Lex,
I follow the suggestion, set GrowBy to “0.0, 0.0”, and update my xaml code

<s:SciStockChart.XAxisStyle>
    <Style TargetType="s:CategoryDateTimeAxis">
        <Setter Property="FontSize" Value="{DynamicResource GlobalFontSize10}"/>
        <Setter Property="DrawLabels" Value="True" />
        <Setter Property="DrawMinorTicks" Value="False" />
        <Setter Property="DrawMajorTicks" Value="False" />
        <Setter Property="DrawMajorBands" Value="False" />
        <Setter Property="DrawMajorGridLines" Value="False" />
        <Setter Property="DrawMinorGridLines" Value="False" />
        <Setter Property="TextFormatting" Value="{Binding XAxisTextFormatting}" />
        <Setter Property="VisibleRange" Value="{Binding ParentViewModel.XRange, Mode=TwoWay}" />
        <Setter Property="VisibleRangeLimit" Value="{Binding ParentViewModel.XRangeLimit}"/>
        <Setter Property="AutoRange" Value="{Binding ParentViewModel.AutoRangeX}"/>
        <Setter Property="GrowBy" Value="0.0, 0.0"/>
    </Style>
</s:SciStockChart.XAxisStyle>

But the result is same, do I missing something?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.