/// <summary>
        /// Initializes the treemap control.
        /// </summary>
        /// <param name="treemap">The XamTreemap.</param>
        public void InitializeTreemap(XamTreemap treemap)
        {
            if (_treemap != treemap)
            {
                _treemap = treemap;
                SetItemsSourceRoot();
            }

            //Trigger a refresh on the color mappers.
            TreemapFilter = _treemapFilter;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="HeatmapViewModel"/> class.
        /// </summary>
        public HeatmapViewModel()
        {
            _treemapFilter  = new TreemapFilter();
            _treemapFilters = new List <TreemapFilter>();

            _itemsSource = new[] { this };

            _drilledNodes = new Stack <object>();
            _drilledNodes.Push(this);

            InitializeData();
        }
        /// <summary>
        /// Adds a new TreemapFilter.
        /// </summary>
        /// <param name="description"></param>
        /// /// <param name="valuePath"></param>
        /// <param name="minimum"></param>
        /// <param name="maximum"></param>
        public void AddTreemapFilter
            (string description, string valuePath, double minimum, double maximum)
        {
            _treemapFilters.Add(new TreemapFilter()
            {
                Description = description,
                ValuePath   = valuePath,
                Minimum     = minimum,
                Maximum     = maximum,
            });

            if (_treemapFilter.Description == null)
            {
                _treemapFilter = _treemapFilters[0];
                RaisePropertyChanged("TreemapFilter");
            }

            RaisePropertyChanged("TreemapFilters");
        }