SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


How can i change default chart title style? like margin,font size etc

  • You must to post comments

Hi Raghupathy,

Thanks for your inquiry. You can alter the Chart Title FontSize, FontWeight, FontFamily and Foreground using the following code:

<!-- Define styles for the SciChartSurface -->
<Style x:Key="SciChartSurfaceStyle" TargetType="s:SciChartSurface">
    <Setter Property="Foreground" Value="DarkOrchid"/>
    <Setter Property="FontSize" Value="20"/>
    <Setter Property="FontFamily" Value="Arial Black"/>
    <Setter Property="FontWeight" Value="Bold"/>

Note that the FontFamily will apply to axis as well. To reverse it for axis, you need to apply this style

    <!-- Define styles for the X and Y Axes -->
    <Style x:Key="AxisStyle" TargetType="s:AxisBase">
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontFamily" Value="Segoe UI"/>

It’s not possible currently to set the Margin, Alignment of the Chart Title. We have logged a feature request to improve this, allowing Chart Title to be templated in a similar way to our Axis Titles in the Xaml Styling Example.

Hope this helps!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.