private void Init() { if (smartChart == null) { smartChart = transform.GetComponent <SmartChart>(); } if (lineColors == null) { lineColors = new Color32[smartChart.chartData.Length]; for (int i = 0; i < smartChart.chartData.Length; i++) { lineColors[i] = smartChart.chartData[i].dataLineColor; } } }