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

0 votes
3k views

I found how to change the axis tick label FontWeight in the XAML code by creating a Style, but is there a way to change the axis tick label FontWeight property in the code behind (MainWindow.xaml.cs)?

The reason I want to be able to do this is that I prefer to create the axis in code. Here is how I set up the XAxis in code:

        double xDelta = 10.0;
        sciChart.XAxis = new NumericAxis();
        sciChart.XAxis.AxisAlignment = AxisAlignment.Bottom;
        sciChart.XAxis.DrawMajorBands = true;
        sciChart.XAxis.FlipCoordinates = false;
        sciChart.XAxis.GrowBy = new DoubleRange( -xDelta, xDelta );
        sciChart.XAxis.TextFormatting = "#0";
        sciChart.XAxis.VisibleRange = new DoubleRange( m_MinX - xDelta, m_MaxX + xDelta );
        sciChart.XAxis.VisibleRangeLimit = new DoubleRange( m_MinX - xDelta, m_MaxX + xDelta );
        sciChart.XAxis.AxisTitle = "X-Axis";

It would be nice to be able to set the Font and FontWeight in the code as well.

Thanks,
Dave

  • Dave Leach asked 4 years ago
  • last active 4 years ago
Showing 1 result
This template supports the sidebar's widgets. Add one or use Full Width layout.
SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+