How can i change default chart title style? like margin,font size etc
- Raghupathy asked 9 years ago
- You must login 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"/>
</Style>
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!
- Guest answered 9 years ago
- last edited 9 years ago
-
Thank you
- You must login to post comments
Please login first to submit.