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?
- CHIA CHUN TANG asked 5 months ago
- last edited 5 months ago
-
I follow the suggestion, set GrowBy to “0.0, 0.0”, but the result is same, do I missing something?
- You must login to post comments
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
- Lex answered 5 months ago
- You must login to post comments
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?
- CHIA CHUN TANG answered 5 months ago
- last edited 5 months ago
- You must login to post comments
Please login first to submit.