Example #1
0
 private static void RenderNodes(CommonElements common, ChartGraphics graph, ChartArea area, RectangleF plottingAreaRelative)
 {
     if (!(plottingAreaRelative.Width < 0.0) && !(plottingAreaRelative.Height < 0.0))
     {
         CategoryNodeCollection categoryNodes = area.CategoryNodes;
         if (categoryNodes != null)
         {
             List <Series> chartAreaSeries = SunburstChart.GetChartAreaSeries(area.Name, common.DataManager.Series);
             categoryNodes.Calculate(chartAreaSeries);
             double totalAbsoluetValue = categoryNodes.GetTotalAbsoluetValue();
             SunburstChart.SortSeriesByAbsoluteValue(chartAreaSeries, categoryNodes);
             int        num          = 2 * (categoryNodes.GetDepth() + 1);
             float      num2         = plottingAreaRelative.Width / (float)num;
             float      num3         = plottingAreaRelative.Height / (float)num;
             float      num4         = (float)(num2 * 4.0);
             float      num5         = (float)(num3 * 4.0);
             RectangleF rectRelative = new RectangleF((float)(plottingAreaRelative.X + plottingAreaRelative.Width / 2.0 - num4 / 2.0), (float)(plottingAreaRelative.Y + plottingAreaRelative.Height / 2.0 - num5 / 2.0), num4, num5);
             SunburstChart.RenderNodes(common, graph, categoryNodes, rectRelative, totalAbsoluetValue, num2, num3, chartAreaSeries);
         }
     }
 }