protected override void SetValueInternal(string category, string group, double amount)
 {
     try
     {
         mDataSource.SetValue(category, group, amount);
     }
     catch (ChartException e)
     {
         Debug.LogWarning(e.Message);
     }
 }
 protected override void SetValueInternal(string column, string row, double value)
 {
     try
     {
         mDataSource.SetValue(column, "Pie", value);
     }
     catch (ChartException e)
     {
         Debug.LogWarning(e.Message);
     }
 }
Example #3
0
 protected override void SetValueInternal(string column, string row, double value)
 {
     try
     {
         if (mDataSource.Rows.Count == 0)
         {
             mDataSource.Rows.Add(new DataSource.ChartDataRow("Pyramid"));
         }
         mDataSource.SetValue(column, "Pyramid", value);
     }
     catch (ChartException e)
     {
         Debug.LogWarning(e.Message);
     }
 }
Example #4
0
        public void OnAfterDeserialize()
        {
            mDataSource = new ChartSparseDataSource();
            mDataSource.SuspendEvents = true;
            mDataSource.Clear();
            if (mCategories == null)
            {
                mCategories = new CategoryData[0];
            }
            if (mGroups == null)
            {
                mGroups = new string[0];
            }
            if (mData == null)
            {
                mData = new DataEntry[0];
            }

            for (int i = 0; i < mCategories.Length; i++)
            {
                AddCategory(mCategories[i].Name, mCategories[i].Materials, mCategories[i].Title, mCategories[i].Text, mCategories[i].Image, mCategories[i].Alpha, mCategories[i].HeightRatio, mCategories[i].LeftSlope, mCategories[i].RightSlope, mCategories[i].PositionBlend, mCategories[i].Scale, mCategories[i].ShiftX, mCategories[i].ShiftY);
            }
            //            for (int i = 0; i < mGroups.Length; i++)
            //                AddGroup(mGroups[i]);
            if (mDataSource.Rows.Count == 0)
            {
                mDataSource.Rows.Add(new DataSource.ChartDataRow("Pyramid"));
            }
            for (int i = 0; i < mData.Length; i++)
            {
                try
                {
                    DataEntry entry = mData[i];
                    mDataSource.SetValue(entry.ColumnName, entry.GroupName, entry.Amount);
                }
                catch (Exception)
                {
                }
            }

            mDataSource.SuspendEvents = false;
        }
        public void OnAfterDeserialize()
        {
            mDataSource = new ChartSparseDataSource();
            mDataSource.SuspendEvents = true;
            mDataSource.Clear();
            if (mCategories == null)
            {
                mCategories = new CategoryData[0];
            }
            if (mGroups == null)
            {
                mGroups = new string[0];
            }
            if (mData == null)
            {
                mData = new DataEntry[0];
            }
            for (int i = 0; i < mCategories.Length; i++)
            {
                AddCategory(mCategories[i].Name, mCategories[i]);
            }
            for (int i = 0; i < mGroups.Length; i++)
            {
                AddGroup(mGroups[i]);
            }

            for (int i = 0; i < mData.Length; i++)
            {
                try
                {
                    DataEntry entry = mData[i];
                    mDataSource.SetValue(entry.ColumnName, entry.GroupName, entry.Amount);
                }
                catch (Exception)
                {
                }
            }

            mDataSource.SuspendEvents = false;
        }
Example #6
0
        void IInternalPieData.OnAfterDeserialize()
        {
            mDataSource = new ChartSparseDataSource();
            mDataSource.SuspendEvents = true;
            mDataSource.Clear();
            if (mCategories == null)
            {
                mCategories = new CategoryData[0];
            }
            if (mGroups == null)
            {
                mGroups = new string[0];
            }
            if (mData == null)
            {
                mData = new DataEntry[0];
            }

            for (int i = 0; i < mCategories.Length; i++)
            {
                AddCategory(mCategories[i].Name, mCategories[i].Materials, mCategories[i].RadiusScale, mCategories[i].DepthScale, mCategories[i].DepthOffset);
            }
            //            for (int i = 0; i < mGroups.Length; i++)
            //                AddGroup(mGroups[i]);
            mDataSource.Rows.Add(new DataSource.ChartDataRow("Pie"));
            for (int i = 0; i < mData.Length; i++)
            {
                try
                {
                    DataEntry entry = mData[i];
                    mDataSource.SetValue(entry.ColumnName, entry.GroupName, entry.Amount);
                }
                catch (Exception)
                {
                }
            }

            mDataSource.SuspendEvents = false;
        }