void Awake() { ChartLine c = gameObject.GetComponent<ChartLine>(); // c.sortingOrder = 103; chart = c.UIChartLine; chart.chartType = UIChartLine.ChartType.LINE; chart.Title = "Total Water Loss"; //TODO: localization chart.UnitX = "Year"; //TODO: localization chart.UnitY = "L"; //TODO: localization chart.Width = 4; chart.Height = 2; chart.Thickness = 0.015f; chart.PointSize = 0.03f; chart.SetSize(1, 5); for (int j = 0; j < 5; j++) { float rnd = Random.Range(50.0f, 400.0f); chart.SetValue(0, j, rnd); } for (int i = 0; i < 5; i++) { chart.SetLabelX(i, string.Format("{0}", 2010 + i)); } chart.SetColor(0, Color.blue); chart.Create(); time = System.Environment.TickCount; }