Esempio n. 1
0
        void Start()
        {
            if (pieChartMeshController == null)
            {
                pieChartMeshController = gameObject.AddComponent <PieChartMeshController>();
            }
            pieChartMeshController.parent = parentTransform.gameObject;

            //pieChartMeshController.onPointerEnter.AddListener(onPointerClick);

            if (pieChartMeshController == null)
            {
                Debug.LogError("Drag The PieChartMeshController to Scene as PieChartMeshController is null.");
                return;
            }
            if (mainMaterial != null)
            {
                pieChartMeshController.SetMatrialOfPie(mainMaterial);
            }

            pieChartMeshController.SetData(Data);
            pieChartMeshController.SetColor(customColors);
            pieChartMeshController.SetDescription(dataDescription.ToArray());
            pieChartMeshController.GenerateChart(segments, animationType, justCreateThePie);
        }
Esempio n. 2
0
        public void Init(float[] data)
        {
            PieContorller  = GetComponent <PieChartMeshController>();
            mSlices        = 100;
            mRotationAngle = 90f;
            mRadius        = 0.3f;

            mData = data;
        }