Changing the font size does not work

I have the latest available version of all packages. Below I present the exact number for the Charts:

Syncfusion.SfChart.WPF 19.3.0.56

I have added a chart from XAML (with line descriptions and legend) and I add all series from the code level (

Binded in the MVVM model)


I am trying to change the font size from the code level and in XAML for the legend or axis descriptions but it is completely unresponsive.

It looks as if the function exists but does not perform any task.


4 Replies

GM Gayathri Manickam Syncfusion Team December 7, 2021 12:04 PM UTC

Hi Bartlomiej, 
 
We analyzed your query, but we couldn’t reproduce the reported issue at our end. We have checked FontSize for the chart header, axis header, legend header, LabelSyle for the axis, axis labels and it was working fine at our end. Could you please revert us by modifying the provided sample based on your application along with replication procedure which will be helpful for us to provide you better solution at the earliest.  
 
 
Thanks, 
Gayathri M. 



BA Bartlomiej replied to Gayathri Manickam December 7, 2021 02:43 PM UTC

The included code works but only for the Header section. 

And I need to change the font for the text in Legend and the values on the axes. 

Additionally, I note that all Series are added from code

I try to assign a font size in various ways and it is unresponsive


<syncfusion:SfChart.Resources>

    <DataTemplate x:Key="itemTemplate">

         <Grid>

            <TextBlock HorizontalAlignment="Center" FontSize="25" Foreground="Black" Text="{Binding Label}">

            </TextBlock>

        </Grid>

    </DataTemplate>

</syncfusion:SfChart.Resources>


<syncfusion:SfChart.Legend>

    <syncfusion:ChartLegend ItemsPanel="{StaticResource itemTemplate}" FontSize="25"/>

</syncfusion:SfChart.Legend>



BA Bartlomiej replied to Gayathri Manickam December 7, 2021 03:58 PM UTC

I was able to solve it, but only by creating a new Style in Resources. Built-in functions for Legend or Labels on the axis like "FontSize ="18"" don't work - nothing happens.



GM Gayathri Manickam Syncfusion Team December 8, 2021 02:57 PM UTC

Hi Bartlomiej, 
  
We analyzed your query and still couldn’t reproduce the reported issue. We have prepared sample containing two charts, one chart updated with styles for the Legend and Axis labels and another one directly set the FontSize property to the Legend and Axis labels. If still issue not resolved at your end, please revert us by modifying the sample which will be helpful for us to analyze and provide you a better solution at earliest. 
 
 
Regards,   
Gayathri M 


Loader.
Up arrow icon