///<summary> /// Initialize charts with test data ///</summary> void Start() { dataSet = new ChartData1D(); dataSet[0] = 50; dataSet[1] = 30; dataSet[2] = 70; dataSet[3] = 10; dataSet[4] = 90; pie.SetValues(ref dataSet); doughnut.SetValues(ref dataSet); halfDoughnut.SetValues(ref dataSet); dataSet2 = new ChartData2D(); dataSet2[0, 0] = -50; dataSet2[0, 1] = -30; dataSet2[0, 2] = -70; dataSet2[0, 3] = 10; dataSet2[0, 4] = -90; dataSet2[1, 0] = 40; dataSet2[1, 1] = -25; dataSet2[1, 2] = -53; dataSet2[1, 3] = 12; dataSet2[1, 4] = 37; dataSet2[2, 0] = 68; dataSet2[2, 1] = -91; dataSet2[2, 2] = 30; dataSet2[2, 3] = 44; dataSet2[2, 4] = 63; bar.SetValues(ref dataSet2); stackedBar.SetValues(ref dataSet2); line.SetValues(ref dataSet2); curve.SetValues(ref dataSet2); }
///<summary> /// Use this for initialization ///</summary> void Start() { bar2d.SetColor(0, Color.green); bar2d.SetColor(1, Color.blue); bar2d.SetColor(2, Color.red); bar2d.SetColor(3, Color.yellow); bar2d.SetColor(4, Color.cyan); curve2d.SetColor(0, Color.green); curve2d.SetColor(1, Color.blue); curve2d.SetColor(2, Color.red); curve2d.SetColor(3, Color.yellow); curve2d.SetColor(4, Color.cyan); dataSet = new ChartData2D(); dataSet[0, 0] = 9f; dataSet[0, 1] = 15.23f; dataSet[0, 2] = 3.33f; dataSet[1, 0] = 2.23f; dataSet[1, 1] = 5.23f; dataSet[1, 2] = 9.13f; dataSet[2, 0] = 7.23f; dataSet[2, 1] = 1.23f; dataSet[2, 2] = 5.23f; dataSet[3, 0] = 7.23f / 3; dataSet[3, 1] = 1.23f / 3; dataSet[3, 2] = 5.23f / 3; dataSet[4, 0] = 2 + 7.23f; dataSet[4, 1] = 2 + 1.23f; dataSet[4, 2] = 2 + 5.23f; bar2d.SetValues(ref dataSet); bar3d.SetValues(ref dataSet); dataSet2 = new ChartData1D(); dataSet2[0] = 13f; dataSet2[1] = 13f; dataSet2[2] = 5.1f; dataSet2[3] = 8.1f; dataSet2[4] = 12.1f; pie2d.SetValues(ref dataSet2); pie3d.SetValues(ref dataSet2); line2d.SetValues(ref dataSet); line3d.SetValues(ref dataSet); curve2d.SetValues(ref dataSet); curve3d.SetValues(ref dataSet); }
///<summary> /// Initialize demo ///</summary> void Start() { dataSet = new ChartData1D(); InitTimer(); pie_canvas_1.SetValues(ref dataSet); pie_canvas_2.SetValues(ref dataSet); pie_canvas_3.SetValues(ref dataSet); pie2d_1.SetValues(ref dataSet); pie2d_2.SetValues(ref dataSet); pie2d_3.SetValues(ref dataSet); pie3d_1.SetValues(ref dataSet); pie3d_2.SetValues(ref dataSet); pie3d_3.SetValues(ref dataSet); }