public static void SetChartLighting(LightStyle style, ref Chart[] charts) { if (charts == null) return; foreach (Chart chart in charts) chart.ChartAreas[0].Area3DStyle.LightStyle = style; }