Hi,
I’m actually working on new wpf application using Scichart and I’m wondering how to plot only XAxis and YAxis without labels and without gridlines.
Here is my code, I cannot not figure out what is missing to do that:
<s:SciChartSurface.YAxis>
<s:NumericAxis VisibleRange="{Binding ...}"
MajorGridLineStyle="{Binding ...}"
TickLabelStyle="{Binding ...}"
MajorDelta="{Binding ...}"
MinorDelta="1"
AutoTicks="False"
AxisAlignment="Left"
DrawMajorGridLines="false
DrawMinorGridLines="false"
DrawMajorBands="false"
DrawMajorTicks="false"
DrawMinorTicks="false"
DrawLabels="false"
</s:SciChartSurface.YAxis>
<Style x:Key="NoGraphGridLineStyle" TargetType="s:NumericAxis">
<Setter Property="Visibility" Value="Collapsed" />
</Style>
- Hasdrubal Barca asked 5 years ago
- last edited 5 years ago
-
Unfortunately, it doesn’t help, I have changed the style applied to the style property of NumericAxis but it doesn’t help also, steel have no axes drawn.
- You must login to post comments
Hi there ,
Setting properties on Axis:
DrawMajorGridLines="false"
DrawMinorGridLines="false"
DrawMajorBands="false"
DrawMajorTicks="false"
DrawMinorTicks="false"
DrawLabels="false"
is exactly how to disable gridlines and labels. We demonstrate this in our example ‘Modify Axis Behaviour’
https://www.scichart.com/example/wpf-chart-example-modify-axis-properties/
Let me know if this helps
Best regards,
Andrew
- Andrew Burnett-Thompson answered 5 years ago
- You must login to post comments
Play around with something like the following… I use a separate SciChart.xaml file to store all my ChartSurface styles and reference it from my app.xaml as a merged resource. Then you can just reference it as a style (I’m sure you already understand that part).
<s:SciChartSurface.XAxis>
<s:NumericAxis x:Name="BottomAxis" AutoRange="{Binding Path=XAutoRange}"
FlipCoordinates="False"
GrowBy="0.05, 0.05"
ScientificNotation="None"
s:CursorModifier.AxisLabelContainerStyle="{StaticResource CursorModAxisLabelStyle}"
s:CursorModifier.AxisLabelTemplate="{StaticResource MyCursorXAxisLabelTemplate}"
Style="{DynamicResource ResourceKey=MyXaxisStyle}" />
</s:SciChartSurface.XAxis>
<Style x:Key="MyXaxisStyle" TargetType="s:AxisBase">
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="TickTextBrush" Value="Gray"/>
<Setter Property="DrawMajorBands" Value="False"/>
<Setter Property="DrawMajorGridLines" Value="False" />
<Setter Property="DrawMinorGridLines" Value="False" />
<Setter Property="AxisBandsFill" Value="White"/>
<Setter Property="MinorTickLineStyle">
<Setter.Value>
<Style TargetType="Line">
<Setter Property="Stroke" Value="Gray"/>
<Setter Property="StrokeThickness" Value="1"/>
<Setter Property="X2" Value="4"/>
<Setter Property="Y2" Value="4"/>
</Style>
</Setter.Value>
</Setter>
</Style>
- Chris Kirkman answered 5 years ago
- You must login to post comments
Please login first to submit.