コード例 #1
0
        /// <summary>
        /// Sets the value for the specified column and row.
        /// </summary>
        /// <param name="columnIndex">the index of the column</param>
        /// <param name="rowIndex">the index of the row</param>
        /// <param name="amount"> the new value</param>
        public void SetValue(int columnIndex, int rowIndex, double amount)
        {
            ChartDataColumn column = mColumns[columnIndex];
            ChartDataRow    row    = mRows[rowIndex];

            InnerSetValue(column, row, amount);
        }
コード例 #2
0
        /// <summary>
        /// removes a group from the radar chart
        /// </summary>
        /// <param name="name">the name of the group to remove</param>
        public void RemoveGroup(string name)
        {
            ChartDataRow row = mDataSource.Rows[name];

            RemoveSliderForGroup(name);
            mDataSource.Rows.Remove(row);
        }
コード例 #3
0
        /// <summary>
        /// Sets the value for the specified column and row
        /// </summary>
        /// <param name="ColumnName">the name of the column</param>
        /// <param name="RowName"> the name of the row</param>
        /// <param name="amount"> the new value</param>
        public void SetValue(string ColumnName, string RowName, double amount)
        {
            ChartDataColumn column = mColumns[ColumnName];
            ChartDataRow    row    = mRows[RowName];

            InnerSetValue(column, row, amount);
        }
コード例 #4
0
        /// <summary>
        /// Sets the value for the specified column and row.
        /// </summary>
        /// <param name="ColumnName">the name of the column</param>
        /// <param name="rowIndex">the index of the row</param>
        /// <param name="amount"> the new value</param>
        public void SetValue(String ColumnName, int rowIndex, double amount)
        {
            ChartDataColumn column = mColumns[ColumnName];
            ChartDataRow    row    = mRows[rowIndex];

            InnerSetValue(column, row, amount);
        }
コード例 #5
0
        /// <summary>
        /// Get the value currently for the specified column and row
        /// </summary>
        /// <param name="ColumnName">the name of the column</param>
        /// <param name="rowIndex"> the index of the row</param>
        /// <returns></returns>
        public double GetValue(String ColumnName, int rowIndex)
        {
            ChartDataColumn column = mColumns[ColumnName];
            ChartDataRow    row    = mRows[rowIndex];

            return(InnerGetValue(column, row));
        }
コード例 #6
0
        /// <summary>
        /// Get the value currently for the specified column and row
        /// </summary>
        /// <param name="columnIndex">the index of the column</param>
        /// <param name="rowIndex"> the index of the row</param>
        /// <returns></returns>
        public double GetValue(int columnIndex, int rowIndex)
        {
            ChartDataColumn column = mColumns[columnIndex];
            ChartDataRow    row    = mRows[rowIndex];

            return(InnerGetValue(column, row));
        }
コード例 #7
0
        private void InnerSetValue(ChartDataColumn column, ChartDataRow row, double amount)
        {
            EnsureRawData();
            int columnIndex, rowIndex;

            if (mChartDataToIndex.TryGetValue(column, out columnIndex) == false)
            {
                throw new ChartException("value cannot be set"); // should never happen
            }
            if (mChartDataToIndex.TryGetValue(row, out rowIndex) == false)
            {
                throw new ChartException("value cannot be set"); // should never happen
            }
            mRawData[rowIndex, columnIndex] = amount;

            KeyElement elem = new KeyElement(row, column);
            double     oldValue;

            if (mData.TryGetValue(elem, out oldValue) == false)
            {
                oldValue = 0.0;
            }
            mData[elem] = amount;
            bool minMaxChanged = VerifyMinMaxValue(elem, amount);

            if (mSuspendEvents == false)
            {
                OnDataValueChanged(new DataValueChangedEventArgs(rowIndex, columnIndex, 0.0, amount, minMaxChanged));
            }
            else
            {
                mFireEvent = true;
            }
        }
コード例 #8
0
        /// <summary>
        /// Get the value currently for the specified column and row
        /// </summary>
        /// <param name="ColumnName">the name of the column</param>
        /// <param name="RowName"> the name of the row</param>
        /// <returns></returns>
        public double GetValue(String ColumnName, String RowName)
        {
            ChartDataColumn column = mColumns[ColumnName];
            ChartDataRow    row    = mRows[RowName];

            return(InnerGetValue(column, row));
        }
コード例 #9
0
 /// <summary>
 /// Raw data is prepared and held as long as the structed or order of the table has not changed
 /// </summary>
 private void PrepareRawData()
 {
     mChartDataToIndex.Clear();
     for (int i = 0; i < mColumns.Count; i++)
     {
         ChartDataColumn column = mColumns[i];
         mChartDataToIndex.Add(column, i);
     }
     for (int i = 0; i < mRows.Count; i++)
     {
         ChartDataRow row = mRows[i];
         mChartDataToIndex.Add(row, i);
     }
     mRawData = new double[mRows.Count, mColumns.Count];
     foreach (KeyValuePair <KeyElement, double> pair in mData)
     {
         int columnIndex;
         int rowIndex;
         if (mChartDataToIndex.TryGetValue(pair.Key.Column, out columnIndex) == false)
         {
             continue;
         }
         if (mChartDataToIndex.TryGetValue(pair.Key.Row, out rowIndex) == false)
         {
             continue;
         }
         mRawData[rowIndex, columnIndex] = pair.Value;
     }
     FindMinMaxValue();
 }
コード例 #10
0
        private double InnerGetValue(ChartDataColumn column, ChartDataRow row)
        {
            KeyElement elem = new KeyElement(row, column);
            double     res;

            if (mData.TryGetValue(elem, out res) == false)
            {
                return(0.0);
            }
            return(res);
        }
コード例 #11
0
 public bool IsInRow(ChartDataRow row)
 {
     return(row == Row);
 }
コード例 #12
0
 void Rows_ItemRemoved(ChartDataRow obj)
 {
     ItemRemoved(obj);
 }
コード例 #13
0
 public KeyElement(ChartDataRow row, ChartDataColumn column) : this()
 {
     Row    = row;
     Column = column;
 }