コード例 #1
0
        public void Scripting_Draw_PieChart()
        {
            var    pagesize = new VA.Drawing.Size(4, 4);
            var    center   = new VA.Drawing.Point(2, 2);
            double radius   = 1.0;

            var chart = new VisioAutomation.Models.Charting.PieChart(center, radius);

            chart.DataPoints.Add(1.0);
            chart.DataPoints.Add(2.0);
            chart.DataPoints.Add(3.0);
            chart.DataPoints.Add(4.0);

            // Create the Page
            var client = this.GetScriptingClient();

            client.Document.New();
            client.Page.New(pagesize, false);

            // Draw the chart

            client.Draw.PieChart(chart);

            // Cleanup
            client.Document.Close(true);
        }
コード例 #2
0
 protected override void ProcessRecord()
 {
     var center = new VisioAutomation.Drawing.Point(this.X0, this.Y0);
     var chart = new VisioAutomation.Models.Charting.PieChart(center,this.Radius);
     chart.InnerRadius = this.InnerRadius;
     chart.DataPoints = new VisioAutomation.Models.Charting.DataPointList(this.Values, this.Labels);
     this.WriteObject(chart);
 }
コード例 #3
0
        protected override void ProcessRecord()
        {
            var center = new VisioAutomation.Drawing.Point(this.X0, this.Y0);
            var chart  = new VisioAutomation.Models.Charting.PieChart(center, this.Radius);

            chart.InnerRadius = this.InnerRadius;
            chart.DataPoints  = new VisioAutomation.Models.Charting.DataPointList(this.Values, this.Labels);
            this.WriteObject(chart);
        }
コード例 #4
0
        public void PieChart(VisioAutomation.Models.Charting.PieChart chart)
        {
            this._client.Application.AssertApplicationAvailable();
            this._client.Document.AssertDocumentAvailable();

            var application = this._client.Application.Get();
            var page        = application.ActivePage;

            chart.Render(page);
        }
コード例 #5
0
        public void Scripting_Draw_PieChart()
        {
            var client = GetScriptingClient();

            client.Document.New();
            client.Page.New(new VA.Drawing.Size(4, 4), false);

            var    center = new VA.Drawing.Point(2, 2);
            double radius = 1.0;
            var    chart  = new VA.Models.Charting.PieChart(center, radius);

            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(1.0));
            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(2.0));
            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(3.0));
            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(4.0));
            client.Draw.PieChart(chart);
            client.Document.Close(true);
        }
コード例 #6
0
        public void Scripting_Draw_PieChart()
        {
            var pagesize = new VA.Drawing.Size(4, 4);
            var center = new VA.Drawing.Point(2, 2);
            double radius = 1.0;

            var chart = new VisioAutomation.Models.Charting.PieChart(center, radius);
            chart.DataPoints.Add(new VisioAutomation.Models.Charting.DataPoint(1.0));
            chart.DataPoints.Add(new VisioAutomation.Models.Charting.DataPoint(2.0));
            chart.DataPoints.Add(new VisioAutomation.Models.Charting.DataPoint(3.0));
            chart.DataPoints.Add(new VisioAutomation.Models.Charting.DataPoint(4.0));

            // Create the Page
            var client = this.GetScriptingClient();
            client.Document.New();
            client.Page.New(pagesize, false);

            // Draw the chart

            client.Draw.PieChart(chart);

            // Cleanup
            client.Document.Close(true);
        }
コード例 #7
0
        public void Scripting_Draw_PieChart()
        {
            var client = GetScriptingClient();
            client.Document.New();
            client.Page.New(new VA.Drawing.Size(4, 4), false);

            var center = new VA.Drawing.Point(2, 2);
            double radius = 1.0;
            var chart = new VA.Models.Charting.PieChart(center,radius);
            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(1.0));
            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(2.0));
            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(3.0));
            chart.DataPoints.Add(new VA.Models.Charting.DataPoint(4.0));
            client.Draw.PieChart(chart);
            client.Document.Close(true);
        }