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,
- Fabian Mendez asked 7 years ago
- You must login to post comments
Please login first to submit.