/// <summary> /// Drills down the selected node. /// </summary> /// <param name="drilledNode">The drilled node.</param> public void DrillDownData(TreemapNode drilledNode) { IsInitialDataLoading = true; OnPropertyChanged("IsInitialDataLoading"); if (drilledNode.DataContext is SectorViewModel) { this.IsInitialDataLoading = false; OnPropertyChanged("IsInitialDataLoading"); //_treemap.ItemsSourceRoot = drilledNode.DataContext; } else if (drilledNode.DataContext is IndustryViewModel) { _companies = null; OnPropertyChanged("Companies"); _selectedIndustry = ((IndustryViewModel)drilledNode.DataContext).Description; OnPropertyChanged("SelectedIndustry"); _drilledDataLoading = true; OnPropertyChanged("IsDrilledDataLoad"); //TODO-MT find replacement //_stockService.RefreshCompanySummary(((IndustryViewModel)drilledNode.DataContext).Index, // OnRefreshCompaniesSummary); } }
public override void MapValue(TreemapNode node) { if (node.DataContext == null) { return; } if (node.DataContext is IndustryViewModel) { double value = GetMappedValue(node.DataContext); double relativeValue = value > 0 ? GetRelativeValue(value, 0, this.DataMaximum) : GetRelativeValue(value, this.DataMinimum, 0); Color color = value > 0 ? GetColor(relativeValue, this.MiddleColor, this.HighColor) : GetColor(relativeValue, this.LowColor, this.MiddleColor); node.Fill = new SolidColorBrush(color); } }
public override void ResetValue(TreemapNode node) { }