protected override void SetupChart()
        {
            var treeMap = this.Chart as C1.Win.Chart.TreeMap;

            treeMap.Header.Content    = "Sales Distribution by Product";
            treeMap.Header.Style.Font = StyleInfo.ChartHeaderFont;

            treeMap.Binding            = "CurrentSales";
            treeMap.BindingName        = "Type";
            treeMap.ChildItemsPath     = "Items";
            treeMap.DataSource         = HierarchicalDataSource.GetTreeMapData();
            treeMap.MaxDepth           = 2;
            treeMap.DataLabel.Content  = "{name}";
            treeMap.DataLabel.Position = LabelPosition.Center;
        }
示例#2
0
        protected override void SetupChart()
        {
            var treeMap = this.Chart as C1.Win.Chart.TreeMap;

            treeMap.Header.Content    = "Sales Distribution by Product";
            treeMap.Header.Style.Font = StyleInfo.ChartHeaderFont;

            treeMap.DataSource             = HierarchicalDataSource.GetTreeMapData();
            treeMap.Binding                = "CurrentSales";
            treeMap.BindingName            = "Type";
            treeMap.ChildItemsPath         = "Items";
            treeMap.MaxDepth               = 2;
            treeMap.DataLabel.Style.Stroke = Brushes.White;
            treeMap.ToolTip.Content        = "Current Sales: {CurrentSales:C0}\nPrevious Sales: {PreviousSales:C0}";
            treeMap.NodeRendering         += _treeMap_NodeRendering;
        }