Example #1
0
		///<summary>
		/// Set data set using reference
		///</summary>
		public void SetValues(ref ChartData2D values)
		{
			if (this.values != null)
			{
				this.values.onDataChangeDelegate -= OnDataChangeDelegate;
			}
			this.values = values;
			this.values.onDataChangeDelegate += OnDataChangeDelegate;

			Dirty = true;
		}
Example #2
0
		///<summary>
		/// Enable the chart and create test data to give visuals in editor
		///</summary>
		void OnEnable()
		{
			//only in editor
			if (!Application.isPlaying)
			{
				ChartData2D testValues = new ChartData2D();
				testValues[0, 0] = 2;
				testValues[0, 1] = 1;
				testValues[0, 2] = 3;
				testValues[1, 0] = 1;
				testValues[1, 1] = 5;
				testValues[1, 2] = 1;
				SetValues(ref testValues);
			}
			Dirty = true;
		}
Example #3
0
        ///<summary>
        /// Enable the chart and create test data to give visuals in editor
        ///</summary>
        protected override void OnEnable()
        {
            base.OnEnable();

            //only in editor
            if (!Application.isPlaying)
            {
                ChartData2D testValues = new ChartData2D();
                testValues[0, 0] = 2;
                testValues[0, 1] = 1;
                testValues[0, 2] = 3;
                testValues[1, 0] = 1;
                testValues[1, 1] = 5;
                testValues[1, 2] = 1;
                SetValues(ref testValues);
            }
            Dirty = true;
            OnEnabled(true);
        }