MindFusion.Charting Programmer's Guide

Chart.EmptyBrush Property

See Also
 





Gets a neutral 'unset' brush to reset a Brush property when themes are used.

Namespace: MindFusion.Charting
Assembly: MindFusion.Charting

 Syntax

C#  Copy Code

public static Brush EmptyBrush { get; }

Visual Basic  Copy Code

Public Shared ReadOnly Property EmptyBrush As Brush

 Property Value

An object of the MindFusion.Drawing.Brush class.

 Remarks

The LabelBrush, GridBrush, PlotAreaBrush and AltGridBrush properties can be specified with an EmptyBrush.

 Example

C#  Copy Code

private void changeTheme(Theme newTheme)
        {
           clearChartSettings();
           _lineChart.Theme = newTheme
            _lineChart.DrawChart();
        }

        private void clearChartSettings()
        {

            _lineChart.PlotAreaOutlinePen = Chart.EmptyPen;
            _lineChart.PlotAreaBrush = Chart.EmptyBrush;
        
            _lineChart.GridPen = Chart.EmptyPen;           
            _lineChart.GridBrush = Chart.EmptyBrush;
            _lineChart.AltGridBrush = Chart.EmptyBrush;

            _lineChart.ChartPens.Clear();        
        }

 See Also