protected override void ProcessRecord() { var rect = this.GetRectangle(); var chart = new VA.Models.Charting.AreaChart(rect); chart.DataPoints = new VA.Models.Charting.DataPointList(this.Values, this.Labels); this.WriteObject(chart); }
public void Scripting_Draw_AreaChart() { var client = GetScriptingClient(); client.Document.New(); client.Page.New(new VA.Drawing.Size(4, 4), false); var rect1 = new VA.Drawing.Rectangle(0, 0, 4, 4); var chart1 = new VA.Models.Charting.AreaChart(rect1); chart1.DataPoints.Add(1.0); chart1.DataPoints.Add(2.0); chart1.DataPoints.Add(3.0); chart1.DataPoints.Add(4.0); client.Draw.AreaChart(chart1); var rect2 = new VA.Drawing.Rectangle(5, 0, 9, 4); var chart2 = new VA.Models.Charting.AreaChart(rect2); chart2.DataPoints.Add(1.0); chart2.DataPoints.Add(2.0); chart2.DataPoints.Add(-3.0); chart2.DataPoints.Add(4.0); client.Draw.AreaChart(chart2); var rect3 = new VA.Drawing.Rectangle(10, 0, 14, 4); var chart3 = new VA.Models.Charting.AreaChart(rect3); chart3.DataPoints.Add(-1.0); chart3.DataPoints.Add(-2.0); chart3.DataPoints.Add(-3.0); chart3.DataPoints.Add(-4.0); client.Draw.AreaChart(chart3); client.Page.Get().ResizeToFitContents(new VA.Drawing.Size(1.0, 1.0)); client.Document.Close(true); }
protected override void ProcessRecord() { var rect = this.GetRectangle(); var chart = new VA.Models.Charting.AreaChart(rect); chart.DataPoints = new VA.Models.Charting.DataPointList(this.Values, this.Labels); this.WriteObject(chart); }
public void AreaChart(VisioAutomation.Models.Charting.AreaChart chart) { this._client.Application.AssertApplicationAvailable(); this._client.Document.AssertDocumentAvailable(); var application = this._client.Application.Get(); var page = application.ActivePage; chart.Render(page); }
public void Scripting_Draw_AreaChart() { var pagesize = new VA.Drawing.Size(4, 4); var rect1 = new VA.Drawing.Rectangle(0, 0, 4, 4); var rect2 = new VA.Drawing.Rectangle(5, 0, 9, 4); var rect3 = new VA.Drawing.Rectangle(10, 0, 14, 4); var padding = new VA.Drawing.Size(1.0, 1.0); var chart1 = new VisioAutomation.Models.Charting.AreaChart(rect1); chart1.DataPoints.Add(1.0); chart1.DataPoints.Add(2.0); chart1.DataPoints.Add(3.0); chart1.DataPoints.Add(4.0); var chart2 = new VisioAutomation.Models.Charting.AreaChart(rect2); chart2.DataPoints.Add(1.0); chart2.DataPoints.Add(2.0); chart2.DataPoints.Add(-3.0); chart2.DataPoints.Add(4.0); var chart3 = new VisioAutomation.Models.Charting.AreaChart(rect3); chart3.DataPoints.Add(-1.0); chart3.DataPoints.Add(-2.0); chart3.DataPoints.Add(-3.0); chart3.DataPoints.Add(-4.0); // Setup the Page var client = this.GetScriptingClient(); client.Document.New(); client.Page.New(pagesize, false); // Draw the Charts client.Draw.AreaChart(chart1); client.Draw.AreaChart(chart2); client.Draw.AreaChart(chart3); client.Page.Get().ResizeToFitContents(padding); // Cleanup client.Document.Close(true); }
public void Scripting_Draw_AreaChart() { var pagesize = new VA.Drawing.Size(4, 4); var rect1 = new VA.Drawing.Rectangle(0, 0, 4, 4); var rect2 = new VA.Drawing.Rectangle(5, 0, 9, 4); var rect3 = new VA.Drawing.Rectangle(10, 0, 14, 4); var padding = new VA.Drawing.Size(1.0, 1.0); var chart1 = new VisioAutomation.Models.Charting.AreaChart(rect1); chart1.DataPoints.Add(1.0); chart1.DataPoints.Add(2.0); chart1.DataPoints.Add(3.0); chart1.DataPoints.Add(4.0); var chart2 = new VisioAutomation.Models.Charting.AreaChart(rect2); chart2.DataPoints.Add(1.0); chart2.DataPoints.Add(2.0); chart2.DataPoints.Add(-3.0); chart2.DataPoints.Add(4.0); var chart3 = new VisioAutomation.Models.Charting.AreaChart(rect3); chart3.DataPoints.Add(-1.0); chart3.DataPoints.Add(-2.0); chart3.DataPoints.Add(-3.0); chart3.DataPoints.Add(-4.0); // Setup the Page var client = this.GetScriptingClient(); client.Document.New(); client.Page.New(pagesize, false); // Draw the Charts client.Draw.AreaChart(chart1); client.Draw.AreaChart(chart2); client.Draw.AreaChart(chart3); client.Page.Get().ResizeToFitContents(padding); // Cleanup client.Document.Close(true); }
public void Scripting_Draw_AreaChart() { var client = GetScriptingClient(); client.Document.New(); client.Page.New(new VA.Drawing.Size(4, 4), false); var rect1 = new VA.Drawing.Rectangle(0, 0, 4, 4); var chart1 = new VA.Models.Charting.AreaChart(rect1); chart1.DataPoints.Add(1.0); chart1.DataPoints.Add(2.0); chart1.DataPoints.Add(3.0); chart1.DataPoints.Add(4.0); client.Draw.AreaChart(chart1); var rect2 = new VA.Drawing.Rectangle(5, 0, 9, 4); var chart2 = new VA.Models.Charting.AreaChart(rect2); chart2.DataPoints.Add(1.0); chart2.DataPoints.Add(2.0); chart2.DataPoints.Add(-3.0); chart2.DataPoints.Add(4.0); client.Draw.AreaChart(chart2); var rect3 = new VA.Drawing.Rectangle(10, 0, 14, 4); var chart3 = new VA.Models.Charting.AreaChart(rect3); chart3.DataPoints.Add(-1.0); chart3.DataPoints.Add(-2.0); chart3.DataPoints.Add(-3.0); chart3.DataPoints.Add(-4.0); client.Draw.AreaChart(chart3); client.Page.Get().ResizeToFitContents(new VA.Drawing.Size(1.0, 1.0)); client.Document.Close(true); }