// HACK: This should not be here and solved differently, because it messes up the internal state
        public virtual void SetDimensionAtIndex(int dataIndex, int dimensionIndex)
        {
            _dataDimensionsIndices[dimensionIndex] = dataIndex;
            var e = new DataPresenterEventArgs();

            DataUpdated?.Invoke(this, e);
        }
 protected virtual void Presenter_DataUpdated(object sender, DataPresenterEventArgs e)
 {
     // Only rebuild when not called from editor
     if (_fromEditor)
     {
         return;
     }
     _rebuildState |= RebuildState.Visualization;
     Rebuild();
 }
        /// <summary>
        /// Set the minimum and maximum selected indices of the DataSet this DataPresneter represents.
        /// Note: If minimum and maximum are switched if one is larger/lower than the other.
        /// </summary>
        /// <param name="min">The new minimum selected index.</param>
        /// <param name="max">The new maximum selected index.</param>
        public virtual void SetSelectedItemIndices(int min, int max)
        {
            int numOfItems = _dataProvider.Data.NumOfItems;

            min = Mathf.Clamp(min, 0, numOfItems);
            max = Mathf.Clamp(max, 0, numOfItems);
            if (min > max)
            {
                int t = min;
                min = max;
                max = t;
            }
            if (min == _selectedMinItem && max == _selectedMaxItem)
            {
                return;
            }

            var e = new DataPresenterEventArgs(_selectedMinItem, _selectedMaxItem, min, max);

            _selectedMinItem = min;
            _selectedMaxItem = max;
            DataUpdated?.Invoke(this, e);
        }