Exemple #1
0
        public BasicOrganizationalChart(ChartView BaseChart)
        {
            organizationalChart = new OrgSeries();
            //organizationalChart.FillSampleValues();
            BaseChart.Chart.Series.Add(organizationalChart);

            BaseChart.Chart.Header.Transparency = 100;
            BaseChart.Chart.Header.Font.Size    = 120;

            organizationalChart.Add(-1, 0, "Mike Young");
            organizationalChart.Add(0, 1, "Jay");
            organizationalChart.Add(0, 2, "Mark");
            organizationalChart.Add(1, 3, "Gold");
            organizationalChart.Add(1, 4, "Rick");

            organizationalChart.ItemSpacing = new Spacing()
            {
                Vertical = 70, Horizontal = 30
            };
            organizationalChart.Pen.Width = 3;

            NodeTemplates();
        }
        public CustomOrgChart(ChartView BaseChart)
        {
            organizationalChart = new OrgSeries();
            //organizationalChart.FillSampleValues();
            BaseChart.Chart.Series.Add(organizationalChart);

            BaseChart.HorizontalOptions         = LayoutOptions.FillAndExpand;
            BaseChart.VerticalOptions           = LayoutOptions.FillAndExpand;
            BaseChart.Chart.Header.Transparency = 100;
            BaseChart.Chart.Header.Font.Size    = 60;
            BaseChart.Chart.Panning.Active      = true;
            BaseChart.Chart.Panning.Allow       = ScrollModes.Both;
            BaseChart.Chart.Zoom.Active         = true;
            BaseChart.Chart.Zoom.Allow          = true;
            BaseChart.Chart.Axes.Left.SetMinMax(BaseChart.Chart.Axes.Left.MinYValue - 1, BaseChart.Chart.Axes.Left.MaxYValue + 1);
            BaseChart.Chart.Axes.Bottom.SetMinMax(BaseChart.Chart.Axes.Bottom.MinXValue - 1, BaseChart.Chart.Axes.Bottom.MaxXValue + 1);

            organizationalChart.Add(-1, 0, "Mike Young");
            organizationalChart.Add(0, 1, "Jay");
            organizationalChart.Add(1, 2, "Molt");
            organizationalChart.Add(2, 3, "Ferran");
            organizationalChart.Add(0, 4, "Mark");
            organizationalChart.Add(3, 5, "Gold");
            organizationalChart.Add(3, 6, "Rick");
            organizationalChart.Add(0, 7, "Chris");
            organizationalChart.Add(4, 8, "Gary");
            organizationalChart.Add(5, 9, "Michael");
            organizationalChart.Add(5, 10, "Marta");
            organizationalChart.Add(6, 11, "Ryn");
            organizationalChart.Add(7, 12, "Xayah");
            organizationalChart.Add(7, 13, "Jonn");

            organizationalChart.ItemSpacing = new Spacing()
            {
                Vertical = 70, Horizontal = 30
            };
            organizationalChart.Pen.Width = 5;

            NodeTemplates();
        }