Pre loader

Changing font size for axis tick labels

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

0
0

Update: Please remove my previous question, I did not input the code correctly

I have a collection of line charts that use FastLineRenderableSeries, and they all share the same View.xaml. I’m trying to change the font size for the Y-axis tick labels in the view but for some reason it gets ignored.

This is the view for the container for all the charts:

<UserControl x:Class="....SciCharts.MainView"
<DockPanel >
    <Grid>
            <ItemsControl ItemsSource="{Binding ComponentCharts}" Grid.IsSharedSizeScope="True">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <UniformGrid Rows="2"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <ContentControl Content="{Binding}"/>
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
    </Grid>
</DockPanel>

And this is the view for each individual line chart:

<UserControl x:Class="SciCharts.LineChartView"
<UserControl.Resources>
    <converters:BooleanToCollapsedVisibilityConverter x:Key="VisibilityConverter"/>
    <converters:ReverseBooleanToCollapsedConverter x:Key="ReverseVisibilityConverter"/>
    <Style x:Key="AxisLabelStyle" TargetType="s:DefaultTickLabel">
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="FontSize" Value="2.0"/>
        <Setter Property="HorizontalAnchorPoint" Value="Left"/>
    </Style>
</UserControl.Resources>
<DockPanel>
    <s:SciChartSurface RenderableSeries="{Binding LineChart.SeriesCollection}">
        <s:SciChartSurface.XAxes>
            <s:CategoryNumericAxis AxisTitle="Time" DrawMajorBands="False" AutoRange="Always" DrawLabels="True" />
        </s:SciChartSurface.XAxes>
        <s:SciChartSurface.YAxes>
            <s:NumericAxis DrawMajorBands="False" AxisAlignment="Left" AxisTitle="Rate" AutoTicks="True" AutoRange="Always" TickLabelStyle="{StaticResource AxisLabelStyle}"/>
        </s:SciChartSurface.YAxes>
    </s:SciChartSurface>
</DockPanel>

I’m able to change the color and the anchor point using the code above, but the font size is ignored completely. Tried setting it under NumericAxis but same result. Please let me know what can I do to achieve this.
Thanks,

Version
v4.2.3.10185
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.