- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- //Apply bounding box size and position.
- picture.Crop.ContainerWidth = 280.8F;
- picture.Crop.ContainerHeight = 180F;
- picture.Crop.ContainerLeft = 360F;
- picture.Crop.ContainerTop = 180.5F;
- //Apply cropping size and offsets.
- picture.Crop.Width = 410.4F;
- picture.Crop.Height = 252F;
- picture.Crop.OffsetX = -28.8F;
- picture.Crop.OffsetY = 7.2F;
-
-
- public delegate string LibraryFunction(string args);
-
-
- //Register three ICalcData objects so cell can be referenced across ICalcData objects:
- int sheetfamilyID = CalcEngine.CreateSheetFamilyID();
- myCalcEngine.RegisterGridAsSheet("summary", calcData1, sheetfamilyID);
- myCalcEngine.RegisterGridAsSheet("income", calcData2, sheetfamilyID);
- myCalcEngine.RegisterGridAsSheet("expenses", calcData3, sheetfamilyID);
- ....
- //Sample formula usage for cells in calcData1, the 'summary' data source.
- //This code sums ups some cells from calcData3, the 'expenses' data source
- //and calcData2, the 'income' data source.
- //Sum the range B2:B8 from expenses:
- string sumExpenses = "= Sum(expenses!B2:expenses!B8)";
- //Sum the range B2:B4 from income:
- string sumIncome = "= Sum(income!B2:income!B4)";
-
-
- 'Register three ICalcData objects so cell can be referenced across ICalcData objects:
- Dim sheetfamilyID As Integer = CalcEngine.CreateSheetFamilyID();
- myCalcEngine.RegisterGridAsSheet("summary", calcData1, sheetfamilyID)
- myCalcEngine.RegisterGridAsSheet("income", calcData2, sheetfamilyID)
- myCalcEngine.RegisterGridAsSheet("expenses", calcData3, sheetfamilyID)
- ....
- 'Sample formula usage for cells in calcData1, the 'summary' data source.
- 'This code sums ups some cells from calcData3, the 'expenses' data source
- 'and calcData2, the 'income' data source.
- 'Sum the range B2:B8 from expenses:
- Dim sumExpenses As String = "= Sum(expenses!B2:expenses!B8)"
- 'Sum the range B2:B4 from income:
- Dim sumIncome As String = "= Sum(income!B2:income!B4)"
-
-
- nominalRate = npery * (Math.Pow(1 + effectRate, 1.0 / npery) - 1)
-
- where
- engine.ReservedWordOperators = new string[]
- {
- " or ", //0
- " and ", //1
- " xor ", //2
- " if ", //3
- " then ", //4
- " else ", //5
- " not " //6
- };
-
-
- public void DisplayAllAffectedCells()
- {
- CalcEngine engine = ((GridFormulaCellModel)this.gridControl1.CellModels["FormulaCell"]).Engine;
- foreach(object o in engine.DependentCells.Keys)
- {
- string s1 = o as string;
- Console.Write(s1 + " affects ");
- ArrayList ht = (ArrayList) engine.DependentCells[s1];
- foreach(object o1 in ht)
- {
- string s2 = o1 as string;
- Console.Write(s2 + " ");
- }
- Console.WriteLine("");
- }
- }
-
-
- Public Sub DisplayAllAffectedCells()
- Dim engine As GridCalcEngine = CType(Me.gridControl1.CellModels("FormulaCell"), GridFormulaCellModel).Engine
- Dim o As Object
- For Each o In engine.DependentCells.Keys
- Dim s1 As String = CStr(o)
- Console.Write((s1 + " affects "))
- Dim ht As ArrayList = CType(engine.DependentCells(s1), ArrayList)
- Dim o1 As Object
- For Each o1 In ht
- Dim s2 As String = CStr(o1)
- Console.Write((s2 + " "))
- Next o1
- Console.WriteLine("")
- Next o
- End Sub 'DisplayAllAffectedCells
-
-
- public void DisplayAllFormulaDependencies()
- {
- GridCalcEngine engine = ((GridFormulaCellModel)this.gridControl1.CellModels["FormulaCell"]).Engine;
- foreach(object o in engine.DependentFormulaCells.Keys)
- {
- string s1 = o as string;
- Console.Write(s1 + " depends upon ");
- Hashtable ht = (Hashtable) engine.DependentFormulaCells[s1];
- foreach(object o1 in ht.Keys)
- {
- string s2 = o1 as string;
- Console.Write(s2 + " ");
- }
- Console.WriteLine("");
- }
- }
-
-
- Public Sub DisplayAllFormulaDependencies()
- Dim engine As GridCalcEngine = CType(Me.gridControl1.CellModels("FormulaCell"), GridFormulaCellModel).Engine
-
- Dim o As Object
- For Each o In engine.DependentFormulaCells.Keys
- Dim s1 As String = CStr(o)
- Console.Write((s1 + " depends upon "))
- Dim ht As Hashtable = CType(engine.DependentFormulaCells(s1), Hashtable)
- Dim o1 As Object
- For Each o1 In ht.Keys
- Dim s2 As String = CStr(o1)
- Console.Write((s2 + " "))
- Next o1
- Console.WriteLine("")
- Next o
- End Sub 'DisplayAllFormulaDependencies
-
-
- //subscribe to the event before any formulas are loaded into the grid...
- Engine.FormulaParsing += new FormulaParsingEventHandler(Engine_FormulaParsing);
-
- //Here is the handler code that adds an = if necessary so any string beginning with +, - or =
- //is treated as a formula.
- void Engine_FormulaParsing(object sender, FormulaParsingEventArgs e)
- {
- //allow cells starting with + and - to be treated as formula cells.
- if (e.Text.StartsWith("-"))
- e.Text = "=" + e.Text;
- else if (e.Text.StartsWith("+"))
- e.Text = "=" + e.Text.Substring(1);
- }
-
-
- CalcQuick calculator = null;
- private void AngleForm_Load(object sender, System.EventArgs e)
- {
- //TextBox Angle = new TextBox();
- this.Angle.Name = "Angle";
- this.Angle.Text = "30";
- //cosTB = new TextBox();
- this.cosTB.Name = "cosTB";
- this.cosTB.Text = "= cos([Angle] * pi() / 180) ";
- //sinTB = new TextBox();
- this.sinTB.Name = "sinTB";
- this.sinTB.Text = "= sin([Angle] * pi() / 180) ";
- // Instantiate the CalcQuick object:
- this.calculator = new CalcQuick();
- }
- // Perform a manual calculation:
- private void ComputeButton_Click(object sender, System.EventArgs e)
- {
- // Let the calculator know the values/formulas
- // by using an indexer on the calculator object.
- // Here we are using the TextBox.Name as the indexer key
- // provided to the calculator object. This is not required.
- // The only restriction for the indexer key values is that they
- // be unique nonempty strings:
- this.calculator["Angle"] = this.Angle.Text;
- this.calculator["cosTB"] = this.cosTB.Text;
- this.calculator["sinTB"] = this.sinTB.Text;
- // Mark the calculator dirty:
- this.calculator.SetDirty();
- // Now as the values are retrieved from the calculator, they
- // will be the newly calculated values:
- this.cosTB.Text = this.calculator["cosTB"];
- this.sinTB.Text = this.calculator["sinTB"];
- }
-
-
- Dim calculator As CalcQuick = Nothing
- Private Sub AngleForm_Load(sender As Object, e As System.EventArgs)
- 'TextBox Angle = new TextBox();
- Me.Angle.Name = "Angle"
- Me.Angle.Text = "30"
- 'cosTB = new TextBox();
- Me.cosTB.Name = "cosTB"
- Me.cosTB.Text = "= cos([Angle] * pi() / 180) "
-
- 'sinTB = new TextBox();
- Me.sinTB.Name = "sinTB"
- Me.sinTB.Text = "= sin([Angle] * pi() / 180) "
-
- 'Instantiate the CalcQuick object:
- Me.calculator = New CalcQuick()
- End Sub 'AngleForm_Load
-
- 'Perform a manual calculation:
- Private Sub ComputeButton_Click(sender As Object, e As System.EventArgs)
- 'Let the calculator know the values/formulas
- 'by using an indexer on the calculator object.
- 'Here we are using the TextBox.Name as the indexer key
- 'provided to the calculator object. This is not required.
- 'The only restriction for the indexer key values is that they
- 'be unique nonempty strings:
- Me.calculator("Angle") = Me.Angle.Text
- Me.calculator("cosTB") = Me.cosTB.Text
- Me.calculator("sinTB") = Me.sinTB.Text
-
- 'Mark the calculator dirty:
- Me.calculator.SetDirty()
-
- 'Now as the values are retrieved from the calculator, they
- 'will be the newly calculated values:
- Me.cosTB.Text = Me.calculator("cosTB")
- Me.sinTB.Text = Me.calculator("sinTB")
- End Sub 'ComputeButton_Click
-
- Here is code that uses the same three TextBoxes as above, but this time
- the code is set up to automatically compute things as you change the
- value in the Angle TextBox. There is no longer a need for a button handler
- to trigger setting / getting values.
-
- CalcQuick calculator = null;
-
- private void AngleForm_Load(object sender, System.EventArgs e)
- {
- //TextBox Angle = new TextBox();
- this.Angle.Name = "Angle";
- this.Angle.Text = "30";
-
- //cosTB = new TextBox();
- this.cosTB.Name = "cosTB";
- this.cosTB.Text = "= cos([Angle] * pi() / 180) ";
-
- //sinTB = new TextBox();
- this.sinTB.Name = "sinTB";
- this.sinTB.Text = "= sin([Angle] * pi() / 180) ";
-
- // Instantiate the CalcQuick object:
- this.calculator = new CalcQuick();
- }
-
- // Perform a manual calculation:
- private void ComputeButton_Click(object sender, System.EventArgs e)
- {
- // Let the calculator know the values/formulas
- // by using an indexer on the calculator object.
- // Here we are using the TextBox.Name as the indexer key
- // provided to the calculator object. This is not required.
- // The only restriction for the indexer key values is that they
- // be unique nonempty strings:
- this.calculator["Angle"] = this.Angle.Text;
- this.calculator["cosTB"] = this.cosTB.Text;
- this.calculator["sinTB"] = this.sinTB.Text;
-
- // Mark the calculator dirty:
- this.calculator.SetDirty();
-
- // Now as the values are retrieved from the calculator, they
- // will be the newly calculated values:
- this.cosTB.Text = this.calculator["cosTB"];
- this.sinTB.Text = this.calculator["sinTB"];
- }
-
-
- Dim calculator As CalcQuick = Nothing
-
- Private Sub AngleForm_Load(sender As Object, e As System.EventArgs)
- 'TextBox Angle = new TextBox();
- Me.Angle.Name = "Angle"
- Me.Angle.Text = "30"
-
- 'cosTB = new TextBox();
- Me.cosTB.Name = "cosTB"
- Me.cosTB.Text = "= cos([Angle] * pi() / 180) "
-
- 'sinTB = new TextBox();
- Me.sinTB.Name = "sinTB"
- Me.sinTB.Text = "= sin([Angle] * pi() / 180) "
-
- 'Instantiate the CalcQuick object:
- Me.calculator = New CalcQuick()
- End Sub 'AngleForm_Load
-
- 'Perform a manual calculation:
- Private Sub ComputeButton_Click(sender As Object, e As System.EventArgs)
- 'Let the calculator know the values/formulas
- 'by using an indexer on the calculator object.
- 'Here we are using the TextBox.Name as the indexer key
- 'provided to the calculator object. This is not required.
- 'The only restriction for the indexer key values is that they
- 'be unique nonempty strings:
- Me.calculator("Angle") = Me.Angle.Text
- Me.calculator("cosTB") = Me.cosTB.Text
- Me.calculator("sinTB") = Me.sinTB.Text
-
- 'Mark the calculator dirty:
- Me.calculator.SetDirty()
-
- 'Now as the values are retrieved from the calculator, they
- 'will be the newly calculated values:
- Me.cosTB.Text = Me.calculator("cosTB")
- Me.sinTB.Text = Me.calculator("sinTB")
- End Sub 'ComputeButton_Click
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate();
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum;
- //Invoke end update method
- chart.ChartTitleArea.EndUpdate();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the chart title
- chart.ChartTitle = "This is a chart Title"
- 'Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate()
- 'Set the bold font style
- chart.ChartTitleArea.Bold = True
- 'Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum
- 'Invoke end update method
- chart.ChartTitleArea.EndUpdate()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate();
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum;
- //Invoke end update method
- chart.ChartTitleArea.EndUpdate();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the chart title
- chart.ChartTitle = "This is a chart Title"
- 'Invoke the begin update method
- chart.ChartTitleArea.BeginUpdate()
- 'Set the bold font style
- chart.ChartTitleArea.Bold = True
- 'Set the color of the text area
- chart.ChartTitleArea.Color = OfficeKnownColors.Plum
- 'Invoke end update method
- chart.ChartTitleArea.EndUpdate()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- //Set the number format of axis
- chartAxis.NumberFormat = "Number";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- 'Set the number format of axis
- chartAxis.NumberFormat = "Number"
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Get the chart axis type, read only
- OfficeAxisType axisType = chartAxis.AxisType;
- //Enable reverse plot order
- chartAxis.ReversePlotOrder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Get the chart axis type, read only
- Dim axisType As OfficeAxisType = chartAxis.AxisType
- 'Enable reverse plot order
- chartAxis.ReversePlotOrder = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- chartAxis.ReversePlotOrder = true;
- //Set the text rotation angle
- chartAxis.TextRotationAngle = 30;
- //Set the title
- chartAxis.Title = "Chart Axis";
- //Set the font style for title area
- chartAxis.TitleArea.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- chartAxis.ReversePlotOrder = True
- 'Set the text rotation angle
- chartAxis.TextRotationAngle = 30
- 'Set the title
- chartAxis.Title = "Chart Axis"
- 'Set the font style for title area
- chartAxis.TitleArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- chartAxis.ReversePlotOrder = true;
- //Set the text rotation angle
- chartAxis.TextRotationAngle = 50;
- //Set the title
- chartAxis.Title = "Chart Axis";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- chartAxis.ReversePlotOrder = True
- 'Set the text rotation angle
- chartAxis.TextRotationAngle = 30
- 'Set the title
- chartAxis.Title = "Chart Axis"
- 'Set the font style for title area
- chartAxis.TitleArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- chartAxis.ReversePlotOrder = true;
- //Set the text rotation angle
- chartAxis.TextRotationAngle = 30;
- //Set the title
- chartAxis.Title = "Chart Axis";
- //Set the font style for title area
- chartAxis.TitleArea.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- chartAxis.ReversePlotOrder = True
- 'Set the text rotation angle
- chartAxis.TextRotationAngle = 30
- 'Set the title
- chartAxis.Title = "Chart Axis"
- 'Set the font style for title area
- chartAxis.TitleArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = true;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set major gridline
- chartAxis.HasMajorGridLines = true;
- //Get the major gridline of chart axis, read only
- IOfficeChartGridLine gridline = chartAxis.MajorGridLines;
- //Set border of major grid line
- gridline.Border.AutoFormat = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set major gridline
- chartAxis.HasMajorGridLines = True
- 'Get the major gridline of chart axis, read only
- Dim gridline As IOfficeChartGridLine = chartAxis.MajorGridLines
- 'Set border of major grid line
- gridline.Border.AutoFormat = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set minor gridline
- chartAxis.HasMinorGridLines = true;
- //Get the minor gridline of chart axis, read only
- IOfficeChartGridLine gridline = chartAxis.MinorGridLines;
- //Set border of minor grid line
- gridline.Border.AutoFormat = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set minor gridline
- chartAxis.HasMinorGridLines = True
- 'Get the minor gridline of chart axis, read only
- Dim gridline As IOfficeChartGridLine = chartAxis.MinorGridLines
- 'Set border of minor grid line
- gridline.Border.AutoFormat = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the minor grid lines
- chartAxis.HasMinorGridLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the minor grid lines
- chartAxis.HasMinorGridLines = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set minor gridline
- chartAxis.HasMinorGridLines = true;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the major gridlines
- chartAxis.HasMajorGridLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set minor gridline
- chartAxis.HasMinorGridLines = True
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the major gridlines
- chartAxis.HasMajorGridLines = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the minor tick mark
- chartAxis.MinorTickMark = OfficeTickMark.TickMark_Outside;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the minor tick mark
- chartAxis.MinorTickMark = OfficeTickMark.TickMark_Outside
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Set the major tick mark
- chartAxis.MajorTickMark = OfficeTickMark.TickMark_Inside;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Set the major tick mark
- chartAxis.MajorTickMark = OfficeTickMark.TickMark_Inside
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = true;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = true;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the tick label position
- chartAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set the tick label position
- chartAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Hide the visibility of chart axis
- chartAxis.Visible = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Hide the visibility of chart axis
- chartAxis.Visible = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Get the chart axis type, read only
- OfficeAxisType axisType = chartAxis.AxisType;
- //Enable reverse plot order
- chartAxis.ReversePlotOrder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Get the chart axis type, read only
- Dim axisType As OfficeAxisType = chartAxis.AxisType
- 'Enable reverse plot order
- chartAxis.ReversePlotOrder = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Get the shadow od axis
- IShadow shadow = chartAxis.Shadow;
- //Set the shadow color
- shadow.ShadowColor = Color.Brown;
- //Set the shadow angle
- shadow.Angle = 87;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Get the shadow od axis
- Dim shadow As IShadow = chartAxis.Shadow
- 'Set the shadow color
- shadow.ShadowColor = Color.Brown
- 'Set the shadow angle
- shadow.Angle = 87
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create an instance of chart axis
- IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
- //Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200;
- //Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
- 'Create an instance of chart axis
- Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
- 'Set auto tick label spacing
- chartAxis.AutoTickLabelSpacing = True
- 'Set the border of chart axis
- chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Set 3D options for chart
- chartAxis.Chart3DOptions.BevelBottomWidth = 200
- 'Set the font color for chart axis
- chartAxis.Font.Color = OfficeKnownColors.Lavender
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- chartAreaBorder.LineColor = System.Drawing.Color.CornflowerBlue
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Set the auto format
- chartAreaBorder.AutoFormat = false;
- //Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Set the auto format
- chartAreaBorder.AutoFormat = False
- 'Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Enable auto line color
- chartAreaBorder.IsAutoLineColor = false;
- //Set the line color
- //chartAreaBorder.LineColor = Color.Chocolate;
- //Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Enable auto line color
- chartAreaBorder.IsAutoLineColor = False
- 'Set the line color
- 'chartAreaBorder.LineColor = Color.Chocolate;
- 'Set the line pattern
- chartAreaBorder.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Set the line weight
- chartAreaBorder.LineWeight = OfficeChartLineWeight.Wide
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart area border
- IOfficeChartBorder chartAreaBorder = chart.ChartArea.Border;
- //Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange;
- //Set the transparency of border
- chartAreaBorder.Transparency = 0.8;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart area border
- Dim chartAreaBorder As IOfficeChartBorder = chart.ChartArea.Border
- 'Set the color index of chart area border
- chartAreaBorder.ColorIndex = OfficeKnownColors.Light_orange
- 'Set the transparency of border
- chartAreaBorder.Transparency = 0.8
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the categories of chart
- IOfficeChartCategories categories = chart.Categories;
- //Get the name of the category
- string name = categories[0].Name;
- //Set the category filter
- categories[0].IsFiltered = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the categories of chart
- Dim categories As IOfficeChartCategories = chart.Categories
- 'Get the name of the category
- Dim name As String = categories(0).Name
- 'Set the category filter
- categories(0).IsFiltered = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the category from the category collection
- IOfficeChartCategory category = chart.Categories[0];
- //Get the name of the category
- string name = category.Name;
- //Get the category label, read only
- IOfficeDataRange dataRange = category.CategoryLabel;
- //Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol");
- dataRange.SetValue(2, 4, 290);
- //Get the values of category
- IOfficeDataRange values = category.Values;
- //Set the value
- values.SetValue(3, 2, 120);
- values.SetValue(5, 2, 320);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the category from the category collection
- Dim category As IOfficeChartCategory = chart.Categories(0)
- 'Get the name of the category
- Dim name As String = category.Name
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = category.CategoryLabel
- 'Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol")
- dataRange.SetValue(2, 4, 290)
- 'Get the values of category
- Dim values As IOfficeDataRange = category.Values
- 'Set the value
- values.SetValue(3, 2, 120)
- values.SetValue(5, 2, 320)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the category from the category collection
- IOfficeChartCategory category = chart.Categories[0];
- //Get the name of the category
- string name = category.Name;
- //Get the category label, read only
- IOfficeDataRange dataRange = category.CategoryLabel;
- //Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol");
- dataRange.SetValue(2, 4, 290);
- //Get the values of category
- IOfficeDataRange values = category.Values;
- //Set the value
- values.SetValue(3, 2, 120);
- values.SetValue(5, 2, 320);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the category from the category collection
- Dim category As IOfficeChartCategory = chart.Categories(0)
- 'Get the name of the category
- Dim name As String = category.Name
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = category.CategoryLabel
- 'Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol")
- dataRange.SetValue(2, 4, 290)
- 'Get the values of category
- Dim values As IOfficeDataRange = category.Values
- 'Set the value
- values.SetValue(3, 2, 120)
- values.SetValue(5, 2, 320)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the category from the category collection
- IOfficeChartCategory category = chart.Categories[0];
- //Get the name of the category
- string name = category.Name;
- //Get the category label, read only
- IOfficeDataRange dataRange = category.CategoryLabel;
- //Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol");
- dataRange.SetValue(2, 4, 290);
- //Get the values of category
- IOfficeDataRange values = category.Values;
- //Set the value
- values.SetValue(3, 2, 120);
- values.SetValue(5, 2, 320);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the category from the category collection
- Dim category As IOfficeChartCategory = chart.Categories(0)
- 'Get the name of the category
- Dim name As String = category.Name
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = category.CategoryLabel
- 'Set the value
- dataRange.SetValue(2, 1, "2ndRow, 1stCol")
- dataRange.SetValue(2, 4, 290)
- 'Get the values of category
- Dim values As IOfficeDataRange = category.Values
- 'Set the value
- values.SetValue(3, 2, 120)
- values.SetValue(5, 2, 320)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMin = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMinor = false;
- //Set the major unit
- chart.PrimaryValueAxis.MinorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MinimumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMin = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMinor = false;
- //Set the major unit
- chart.PrimaryValueAxis.MinorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MinimumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the crosses At
- chart.PrimaryValueAxis.CrossesAt = 1.2;
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.Hundreds;
- //Set the display unit custom
- chart.PrimaryValueAxis.DisplayUnitCustom = 12.34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMin = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMinor = false;
- //Set the major unit
- chart.PrimaryValueAxis.MinorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MinimumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Diable auto major
- chart.PrimaryValueAxis.IsAutoMajor = false;
- //Disable auto max
- chart.PrimaryValueAxis.IsAutoMax = false;
- //Set the major unit
- chart.PrimaryValueAxis.MajorUnit = 24.34;
- //Set the maximum value
- chart.PrimaryValueAxis.MaximumValue = 60;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Disable the auto cross
- chart.PrimaryValueAxis.IsAutoCross = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the log scale
- chart.PrimaryValueAxis.IsLogScale = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range (start row, start column, end row, end column) of chart series
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range (start row, start column, end row, end column) of chart series
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the log scale and log base
- chart.PrimaryValueAxis.IsLogScale = true;
- chart.PrimaryValueAxis.LogBase = 2;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Disable the auto cross
- chart.PrimaryValueAxis.IsAutoCross = false;
- //Set the Max cross
- chart.PrimaryValueAxis.IsMaxCross = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the crosses At
- chart.PrimaryValueAxis.CrossesAt = 1.2;
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.Hundreds;
- //Set the display unit custom
- chart.PrimaryValueAxis.DisplayUnitCustom = 12.34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the crosses At
- chart.PrimaryValueAxis.CrossesAt = 1.2;
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.Hundreds;
- //Set the display unit custom
- chart.PrimaryValueAxis.DisplayUnitCustom = 12.34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.MillionMillions;
- //Hide the display unit label
- chart.PrimaryValueAxis.HasDisplayUnitLabel = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the display unit
- chart.PrimaryValueAxis.DisplayUnit = OfficeChartDisplayUnit.MillionMillions;
- //Set the italic font style for the lable
- chart.PrimaryValueAxis.DisplayUnitLabel.Italic = true;
- //Set the RGB color of the label
- chart.PrimaryValueAxis.DisplayUnitLabel.RGBColor = System.Drawing.Color.Bisque;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2;
- //Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2
- 'Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the auto tick label spacing
- categoryAxis.AutoTickLabelSpacing = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the auto tick label spacing
- categoryAxis.AutoTickLabelSpacing = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2;
- //Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2
- 'Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2;
- //Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2;
- //Set IsBetween, default is true
- categoryAxis.IsBetween = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the tick label spacing
- categoryAxis.TickLabelSpacing = 2
- 'Set the tick mark spacing
- categoryAxis.TickMarkSpacing = 2
- 'Set IsBetween, default is true
- categoryAxis.IsBetween = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 1, "Jan");
- chart.ChartData.SetValue(1, 2, "Feb");
- chart.ChartData.SetValue(1, 3, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "10");
- chart.ChartData.SetValue(2, 2, "20");
- chart.ChartData.SetValue(2, 3, "30");
- ///'Sets the data range of chart
- chart.DataRange = chart.ChartData(1, 1, 2, 2)
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.DirectCategoryLabels = = new object[] { "Oct", "Nov", "Dec" };;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the category type
- categoryAxis.CategoryType = OfficeCategoryType.Category;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the category type
- categoryAxis.CategoryType = OfficeCategoryType.Category
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the base unit for the category axis, default is true
- categoryAxis.BaseUnitIsAuto = False
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit
- categoryAxis.MinorUnit = 10;
- //Set the major unit
- categoryAxis.MajorUnit = 10;
- //Set the offset value
- categoryAxis.Offset = 450;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit
- categoryAxis.MinorUnit = 10
- 'Set the major unit
- categoryAxis.MajorUnit = 10
- 'Set the offset value
- categoryAxis.Offset = 450
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis of chart
- IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
- //Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy";
- //Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
- //Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month;
- //Set the minor unit
- categoryAxis.MinorUnit = 10;
- //Set the major unit
- categoryAxis.MajorUnit = 10;
- //Set the offset value
- categoryAxis.Offset = 450;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "9/21/2015")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "9/24/2015")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "9/28/2015")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis of chart
- Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the category labels
- categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Set the number format of axis
- categoryAxis.NumberFormat = "m/d/yyyy"
- 'Set the base unit
- categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
- 'Set the major unit scale
- categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit scale
- categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month
- 'Set the minor unit
- categoryAxis.MinorUnit = 10
- 'Set the major unit
- categoryAxis.MajorUnit = 10
- 'Set the offset value
- categoryAxis.Offset = 450
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[1].Charts[0] as IPresentationChart;
- //Get the categories of chart
- IOfficeChartCategories categories = chart.Categories;
- //Get the count of categories
- int count = categories.Count;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(1).Charts(0), IPresentationChart)
- 'Get the categories of chart
- Dim categories As IOfficeChartCategories = chart.Categories
- 'Get the count of categories
- Dim count As Integer = categories.Count
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the categories of chart
- IOfficeChartCategories categories = chart.Categories;
- //Get the name of the category
- string name = categories[0].Name;
- //Set the category filter
- categories[0].IsFiltered = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the categories of chart
- Dim categories As IOfficeChartCategories = chart.Categories
- 'Get the name of the category
- Dim name As String = categories(0).Name
- 'Set the category filter
- categories(0).IsFiltered = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IOfficeChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the value of a particular cell from the chart data
- object value = chartData.GetValue(2, 3);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with postion and size
- Dim chart As IOfficeChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the value of a particular cell from the chart data
- Dim value As Object = chartData.GetValue(2, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Clear the chart data
- chartData.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Clear the chart data
- chartData.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IOfficeChart chart = slide.Shapes[0] as IOfficeChart;
- //Get the chart data
- IOfficeChartData chartData = chart.ChartData;
- //Get the category label, read only
- IOfficeDataRange dataRange = chartData[2, 2, 4, 5];
- //Set the cell with an integer
- dataRange.SetValue(2, 4, 290);
- //Set the cell with double value
- dataRange.SetValue(3, 3, 23.34);
- //Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C");
- //Set the cell with an object
- object value = "@!@#";
- dataRange.SetValue(2, 1, "value");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IOfficeChart = TryCast(slide.Shapes(0), IOfficeChart)
- 'Get the chart data
- Dim chartData As IOfficeChartData = chart.ChartData
- 'Get the category label, read only
- Dim dataRange As IOfficeDataRange = chartData(2, 2, 4, 5)
- 'Set the cell with an integer
- dataRange.SetValue(2, 4, 290)
- 'Set the cell with double value
- dataRange.SetValue(3, 3, 23.34)
- 'Set the cell with a string
- dataRange.SetValue(3, 1, "ChartData - 3R1C")
- 'Set the cell with an object
- Dim value As Object = "@!@#"
- dataRange.SetValue(2, 1, "value")
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the size of text area
- chart.ChartTitleArea.Size = 32;
- //Set the RGB color
- chart.ChartTitleArea.RGBColor = System.Drawing.Color.Peru;
- //Set strike through
- chart.ChartTitleArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the size of text area
- chart.ChartTitleArea.Size = 32;
- //Set the RGB color
- chart.ChartTitleArea.RGBColor = System.Drawing.Color.Peru;
- //Set strike through
- chart.ChartTitleArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the size of text area
- chart.ChartTitleArea.Size = 32;
- //Set the RGB color
- chart.ChartTitleArea.RGBColor = System.Drawing.Color.Peru;
- //Set strike through
- chart.ChartTitleArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "This is a chart Title";
- //Set the bold font style
- chart.ChartTitleArea.Bold = true;
- //Set the color of chart title area
- chart.ChartTitleArea.Color = OfficeKnownColors.BlueCustom;
- //Set the font name
- chart.ChartTitleArea.FontName = "Calibri";
- //Get if the chart area is auto color
- bool autoColor = chart.ChartTitleArea.IsAutoColor;
- //Set the italic font style
- chart.ChartTitleArea.Italic = true;
- //Set the underline property
- chart.ChartTitleArea.Underline = OfficeUnderline.Double;
- //Set the alignment
- chart.ChartTitleArea.VerticalAlignment = OfficeFontVerticalAlignment.Baseline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the size of title text area
- chart.ChartTitleArea.Size = 26;
- //Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru;
- //Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title";
- //Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the size of title text area
- chart.ChartTitleArea.Size = 26
- 'Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru
- 'Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title"
- 'Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the size of title text area
- chart.ChartTitleArea.Size = 26;
- //Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru;
- //Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title";
- //Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the size of title text area
- chart.ChartTitleArea.Size = 26
- 'Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru
- 'Set the text for chart title
- chart.ChartTitleArea.Text = "The Chart Title"
- 'Set the text rotation angle
- chart.ChartTitleArea.TextRotationAngle = 45
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the chart title
- chart.ChartTitle = "The Chart Title";
- //Set the size of title text area
- chart.ChartTitleArea.Size = 26;
- //Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru;
- //Set the line pattern
- chart.ChartTitleArea.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the line weight
- chart.ChartTitleArea.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the chart title
- chart.ChartTitle = "The Chart Title"
- 'Set the size of title text area
- chart.ChartTitleArea.Size = 26
- 'Set the border color of frame format
- chart.ChartTitleArea.FrameFormat.Border.LineColor = System.Drawing.Color.Peru
- 'Set the line pattern
- chart.ChartTitleArea.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the line weight
- chart.ChartTitleArea.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Set the category name
- dataLabels.IsCategoryName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Set the category name
- dataLabels.IsCategoryName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the value for data labels
- dataLabels.IsValue = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the value for data labels
- dataLabels.IsValue = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie;
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the data label as percentage
- dataLabels.IsPercentage = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the data label as percentage
- dataLabels.IsPercentage = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create an instance equivalent to PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add a blank slide
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart of specific size and position
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 400);
- chart.ChartData.SetValue(1, 2, 1);
- chart.ChartData.SetValue(1, 3, 2);
- chart.ChartData.SetValue(1, 4, 3);
- chart.ChartData.SetValue(2, 1, "Blue");
- chart.ChartData.SetValue(2, 2, 0.4);
- chart.ChartData.SetValue(2, 3, 0.5);
- chart.ChartData.SetValue(2, 4, 1.2);
- chart.ChartData.SetValue(3, 1, "Red");
- chart.ChartData.SetValue(3, 2, 2.6);
- chart.ChartData.SetValue(3, 3, 3.6);
- chart.ChartData.SetValue(3, 4, 2.1);
- chart.ChartData.SetValue(4, 1, "Orange");
- chart.ChartData.SetValue(4, 2, 1.1);
- chart.ChartData.SetValue(4, 3, 0.6);
- chart.ChartData.SetValue(4, 4, 1.2);
- chart.ChartData.SetValue(5, 1, "Light Blue");
- chart.ChartData.SetValue(5, 2, 2.1);
- chart.ChartData.SetValue(5, 3, 3.4);
- chart.ChartData.SetValue(5, 4, 1.1);
- IOfficeChartSerie serieJan = chart.Series.Add("1");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 5, 2];
- IOfficeChartSerie serieFeb = chart.Series.Add("2");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 5, 3];
- //Creates a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("3");
- //Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 5, 4];
- //Set chart data range
- chart.DataRange = chart.ChartData[2, 1, 5, 4];
- //Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked;
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.IsValue = true;
- //Set the number format of the data label in percentage, round off to two decimal places
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%";
- //Save the presentation
- presentation.Save("sample.pptx");
- //Close the Presentation
- presentation.Close();
-
-
- 'Create an instance equivalent to PowerPoint presentation
- Dim presentationDocument As IPresentation = Presentation.Create()
- 'Add a blank slide
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart of specific size and position
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 100, 300, 400)
- chart.ChartData.SetValue(1, 2, 1)
- chart.ChartData.SetValue(1, 3, 2)
- chart.ChartData.SetValue(1, 4, 3)
- chart.ChartData.SetValue(2, 1, "Blue")
- chart.ChartData.SetValue(2, 2, 0.4)
- chart.ChartData.SetValue(2, 3, 0.5)
- chart.ChartData.SetValue(2, 4, 1.2)
- chart.ChartData.SetValue(3, 1, "Red")
- chart.ChartData.SetValue(3, 2, 2.6)
- chart.ChartData.SetValue(3, 3, 3.6)
- chart.ChartData.SetValue(3, 4, 2.1)
- chart.ChartData.SetValue(4, 1, "Orange")
- chart.ChartData.SetValue(4, 2, 1.1)
- chart.ChartData.SetValue(4, 3, 0.6)
- chart.ChartData.SetValue(4, 4, 1.2)
- chart.ChartData.SetValue(5, 1, "Light Blue")
- chart.ChartData.SetValue(5, 2, 2.1)
- chart.ChartData.SetValue(5, 3, 3.4)
- chart.ChartData.SetValue(5, 4, 1.1)
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("1")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 5, 2)
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("2")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 5, 3)
- 'Creates a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("3")
- 'Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 5, 4)
- 'Set chart data range
- chart.DataRange = chart.ChartData(2, 1, 5, 4)
- 'Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.IsValue = True
- 'Set the number format of the data label in percentage, round off to two decimal places.
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%"
- 'Save the presentation
- presentationDocument.Save("sample.pptx")
- 'Close the Presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the position of data labels
- dataLabels.Delimiter = "L";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the position of data labels
- dataLabels.Delimiter = "L"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Set the legend key for data labels
- dataLabels.IsLegendKey = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Set the legend key for data labels
- dataLabels.IsLegendKey = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie;
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the leader lines
- dataLabels.ShowLeaderLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Pie chart
- chart.ChartType = OfficeChartType.Pie
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the leader lines
- dataLabels.ShowLeaderLines = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the serie name
- dataLabels.IsSeriesName = true;
- //Set the legend key for data labels
- dataLabels.IsLegendKey = true;
- //Set the position of data labels
- dataLabels.Position = OfficeDataLabelPosition.Outside;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set the serie name
- dataLabels.IsSeriesName = True
- 'Set the legend key for data labels
- dataLabels.IsLegendKey = True
- 'Set the position of data labels
- dataLabels.Position = OfficeDataLabelPosition.Outside
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the value form cells to datalabels.
- dataLabels.IsValueFromCells = true;
- //Set teh value form cells range in datalabels.
- dataLabels.ValueFromCellsRange=chart.ChartData[3,5,3,7];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set value form cells to DataLables.
- 'Set value from cells range in Datalabels'
- dataLabels.IsValueFromCells = true;
- dataLabels.ValueFromCellsRange=chart.ChartData[3,5,3,7];
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie data labels
- IOfficeChartDataLabels dataLabels = chart.Series[0].DataPoints.DefaultDataPoint.DataLabels;
- //Set the value form cells to datalabels.
- dataLabels.IsValueFromCells = true;
- //Set teh value form cells range in datalabels.
- dataLabels.ValueFromCellsRange=chart.ChartData[3,5,3,7];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie data labels
- Dim dataLabels As IOfficeChartDataLabels = chart.Series(0).DataPoints.DefaultDataPoint.DataLabels
- 'Set value form cells to DataLables.
- 'Set value from cells range in Datalabels'
- dataLabels.IsValueFromCells = true;
- dataLabels.ValueFromCellsRange=chart.ChartData[3,5,3,7];
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create an instance equivalent to PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add a blank slide
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart of specific size and position
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 400);
- chart.ChartData.SetValue(1, 2, 1);
- chart.ChartData.SetValue(1, 3, 2);
- chart.ChartData.SetValue(1, 4, 3);
- chart.ChartData.SetValue(2, 1, "Blue");
- chart.ChartData.SetValue(2, 2, 0.4);
- chart.ChartData.SetValue(2, 3, 0.5);
- chart.ChartData.SetValue(2, 4, 1.2);
- chart.ChartData.SetValue(3, 1, "Red");
- chart.ChartData.SetValue(3, 2, 2.6);
- chart.ChartData.SetValue(3, 3, 3.6);
- chart.ChartData.SetValue(3, 4, 2.1);
- chart.ChartData.SetValue(4, 1, "Orange");
- chart.ChartData.SetValue(4, 2, 1.1);
- chart.ChartData.SetValue(4, 3, 0.6);
- chart.ChartData.SetValue(4, 4, 1.2);
- chart.ChartData.SetValue(5, 1, "Light Blue");
- chart.ChartData.SetValue(5, 2, 2.1);
- chart.ChartData.SetValue(5, 3, 3.4);
- chart.ChartData.SetValue(5, 4, 1.1);
- IOfficeChartSerie serieJan = chart.Series.Add("1");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 5, 2];
- IOfficeChartSerie serieFeb = chart.Series.Add("2");
- //Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 5, 3];
- //Creates a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("3");
- //Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 5, 4];
- //Set chart data range
- chart.DataRange = chart.ChartData[2, 1, 5, 4];
- //Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked;
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.IsValue = true;
- //Set the number format of the data label in percentage, round off to two decimal places
- chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%";
- //Save the presentation
- presentation.Save("sample.pptx");
- //Close the Presentation
- presentation.Close();
-
-
- 'Create an instance equivalent to PowerPoint presentation
- Dim presentationDocument As IPresentation = Presentation.Create()
- 'Add a blank slide
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart of specific size and position
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 100, 300, 400)
- chart.ChartData.SetValue(1, 2, 1)
- chart.ChartData.SetValue(1, 3, 2)
- chart.ChartData.SetValue(1, 4, 3)
- chart.ChartData.SetValue(2, 1, "Blue")
- chart.ChartData.SetValue(2, 2, 0.4)
- chart.ChartData.SetValue(2, 3, 0.5)
- chart.ChartData.SetValue(2, 4, 1.2)
- chart.ChartData.SetValue(3, 1, "Red")
- chart.ChartData.SetValue(3, 2, 2.6)
- chart.ChartData.SetValue(3, 3, 3.6)
- chart.ChartData.SetValue(3, 4, 2.1)
- chart.ChartData.SetValue(4, 1, "Orange")
- chart.ChartData.SetValue(4, 2, 1.1)
- chart.ChartData.SetValue(4, 3, 0.6)
- chart.ChartData.SetValue(4, 4, 1.2)
- chart.ChartData.SetValue(5, 1, "Light Blue")
- chart.ChartData.SetValue(5, 2, 2.1)
- chart.ChartData.SetValue(5, 3, 3.4)
- chart.ChartData.SetValue(5, 4, 1.1)
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("1")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 5, 2)
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("2")
- 'Sets the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 5, 3)
- 'Creates a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("3")
- 'Sets the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 5, 4)
- 'Set chart data range
- chart.DataRange = chart.ChartData(2, 1, 5, 4)
- 'Specifies the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.IsValue = True
- 'Set the number format of the data label in percentage, round off to two decimal places
- chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.NumberFormat = "0.00%"
- 'Save the presentation
- presentationDocument.Save("sample.pptx")
- 'Close the Presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Gets the index of data point from points collection
- int index = dataPoint.Index;
- //Check if the point is default data point
- bool isDefault = dataPoint.IsDefault;
- //Set the default marker type
- dataPoint.IsDefaultmarkertype = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Gets the index of data point from points collection
- Dim index As Integer = dataPoint.Index
- 'Check if the point is default data point
- Dim isDefault As Boolean = dataPoint.IsDefault
- 'Set the default marker type
- dataPoint.IsDefaultmarkertype = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Get the data format of the data point, read only
- IOfficeChartSerieDataFormat dataFormat = dataPoint.DataFormat;
- //Set the BarShapeTop
- dataFormat.BarShapeTop = OfficeTopFormat.Trunc;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Get the data format of the data point, read only
- Dim dataFormat As IOfficeChartSerieDataFormat = dataPoint.DataFormat
- 'Set the BarShapeTop
- dataFormat.BarShapeTop = OfficeTopFormat.Trunc
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Gets the index of data point from points collection
- int index = dataPoint.Index;
- //Check if the point is default data point
- bool isDefault = dataPoint.IsDefault;
- //Set the default marker type
- dataPoint.IsDefaultmarkertype = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Gets the index of data point from points collection
- Dim index As Integer = dataPoint.Index
- 'Check if the point is default data point
- Dim isDefault As Boolean = dataPoint.IsDefault
- 'Set the default marker type
- dataPoint.IsDefaultmarkertype = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D;
- //Get the serie data point
- IOfficeChartDataPoint dataPoint = chart.Series[0].DataPoints.DefaultDataPoint;
- //Gets the index of data point from points collection
- int index = dataPoint.Index;
- //Check if the point is default data point
- bool isDefault = dataPoint.IsDefault;
- //Set the default marker type
- dataPoint.IsDefaultmarkertype = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Stacked_3D
- 'Get the serie data point
- Dim dataPoint As IOfficeChartDataPoint = chart.Series(0).DataPoints.DefaultDataPoint
- 'Gets the index of data point from points collection
- Dim index As Integer = dataPoint.Index
- 'Check if the point is default data point
- Dim isDefault As Boolean = dataPoint.IsDefault
- 'Set the default marker type
- dataPoint.IsDefaultmarkertype = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IOfficeChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the series data points
- IOfficeChartDataPoints dataPoints = chart.Series[0].DataPoints;
- //Get the default data point, read only
- IOfficeChartDataPoint dataPoint = dataPoints.DefaultDataPoint;
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Set the series name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IOfficeChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the series data points
- Dim dataPoints As IOfficeChartDataPoints = chart.Series(0).DataPoints
- 'Get the default data point, read only
- Dim dataPoint As IOfficeChartDataPoint = dataPoints.DefaultDataPoint
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Set the series name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IOfficeChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the series data points
- IOfficeChartDataPoints dataPoints = chart.Series[0].DataPoints;
- //Get the data point using the index, read only
- IOfficeChartDataPoint dataPoint = dataPoints[0];
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Set the series name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IOfficeChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the series data points
- Dim dataPoints As IOfficeChartDataPoints = chart.Series(0).DataPoints
- 'Get the data point using the index, read only
- Dim dataPoint As IOfficeChartDataPoint = dataPoints(0)
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Set the series name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Get data from the chart using specific RowIndex and columnIndex
- object value = chart.DataRange.GetValue(2, 3);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Get data from the chart using specific RowIndex and columnIndex
- object value = chart.DataRange.GetValue(2, 3,true);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- //Set the chart type
- chart.ChartType = OfficeChartType.Area;
- //Get the first and last row
- int _firstRow = chart.DataRange.FirstRow;
- int _lastRow = chart.DataRange.LastRow;
- //Get the first and last column
- int _firstColumn = chart.DataRange.FirstColumn;
- int _lastColumn = chart.DataRange.LastColumn;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the borders
- datatable.HasBorders = true;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Set the horizontal border
- datatable.HasHorzBorder = true;
- //Set the vertical border
- datatable.HasVertBorder = true;
- //Set the series keys
- datatable.ShowSeriesKeys = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Set the horizontal border
- datatable.HasHorzBorder = True
- 'Set the vertical border
- datatable.HasVertBorder = True
- 'Set the series keys
- datatable.ShowSeriesKeys = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Enable the chart data table
- chart.HasDataTable = true;
- //Get the data table of chart
- IOfficeChartDataTable datatable = chart.DataTable;
- //Get the text area of data table
- IOfficeChartTextArea textArea = datatable.TextArea;
- //Set the color of text area
- textArea.Color = OfficeKnownColors.Violet;
- //Set the font name
- textArea.FontName = "Helvetica";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Enable the chart data table
- chart.HasDataTable = True
- 'Get the data table of chart
- Dim datatable As IOfficeChartDataTable = chart.DataTable
- 'Get the text area of data table
- Dim textArea As IOfficeChartTextArea = datatable.TextArea
- 'Set the color of text area
- textArea.Color = OfficeKnownColors.Violet
- 'Set the font name
- textArea.FontName = "Helvetica"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Check interior object, read only
- bool interior = chartFill.HasInterior;
- //Check for 3D properties, read only
- bool _3DProperties = chartFill.Has3dProperties;
- //Check the line properties, read only
- bool lineProps = chartFill.HasLineProperties;
- //Check the shadow properties, read only
- bool shadowProps = chartFill.HasShadowProperties;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Check interior object, read only
- Dim interior As Boolean = chartFill.HasInterior
- 'Check for 3D properties, read only
- Dim _3DProperties As Boolean = chartFill.Has3dProperties
- 'Check the line properties, read only
- Dim lineProps As Boolean = chartFill.HasLineProperties
- 'Check the shadow properties, read only
- Dim shadowProps As Boolean = chartFill.HasShadowProperties
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill
- IOfficeChartBorder line = chartFill.LineProperties;
- //Set the line color
- line.LineColor = System.Drawing.Color.DarkGreen;
- //Set the line weight
- line.LineWeight = OfficeChartLineWeight.Wide;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill
- Dim line As IOfficeChartBorder = chartFill.LineProperties
- 'Set the line color
- line.LineColor = System.Drawing.Color.DarkGreen
- 'Set the line weight
- line.LineWeight = OfficeChartLineWeight.Wide
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the interior of chart fill
- IOfficeChartInterior _interior = chartFill.Interior;
- //Enable the automatic format
- _interior.UseAutomaticFormat = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the interior of chart fill
- Dim _interior As IOfficeChartInterior = chartFill.Interior
- 'Enable the automatic format
- _interior.UseAutomaticFormat = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the line properties of chart fill, read only
- IOfficeFill fill = chartFill.Fill;
- //set the fill type as pattern
- fill.FillType = OfficeFillType.Pattern;
- //Set the back color
- fill.BackColor = Color.Red;
- //Set the fore color
- fill.ForeColor = Color.Yellow;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the line properties of chart fill, read only
- Dim fill As IOfficeFill = chartFill.Fill
- 'set the fill type as pattern
- fill.FillType = OfficeFillType.Pattern
- 'Set the back color
- fill.BackColor = System.Drawing.Color.Red
- 'Set the fore color
- fill.ForeColor = System.Drawing.Color.Yellow
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the shadow properties
- IThreeDFormat _3Dimension = chartFill.ThreeD;
- //Set the 3D properties
- _3Dimension.BevelBottom = Office2007ChartBevelProperties.HardEdge;
- _3Dimension.BevelBottomHeight = 140;
- _3Dimension.BevelBottomWidth = 67;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the shadow properties
- Dim _3Dimension As IThreeDFormat = chartFill.ThreeD
- 'Set the 3D properties
- _3Dimension.BevelBottom = Office2007ChartBevelProperties.HardEdge
- _3Dimension.BevelBottomHeight = 140
- _3Dimension.BevelBottomWidth = 67
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the serie format
- IOfficeChartFillBorder chartFill = chart.Series[0].SerieFormat;
- //Get the shadow properties
- IShadow shadow = chartFill.Shadow;
- //Set the custom shadow style
- shadow.HasCustomShadowStyle = true;
- //set the shadow color
- shadow.ShadowColor = System.Drawing.Color.Green;
- //Set the shadow with inner preset
- shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the serie format
- Dim chartFill As IOfficeChartFillBorder = chart.Series(0).SerieFormat
- 'Get the shadow properties
- Dim shadow As IShadow = chartFill.Shadow
- 'Set the custom shadow style
- shadow.HasCustomShadowStyle = True
- 'set the shadow color
- shadow.ShadowColor = System.Drawing.Color.Green
- 'Set the shadow with inner preset
- shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the chart serie option
- IOfficeChartFormat chartFormat = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Get the First Drop Bar
- IOfficeChartDropBar dropBar = chartFormat.FirstDropBar;
- //Set the gap width of data series in chart
- dropBar.Gap = 100;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation__1.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the chart serie option
- Dim chartFormat As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Get the First Drop Bar
- Dim dropBar As IOfficeChartDropBar = chartFormat.FirstDropBar
- 'Set the gap width of data series in chart
- dropBar.Gap = 100
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Clear formats
- errorBars.ClearFormats();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Clear formats
- errorBars.ClearFormats()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Delete the error bars
- errorBars.Delete();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Delete the error bars
- errorBars.Delete()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet;
- //Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet
- 'Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Set the cap for errorbars
- errorBars.HasCap = true;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Set the cap for errorbars
- errorBars.HasCap = True
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet;
- //Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'set the border line color
- errorBars.Border.LineColor = System.Drawing.Color.BlueViolet
- 'Set the border line weight
- errorBars.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Set the type
- errorBars.Type = OfficeErrorBarType.StandardDeviation
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus;
- //Set the number value
- errorBars.NumberValue = 12.78;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the include property
- errorBars.Include = OfficeErrorBarInclude.Minus
- 'Set the number value
- errorBars.NumberValue = 12.78
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Enable error bar X for a serie
- chart.Series[0].HasErrorBarsX = true;
- //Get the error bar X
- IOfficeChartErrorBars errorBars = chart.Series[0].ErrorBarsX;
- //Set the shadow color
- errorBars.Shadow.ShadowColor = System.Drawing.Color.Brown;
- //Set the inner preset of shadow
- errorBars.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight;
- //Set the size of the shadow
- errorBars.Shadow.Size = 34;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Enable error bar X for a serie
- chart.Series(0).HasErrorBarsX = True
- 'Get the error bar X
- Dim errorBars As IOfficeChartErrorBars = chart.Series(0).ErrorBarsX
- 'Set the shadow color
- errorBars.Shadow.ShadowColor = System.Drawing.Color.Brown
- 'Set the inner preset of shadow
- errorBars.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalBottomRight
- 'Set the size of the shadow
- errorBars.Shadow.Size = 34
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the picture fill type for plot area
- chart.PlotArea.Fill.UserPicture("Image.gif");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create instance for image
- System.Drawing.Image image = System.Drawing.Image.FromFile("Image.gif");
- //Set the picture fill type for chart area
- chart.ChartArea.Fill.UserPicture(image, "Image");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create instance for image
- System.Drawing.Image image = System.Drawing.Image.FromFile("Image.gif");
- //Set the texture fill type for chart area
- chart.ChartArea.Fill.UserTexture(image, "Image");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the texture fill type for plot area
- chart.PlotArea.Fill.UserTexture("Image.gif");
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the pattern fill for chart area
- chart.ChartArea.Fill.Patterned(OfficeGradientPattern.Pat_50_Percent);
- //Set the fore color
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Set the back color
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Pink;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset gradient
- chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Early_Sunset);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset gradient
- chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Parchment, OfficeGradientStyle.Horizontal);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset gradient
- chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Fire, OfficeGradientStyle.FromCorner, OfficeGradientVariants.ShadingVariants_1);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the preset texture
- chart.ChartArea.Fill.PresetTextured(OfficeTexture.Canvas);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the gradient color
- chart.ChartArea.Fill.TwoColorGradient();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the gradient color
- chart.ChartArea.Fill.TwoColorGradient(OfficeGradientStyle.Horizontal);
- //Set the fore color index
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.BlueCustom;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the gradient color
- chart.ChartArea.Fill.TwoColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
- //Set the fore color index
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.BlueCustom;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Se the specified fill to one color gradient
- chart.ChartArea.Fill.OneColorGradient();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Se the specified fill to one color gradient
- chart.ChartArea.Fill.OneColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
- //Set the fill type for plot area
- chart.PlotArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color for plot area
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Se the specified fill to one color gradient
- chart.PlotArea.Fill.OneColorGradient(OfficeGradientStyle.Diagonl_Up);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Se the specified fill to one color gradient
- chart.ChartArea.Fill.OneColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
- //Set the fill type for plot area
- chart.PlotArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color for plot area
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Se the specified fill to one color gradient
- chart.PlotArea.Fill.OneColorGradient(OfficeGradientStyle.Diagonl_Up);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the solid fill for chart area
- chart.ChartArea.Fill.Solid();
- //Set the fore color for chart area
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
- //Set the Back and fore colors
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
- //Set the Back and fore colors
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color index of the fill
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Brown;
- //Set the gradient variant
- chart.ChartArea.Fill.GradientVariant = OfficeGradientVariants.ShadingVariants_2;
- //Set the preset gradient type
- chart.ChartArea.Fill.PresetGradientType = OfficeGradientPreset.Grad_Desert;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
- //Set the Back and fore colors
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
- //Set the back anf fore color of the pattern
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
- //Set the pattern
- chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.OneColor;
- //Set the gradient degree
- chart.ChartArea.Fill.GradientDegree = 0.67;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.Horizontal;
- //Set the fore color index of the fill
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
- //Set the back anf fore color of the pattern
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
- //Set the pattern
- chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
- //Set the back anf fore color of the pattern
- chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
- chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
- //Set the pattern
- chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the fore color index of the fill
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Brown;
- //Set the gradient variant
- chart.ChartArea.Fill.GradientVariant = OfficeGradientVariants.ShadingVariants_2;
- //Set the preset gradient type
- chart.ChartArea.Fill.PresetGradientType = OfficeGradientPreset.Grad_Desert;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
- //Set the gradient color type
- chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.OneColor;
- //Set the gradient degree
- chart.ChartArea.Fill.GradientDegree = 0.67;
- //Set the gradient style
- chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.Horizontal;
- //chart.ChartArea.Fill.BackColorIndex = OfficeKnownColors.Blue;
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type of the chart area
- chart.ChartArea.Fill.FillType = OfficeFillType.SolidColor;
- //chart.ChartArea.Fill.BackColorIndex = OfficeKnownColors.Blue;
- chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
- //Set the transparency of the fill
- chart.ChartArea.Fill.Transparency = 0.5;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the fill type as texture
- chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
- //Set the texture type
- chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
- //Set the horizontal scale
- chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
- //Set the offset X
- chart.ChartArea.Fill.TextureOffsetX = 50.40F;
- //Set the offset Y
- chart.ChartArea.Fill.TextureOffsetY = 67.54F;
- //Set the vertical scale
- chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the bubble scale
- format.BubbleScale = 200;
- //Set the vary color
- format.IsVaryColor = true;
- //Set negative bubbles
- format.ShowNegativeBubbles = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the bubble scale
- format.BubbleScale = 200
- 'Set the vary color
- format.IsVaryColor = True
- 'Set negative bubbles
- format.ShowNegativeBubbles = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the gap width
- format.GapWidth = 200;
- //Set the overlap
- format.Overlap = -90;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the gap width
- format.GapWidth = 200
- 'Set the overlap
- format.Overlap = -90
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Pie
- chart.ChartType = OfficeChartType.Pie;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the angle of first slice
- format.FirstSliceAngle = 240;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Pie
- chart.ChartType = OfficeChartType.Pie
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the angle of first slice
- format.FirstSliceAngle = 240
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Doughtnut
- chart.ChartType = OfficeChartType.Doughnut;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the doughnut hole size
- format.DoughnutHoleSize = 50;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Doughtnut
- chart.ChartType = OfficeChartType.Doughnut
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the doughnut hole size
- format.DoughnutHoleSize = 50
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the bubble scale
- format.BubbleScale = 200;
- //Set the vary color
- format.IsVaryColor = true;
- //Set negative bubbles
- format.ShowNegativeBubbles = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the bubble scale
- format.BubbleScale = 200
- 'Set the vary color
- format.IsVaryColor = True
- 'Set negative bubbles
- format.ShowNegativeBubbles = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the bubble scale
- format.BubbleScale = 200;
- //Set the vary color
- format.IsVaryColor = true;
- //Set negative bubbles
- format.ShowNegativeBubbles = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the bubble scale
- format.BubbleScale = 200
- 'Set the vary color
- format.IsVaryColor = True
- 'Set negative bubbles
- format.ShowNegativeBubbles = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar;
- //Set the serie format of chart
- IOfficeChartFormat format = chart.Series[0].SerieFormat.CommonSerieOptions;
- //Set the axis labels
- format.HasRadarAxisLabels = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar
- 'Set the serie format of chart
- Dim format As IOfficeChartFormat = chart.Series(0).SerieFormat.CommonSerieOptions
- 'Set the axis labels
- format.HasRadarAxisLabels = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set border settings
- chart.PlotArea.Border.AutoFormat = false;
- //Set the auto line color
- chart.PlotArea.Border.IsAutoLineColor = false;
- //Set the border line color
- chart.PlotArea.Border.LineColor = System.Drawing.Color.Blue;
- //Set the border line pattern
- chart.PlotArea.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the border line weight
- chart.PlotArea.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Set the border transparency
- chart.PlotArea.Border.Transparency = 0.6;
- //Set the plot area�s fill type
- chart.PlotArea.Fill.FillType = OfficeFillType.SolidColor;
- //Set the plot area�s fill color
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.LightPink;
- //Set the plot area shodow presence
- chart.PlotArea.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalTopLeft;
- //Reset the plotarea
- chart.PlotArea.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set border settings
- chart.PlotArea.Border.AutoFormat = False
- 'Set the auto line color
- chart.PlotArea.Border.IsAutoLineColor = False
- 'Set the border line color
- chart.PlotArea.Border.LineColor = System.Drawing.Color.Blue
- 'Set the border line pattern
- chart.PlotArea.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the border line weight
- chart.PlotArea.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Set the border transparency
- chart.PlotArea.Border.Transparency = 0.6
- 'Set the plot area�s fill type
- chart.PlotArea.Fill.FillType = OfficeFillType.SolidColor
- 'Set the plot area�s fill color
- chart.PlotArea.Fill.ForeColor = System.Drawing.Color.LightPink
- 'Set the plot area shodow presence
- chart.PlotArea.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalTopLeft
- 'Reset the plotarea
- chart.PlotArea.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Set the borders with rounded corners
- chart.ChartArea.IsBorderCornersRound = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Set the borders with rounded corners
- chart.ChartArea.IsBorderCornersRound = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Format Chart Area.
- IOfficeChartFrameFormat chartArea = chart.ChartArea;
- //Chart Area Border Settings
- //Style
- chartArea.Border.LinePattern = OfficeChartLinePattern.Solid;
- //Color
- chartArea.Border.LineColor = System.Drawing.Color.Blue;
- //Weight
- chartArea.Border.LineWeight = OfficeChartLineWeight.Hairline;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Format Chart Area.
- Dim chartArea As IOfficeChartFrameFormat = chart.ChartArea
- 'Chart Area Border Settings
- 'Style
- chartArea.Border.LinePattern = OfficeChartLinePattern.Solid
- 'Color
- chartArea.Border.LineColor = System.Drawing.Color.Blue
- 'Weight
- chartArea.Border.LineWeight = OfficeChartLineWeight.Hairline
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get a bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Format Plot Area
- IOfficeChartFrameFormat plotArea = chart.PlotArea;
- //Set the height mode
- plotArea.Layout.Height = 150;
- plotArea.Layout.HeightMode = LayoutModes.factor;
- //Set the top mode
- plotArea.Layout.Top = 100;
- plotArea.Layout.TopMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get a bubble chart from the slide
- Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
- 'Format Plot Area
- Dim plotArea As IOfficeChartFrameFormat = chart.PlotArea
- 'Set the height mode
- plotArea.Layout.Height = 150
- plotArea.Layout.HeightMode = LayoutModes.factor
- 'Set the top mode
- plotArea.Layout.Top = 100
- plotArea.Layout.TopMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Delete gridline
- chart.PrimaryValueAxis.MajorGridLines.Delete();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Delete gridline
- chart.PrimaryValueAxis.MajorGridLines.Delete()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Get the major grid line
- IOfficeChartGridLine gridLine = chart.PrimaryValueAxis.MajorGridLines;
- //Set the line pattern
- gridLine.Border.LinePattern = OfficeChartLinePattern.DarkGray;
- //Set the line weight
- gridLine.Border.LineWeight = OfficeChartLineWeight.Hairline;
- //Set the line color
- gridLine.Border.LineColor = System.Drawing.Color.Green;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Get the major grid line
- Dim gridLine As IOfficeChartGridLine = chart.PrimaryValueAxis.MajorGridLines
- 'Set the line pattern
- gridLine.Border.LinePattern = OfficeChartLinePattern.DarkGray
- 'Set the line weight
- gridLine.Border.LineWeight = OfficeChartLineWeight.Hairline
- 'Set the line color
- gridLine.Border.LineColor = System.Drawing.Color.Green
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation containing charts
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the slide from presentation
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Charts[0];
- //Refresh the chart to set worksheet data to current chart
- chart.Refresh();
- //Save the presentation
- presentation.Save("Sample.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation containing charts
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- 'Get the slide from presentation
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Refresh the chart to set worksheet data to current chart
- chart.Refresh()
- 'Save the presentation
- presentation.Save("Sample.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Initialize the ChartToImageConverter class; this is mandatory
- presentation.ChartToImageConverter = new ChartToImageConverter();
- //Set the scaling mode for quality
- presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best;
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Create a stream instance to store the image
- MemoryStream stream = new MemoryStream();
- //Save the image to stream
- chart.SaveAsImage(stream);
- //Save the stream to a file
- using (FileStream fileStream = File.Create("ChartImage.png", (int)stream.Length))
- fileStream.Write(stream.ToArray(), 0, stream.ToArray().Length);
- //Close the stream
- stream.Close();
- //Save the Presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- 'Initialize the ChartToImageConverter class; this is mandatory
- presentation.ChartToImageConverter = New ChartToImageConverter()
- 'Set the scaling mode for quality
- presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Create a stream instance to store the image
- Dim stream As New MemoryStream()
- 'Save the image to stream
- chart.SaveAsImage(stream)
- 'Save the stream to a file
- Using fileStream As FileStream = File.Create("ChartImage.png", CInt(stream.Length))
- fileStream.Write(stream.ToArray(), 0, stream.ToArray().Length)
- End Using
- 'Close the stream
- stream.Close()
- 'Save the Presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a new PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 200);
- //Create an instance of object array
- object[][] chartData = { new object[3], new object[4] };
- //Invoke setChartData method by passing object array
- chart.SetChartData(chartData);
- //Set the chart title
- chart.ChartTitle = "Chart";
- //Save the Presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a new PowerPoint presentation
- Dim presentation As IPresentation = Presentation.Create()
- 'Add slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 100, 300, 200)
- 'Create an instance of object array
- Dim chartData As Object()() = {New Object(2) {}, New Object(3) {}}
- 'Invoke setChartData method by passing object array
- chart.SetChartData(chartData)
- 'Set the chart title
- chart.ChartTitle = "Chart"
- 'Save the Presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a new PowerPoint presentation
- IPresentation presentation = Presentation.Create();
- //Add slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Charts.AddChart(100, 100, 300, 300);
- //Create an instance of object array
- object[][] dataRange = { new object[5], new object[5] };
- //Invoke set data Range method
- chart.SetDataRange(dataRange, 1, 3);
- //Save the Presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a new PowerPoint presentation
- Dim presentation As IPresentation = Presentation.Create()
- 'Add slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart= slide.Charts.AddChart(100, 100, 300, 300)
- 'Create an instance of object array
- Dim dataRange As Object()() = {New Object(4) {}, New Object(4) {}}
- 'Invoke set data Range method
- chart.SetDataRange(dataRange, 1, 3)
- 'Save the Presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- chart.ChartType = OfficeChartType.Area;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Shapes.AddChart(100, 120, 500, 300)
- 'Sets the data range of chart
- chart.DataRange = chart.ChartData(1, 2, 4, 3)
- 'Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012")
- chart.ChartData.SetValue(2, 2, 330)
- chart.ChartData.SetValue(3, 2, 490)
- chart.ChartData.SetValue(4, 2, 700)
- chart.ChartType = OfficeChartType.Area
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Get the chart title text area
- IOfficeChartTextArea textArea = chart.ChartTitleArea;
- //Set the background mode of the title area
- textArea.BackgroundMode = OfficeChartBackgroundMode.Transparent;
- //Set bold font style
- textArea.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Get the chart title text area
- Dim textArea As IOfficeChartTextArea = chart.ChartTitleArea
- 'Set the background mode of the title area
- textArea.BackgroundMode = OfficeChartBackgroundMode.Transparent
- 'Set bold font style
- textArea.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the x - position of the chart
- chart.XPos = 300;
- //Set the y - position of the chart
- chart.YPos = 140;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the x - position of the chart
- chart.XPos = 300
- 'Set the y - position of the chart
- chart.YPos = 140
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the x - position of the chart
- chart.XPos = 300;
- //Set the y - position of the chart
- chart.YPos = 140;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the x - position of the chart
- chart.XPos = 300
- 'Set the y - position of the chart
- chart.YPos = 140
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary category axis
- IOfficeChartCategoryAxis primaryCategoryAxis = chart.PrimaryCategoryAxis;
- //Set the data range of the category axis
- primaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary category axis
- Dim primaryCategoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the data range of the category axis
- primaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the primary value axis
- IOfficeChartValueAxis primaryValueAxis = chart.PrimaryValueAxis;
- //Set bold font style
- primaryValueAxis.Font.Bold = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the primary value axis
- Dim primaryValueAxis As IOfficeChartValueAxis = chart.PrimaryValueAxis
- 'Set bold font style
- primaryValueAxis.Font.Bold = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Get the primary serie axis
- IOfficeChartSeriesAxis primarySerieAxis = chart.PrimarySerieAxis;
- //Set the font style of serie axis
- primarySerieAxis.Font.Italic = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Get the primary serie axis
- Dim primarySerieAxis As IOfficeChartSeriesAxis = chart.PrimarySerieAxis
- 'Set the font style of serie axis
- primarySerieAxis.Font.Italic = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open a presentation with Combinational chart type
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the secondary category axis
- IOfficeChartCategoryAxis secondaryCategoryAxis = chart.PrimaryCategoryAxis;
- //Set the minor grid lines
- secondaryCategoryAxis.HasMinorGridLines = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation with Combinational chart type
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the secondary category axis
- Dim secondaryCategoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
- 'Set the minor grid lines
- secondaryCategoryAxis.HasMinorGridLines = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open a presentation with Combinational chart type
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Get the secondary value axis
- IOfficeChartValueAxis secondaryValueAxis = chart.SecondaryValueAxis;
- //Set the tick label position
- secondaryValueAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation with Combinational chart type
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Get the secondary value axis
- Dim secondaryValueAxis As IOfficeChartValueAxis = chart.SecondaryValueAxis
- 'Set the tick label position
- secondaryValueAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a new presentation
- IPresentation presentation = Presentation.Create();
- //Add slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 100, 400, 300);
- //Set the chart data value
- chart.ChartData.SetValue(1, 2, "1");
- chart.ChartData.SetValue(2, 1, "A");
- chart.ChartData.SetValue(2, 2, 20);
- //Set chart data range
- chart.DataRange = chart.ChartData[2, 2, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Get the chart area
- IOfficeChartFrameFormat chartArea = chart.ChartArea;
- //Set the line pattern of chart border
- chartArea.Border.LinePattern = OfficeChartLinePattern.DashDotDot;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a new presentation
- Dim presentation As IPresentation = Presentation.Create()
- 'Add slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Shapes.AddChart(100, 100, 400, 300)
- 'Set the chart data value
- chart.ChartData.SetValue(1, 2, "1")
- chart.ChartData.SetValue(2, 1, "A")
- chart.ChartData.SetValue(2, 2, 20)
- 'Set chart data range
- chart.DataRange = chart.ChartData(2, 2, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Get the chart area
- Dim chartArea As IOfficeChartFrameFormat = chart.ChartArea
- 'Set the line pattern of chart border
- chartArea.Border.LinePattern = OfficeChartLinePattern.DashDotDot
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the fill type of wall as pattern
- chart.Walls.Fill.FillType = OfficeFillType.Pattern;
- //set the back color of the pattern fill
- chart.Walls.Fill.BackColor = Color.AliceBlue;
- //Set the fore color of the pattern fill
- chart.Walls.Fill.ForeColor = Color.Brown;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the fill type of wall as pattern
- chart.Walls.Fill.FillType = OfficeFillType.Pattern
- 'set the back color of the pattern fill
- chart.Walls.Fill.BackColor = Color.AliceBlue
- 'Set the fore color of the pattern fill
- chart.Walls.Fill.ForeColor = Color.Brown
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Set the rotation
- chart.Rotation = 80;
- //Set the shadow angle
- chart.SideWall.Shadow.Angle = 60;
- //Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow;
- //Save the presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D
- 'Set the rotation
- chart.Rotation = 80
- 'Set the shadow angle
- chart.SideWall.Shadow.Angle = 60
- 'Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow
- 'Save the presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Get the back wall of the chart
- IOfficeChartWallOrFloor backWall = chart.BackWall;
- //Set the line properties of the back wall
- backWall.LineProperties.LineWeight = OfficeChartLineWeight.Narrow;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Get the back wall of the chart
- Dim backWall As IOfficeChartWallOrFloor = chart.BackWall
- 'Set the line properties of the back wall
- backWall.LineProperties.LineWeight = OfficeChartLineWeight.Narrow
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Get the floor of chart
- IOfficeChartWallOrFloor floor = chart.Floor;
- //Set the filltype of floor as pattern fill
- floor.Fill.FillType = OfficeFillType.Pattern;
- //Set the back and fore color of the pattern fill
- floor.Fill.BackColor = Color.Blue;
- floor.Fill.ForeColor = Color.Brown;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Get the floor of chart
- Dim floor As IOfficeChartWallOrFloor = chart.Floor
- 'Set the filltype of floor as pattern fill
- floor.Fill.FillType = OfficeFillType.Pattern
- 'Set the back and fore color of the pattern fill
- floor.Fill.BackColor = Color.Blue
- floor.Fill.ForeColor = Color.Brown
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Set the chart with data table
- chart.HasDataTable = true;
- //Get the data table, read only
- IOfficeChartDataTable dataTable = chart.DataTable;
- //set borders for data table
- dataTable.HasBorders = true;
- //Set the show serie keys
- dataTable.ShowSeriesKeys = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Set the chart with data table
- chart.HasDataTable = True
- 'Get the data table, read only
- Dim dataTable As IOfficeChartDataTable = chart.DataTable
- 'set borders for data table
- dataTable.HasBorders = True
- 'Set the show serie keys
- dataTable.ShowSeriesKeys = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Modify the chart height
- chart.Height = 500;
- //Modify the chart width
- chart.Width = 700;
- //Change the title
- chart.ChartTitle = "New title";
- //Change the serie name of first chart serie
- chart.Series[0].Name = "Modified serie name";
- //Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone;
- //Show Data Table.
- chart.HasDataTable = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Modify the chart height
- chart.Height = 500
- 'Modify the chart width
- chart.Width = 700
- 'Change the title
- chart.ChartTitle = "New title"
- 'Change the serie name of first chart serie
- chart.Series(0).Name = "Modified serie name"
- 'Hiding the category labels
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelNone
- 'Show Data Table.
- chart.HasDataTable = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to slide
- IPresentationChart chart = slide.Shapes.AddChart(100, 120, 500, 300);
- //Sets the data range of chart
- chart.DataRange = chart.ChartData[1, 2, 4, 3];
- //Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012");
- chart.ChartData.SetValue(2, 2, 330);
- chart.ChartData.SetValue(3, 2, 490);
- chart.ChartData.SetValue(4, 2, 700);
- chart.ChartType = OfficeChartType.Area;
- //Edge: Specifies that the width or Height will be interpreted as right or bottom of the chart element
- //Factor: Specifies that the width or Height will be interpreted as the width or height of the chart element
- chart.PlotArea.Layout.LeftMode = LayoutModes.auto;
- chart.PlotArea.Layout.TopMode = LayoutModes.factor;
- //Value in points should not be a negative value if LayoutMode is Edge
- //It can be a negative value if the LayoutMode is Factor.
- chart.ChartTitleArea.Layout.Left = 10;
- chart.ChartTitleArea.Layout.Top = 100;
- //Manually positioning chart plot area
- chart.PlotArea.Layout.LayoutTarget = LayoutTargets.outer;
- chart.PlotArea.Layout.LeftMode = LayoutModes.edge;
- chart.PlotArea.Layout.TopMode = LayoutModes.edge;
- //Manually positioning chart legend
- chart.Legend.Layout.LeftMode = LayoutModes.factor;
- chart.Legend.Layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to slide
- Dim chart As IPresentationChart = slide.Shapes.AddChart(100, 120, 500, 300)
- 'Sets the data range of chart
- chart.DataRange = chart.ChartData(1, 2, 4, 3)
- 'Set data to the chart- RowIndex, columnIndex and data
- chart.ChartData.SetValue(1, 2, "2012")
- chart.ChartData.SetValue(2, 2, 330)
- chart.ChartData.SetValue(3, 2, 490)
- chart.ChartData.SetValue(4, 2, 700)
- chart.ChartType = OfficeChartType.Area
- 'Edge: Specifies that the width or Height will be interpreted as right or bottom of the chart element
- 'Factor: Specifies that the width or Height will be interpreted as the width or height of the chart element
- chart.PlotArea.Layout.LeftMode = LayoutModes.auto
- chart.PlotArea.Layout.TopMode = LayoutModes.factor
- 'Value in points should not be a negative value if LayoutMode is Edge
- 'It can be a negative value if the LayoutMode is Factor.
- chart.ChartTitleArea.Layout.Left = 10
- chart.ChartTitleArea.Layout.Top = 100
- 'Manually positioning chart plot area
- chart.PlotArea.Layout.LayoutTarget = LayoutTargets.outer
- chart.PlotArea.Layout.LeftMode = LayoutModes.edge
- chart.PlotArea.Layout.TopMode = LayoutModes.edge
- 'Manually positioning chart legend
- chart.Legend.Layout.LeftMode = LayoutModes.factor
- chart.Legend.Layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Hide the legend
- chart.HasLegend = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Hide the legend
- chart.HasLegend = False
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Hide the chart title
- chart.HasTitle = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Hide the chart title
- chart.HasTitle = False
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open the presentation
- IPresentation presentation = Presentation.Open("Sample.pptx");
- //Get the first slide
- ISlide slide = presentation.Slides[0];
- //Get the chart in slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Set the rotation
- chart.Rotation = 80;
- //Set the shadow angle
- chart.SideWall.Shadow.Angle = 60;
- //Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow;
- //Save the presentation
- presentation.Save("output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open the presentation
- Dim presentation As IPresentation = Presentation.Open("Sample.pptx")
- 'Get the first slide
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart in slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D
- 'Set the rotation
- chart.Rotation = 80
- 'Set the shadow angle
- chart.SideWall.Shadow.Angle = 60
- 'Set the backwall border weight
- chart.BackWall.Border.LineWeight = OfficeChartLineWeight.Narrow
- 'Save the presentation
- presentation.Save("output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the elevation of chart
- chart.Elevation = -50;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the elevation of chart
- chart.Elevation = -50
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the perspective
- chart.Perspective = 100;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the perspective of chart
- chart.Perspective = 100
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the height percent
- chart.HeightPercent = 400;
- //Set the Depth percent
- chart.DepthPercent = 200;
- //Set the gap depth of data series
- chart.GapDepth = 400;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the height percent
- chart.HeightPercent = 400
- 'Set the Depth percent
- chart.DepthPercent = 200
- 'Set the gap depth of data series
- chart.GapDepth = 400
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the height percent
- chart.HeightPercent = 400;
- //Set the Depth percent
- chart.DepthPercent = 200;
- //Set the gap depth of data series
- chart.GapDepth = 400;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the height percent
- chart.HeightPercent = 400
- 'Set the Depth percent
- chart.DepthPercent = 200
- 'Set the gap depth of data series
- chart.GapDepth = 400
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the height percent
- chart.HeightPercent = 400;
- //Set the Depth percent
- chart.DepthPercent = 200;
- //Set the gap depth of data series
- chart.GapDepth = 400;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the height percent
- chart.HeightPercent = 400
- 'Set the Depth percent
- chart.DepthPercent = 200
- 'Set the gap depth of data series
- chart.GapDepth = 400
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the right angle axes
- chart.RightAngleAxes = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the right angle axes
- chart.RightAngleAxes = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Set the right angle axes property of the chart
- chart.RightAngleAxes = true;
- //Set the auto scaling of chart
- chart.AutoScaling = true;
- //Save the presentation
- presentation.Save("sample.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the right angle axes
- chart.RightAngleAxes = True
- 'Set the auto scaling of chart
- chart.AutoScaling = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the 2D gridlines for chart
- chart.WallsAndGridlines2D = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the 2D gridlines for chart
- chart.WallsAndGridlines2D = True
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the way blank cells to be plotted
- chart.DisplayBlanksAs = OfficeChartPlotEmpty.Interpolated;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the way blank cells to be plotted
- chart.DisplayBlanksAs = OfficeChartPlotEmpty.Interpolated
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Hide the plot visiblity of cells
- chart.PlotVisibleOnly = false;
- //Hide the chart size with sheet window
- chart.SizeWithWindow = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Hide the plot visiblity of cells
- chart.PlotVisibleOnly = False
- 'Hide the chart size with sheet window
- chart.SizeWithWindow = False
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- IPresentation presentation = Presentation.Open("Template.pptx");
- ISlide slide = presentation.Slides[0];
- //Get the chart from slide
- IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
- //set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Hide the plot visiblity of cells
- chart.PlotVisibleOnly = false;
- //Hide the chart size with sheet window
- chart.SizeWithWindow = false;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation As IPresentation = Presentation.Open("Template.pptx")
- Dim slide As ISlide = presentation.Slides(0)
- 'Get the chart from slide
- Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
- 'set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Hide the plot visiblity of cells
- chart.PlotVisibleOnly = False
- 'Hide the chart size with sheet window
- chart.SizeWithWindow = False
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the serie name level
- chart.SeriesNameLevel = OfficeSeriesNameLevel.SeriesNameLevelNone;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the serie name level
- chart.SeriesNameLevel = OfficeSeriesNameLevel.SeriesNameLevelNone
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D;
- //Set the category label level
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelAll;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Surface_3D
- 'Set the category label level
- chart.CategoryLabelLevel = OfficeCategoriesLabelLevel.CategoriesLabelLevelAll
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //set the chart style
- chart.Style = 14;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'set the chart style
- chart.Style = 14
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the data range of the category axis
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
- 'Save the presentation
- presentation.Save("Output.pptx")
- 'Close the presentation
- presentation.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Modify the legend layout height
- layout.Height = 120;
- //Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout width
- layout.Width = 100;
- //Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge;
- //Modify the legend layout left position
- layout.Left = 100;
- //Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- layout.Top = 100;
- //Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Modify the legend layout height
- layout.Height = 120
- 'Modify the legend layout height mode
- layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout width
- layout.Width = 100
- 'Modify the legend layout width mode
- layout.WidthMode = LayoutModes.edge
- 'Modify the legend layout left position
- layout.Left = 100
- 'Modify the legend layout left mode
- layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- layout.Top = 100
- 'Modify the legend layout top mode
- layout.TopMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the legend entries
- IChartLegendEntries legendEntries = chart.Legend.LegendEntries;
- //Get the count of the legend entries
- int count = legendEntries.Count;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the legend entries
- Dim legendEntries As IChartLegendEntries = chart.Legend.LegendEntries
- 'Get the count of the legend entries
- Dim count As Integer = legendEntries.Count
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the legend entries
- IChartLegendEntries legendEntries = chart.Legend.LegendEntries;
- //Get the count of the legend entries
- int count = legendEntries.Count;
- //Set the bold style for text area
- legendEntries[0].TextArea.Bold = true;
- //Set the color of the text area
- legendEntries[0].TextArea.Color = OfficeKnownColors.Magenta;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the legend entries
- Dim legendEntries As IChartLegendEntries = chart.Legend.LegendEntries
- 'Get the count of the legend entries
- Dim count As Integer = legendEntries.Count
- 'Set the bold style for text area
- legendEntries(0).TextArea.Bold = True
- 'Set the color of the text area
- legendEntries(0).TextArea.Color = OfficeKnownColors.Magenta
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend border format
- legend.FrameFormat.Border.AutoFormat = false;
- //Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = false;
- //Set the border line color
- legend.FrameFormat.Border.LineColor = Color.Blue;
- //Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Reset the legend format
- legend.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend border format
- legend.FrameFormat.Border.AutoFormat = False
- 'Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = False
- 'Set the border line color
- legend.FrameFormat.Border.LineColor = Color.Blue
- 'Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Reset the legend format
- legend.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Delete the chart's legend
- legend.Delete();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Delete the chart's legend
- legend.Delete()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend border format
- legend.FrameFormat.Border.AutoFormat = false;
- //Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = false;
- //Set the border line color
- legend.FrameFormat.Border.LineColor = System.Drawing.Color.Blue;
- //Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot;
- //Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend border format
- legend.FrameFormat.Border.AutoFormat = False
- 'Set the legend border auto line color
- legend.FrameFormat.Border.IsAutoLineColor = False
- 'Set the border line color
- legend.FrameFormat.Border.LineColor = System.Drawing.Color.Blue
- 'Set the border line pattern
- legend.FrameFormat.Border.LinePattern = OfficeChartLinePattern.DashDot
- 'Set the legend border line weight
- legend.FrameFormat.Border.LineWeight = OfficeChartLineWeight.Wide
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the text area font weight
- legend.TextArea.Bold = true;
- //Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue;
- //Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman";
- //Set the legend text area font size
- legend.TextArea.Size = 15;
- //Set the legend text area' strike through
- legend.TextArea.Strikethrough = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the text area font weight
- legend.TextArea.Bold = True
- 'Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue
- 'Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman"
- 'Set the legend text area font size
- legend.TextArea.Size = 15
- 'Set the legend text area' strike through
- legend.TextArea.Strikethrough = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Top;
- //Set the position of legend
- legend.X = 120;
- legend.Y = 25;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Top
- 'Set the position of legend
- legend.X = 120
- legend.Y = 25
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Top;
- //Set the position of legend
- legend.X = 120;
- legend.Y = 25;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Top
- 'Set the position of legend
- legend.X = 120
- legend.Y = 25
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Left;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Left
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the legend position
- legend.Position = OfficeLegendPosition.Left;
- //Enable the vertical legend
- legend.IsVerticalLegend = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the legend position
- legend.Position = OfficeLegendPosition.Left
- 'Enable the vertical legend
- legend.IsVerticalLegend = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the text area font weight
- legend.TextArea.Bold = true;
- //Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue;
- //Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman";
- //Set the legend text area font size
- legend.TextArea.Size = 15;
- //Modify the legend entry
- legend.LegendEntries[0].IsDeleted = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the text area font weight
- legend.TextArea.Bold = True
- 'Set the legend text area forecolor
- legend.TextArea.Color = OfficeKnownColors.Sky_blue
- 'Set the legend text area font name
- legend.TextArea.FontName = "Times New Roman"
- 'Set the legend text area font size
- legend.TextArea.Size = 15
- 'Modify the legend entry
- legend.LegendEntries(0).IsDeleted = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Set the layout inclusion
- legend.IncludeInLayout = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Set the layout inclusion
- legend.IncludeInLayout = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IPresentationChart chart = presentation.Slides[0].Charts[0] as IPresentationChart;
- //Get the chart legend
- IOfficeChartLegend legend = chart.Legend;
- //Modify the legend layout height
- legend.Layout.Height = 100;
- //Modify the legend layout height mode
- legend.Layout.HeightMode = LayoutModes.factor;
- //Modify the legend layout left position
- legend.Layout.Left = 100;
- //Modify the legend layout left mode
- legend.Layout.LeftMode = LayoutModes.factor;
- //Modify the legend layout top position
- legend.Layout.Top = 100;
- //Modify the legend layout top mode
- legend.Layout.TopMode = LayoutModes.factor;
- //Modify the legend layout width
- legend.Layout.Width = 150;
- //Modify the legend layout width mode
- legend.Layout.WidthMode = LayoutModes.factor;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IPresentationChart = TryCast(presentation__1.Slides(0).Charts(0), IPresentationChart)
- 'Get the chart legend
- Dim legend As IOfficeChartLegend = chart.Legend
- 'Modify the legend layout height
- legend.Layout.Height = 100
- 'Modify the legend layout height mode
- legend.Layout.HeightMode = LayoutModes.factor
- 'Modify the legend layout left position
- legend.Layout.Left = 100
- 'Modify the legend layout left mode
- legend.Layout.LeftMode = LayoutModes.factor
- 'Modify the legend layout top position
- legend.Layout.Top = 100
- 'Modify the legend layout top mode
- legend.Layout.TopMode = LayoutModes.factor
- 'Modify the legend layout width
- legend.Layout.Width = 150
- 'Modify the legend layout width mode
- legend.Layout.WidthMode = LayoutModes.factor
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get the chart from the first slide
- IOfficeChart chart = presentation.Slides[0].Charts[0] as IOfficeChart;
- //Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top;
- //Get the legend layout
- IOfficeChartLayout layout = chart.Legend.Layout;
- //Get the manual layout
- IOfficeChartManualLayout manualLayout = layout.ManualLayout;
- //Modify the manual layout left position
- manualLayout.Left = 100;
- //Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor;
- //Modify the manual layout top position
- manualLayout.Top = 100;
- //Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor;
- //Modify the manual layout height
- manualLayout.Height = 120;
- //Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor;
- //Modify the manual layout width
- manualLayout.Width = 100;
- //Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Open a presentation
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Get the chart from the first slide
- Dim chart As IOfficeChart = TryCast(presentation__1.Slides(0).Charts(0), IOfficeChart)
- 'Set the legend position
- chart.Legend.Position = OfficeLegendPosition.Top
- 'Get the legend layout
- Dim layout As IOfficeChartLayout = chart.Legend.Layout
- 'Get the manual layout
- Dim manualLayout As IOfficeChartManualLayout = layout.ManualLayout
- 'Modify the manual layout left position
- manualLayout.Left = 100
- 'Modify the manual layout left mode
- manualLayout.LeftMode = LayoutModes.factor
- 'Modify the manual layout top position
- manualLayout.Top = 100
- 'Modify the manual layout top mode
- manualLayout.TopMode = LayoutModes.factor
- 'Modify the manual layout height
- manualLayout.Height = 120
- 'Modify the manual layout height mode
- manualLayout.HeightMode = LayoutModes.factor
- 'Modify the manual layout width
- manualLayout.Width = 100
- 'Modify the manual layout width mode
- manualLayout.WidthMode = LayoutModes.edge
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true);
- serieFeb.ErrorBar(false);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True)
- serieFeb.ErrorBar(False)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true,OfficeErrorBarInclude.Both);
- serieFeb.ErrorBar(false,OfficeErrorBarInclude.Minus);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True, OfficeErrorBarInclude.Both)
- serieFeb.ErrorBar(False, OfficeErrorBarInclude.Minus)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation);
- serieFeb.ErrorBar(false, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation)
- serieFeb.ErrorBar(False, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Add error bars to series
- serieJan.ErrorBar(true, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation, 12.34);
- serieFeb.ErrorBar(false, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError, 25.89);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Add error bars to series
- serieJan.ErrorBar(True, OfficeErrorBarInclude.Both, OfficeErrorBarType.StandardDeviation, 12.34)
- serieFeb.ErrorBar(False, OfficeErrorBarInclude.Plus, OfficeErrorBarType.StandardError, 25.89)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error bar X for serie
- serieJan.HasErrorBarsX = true;
- //Set the plus range
- serieJan.ErrorBarsX.PlusRange = chart.ChartData[2, 2, 4, 2];
- //Set the minus range
- serieJan.ErrorBarsX.MinusRange = chart.ChartData[2, 3, 4, 3];
- //Add Error bar to serie
- serieJan.ErrorBar(true, serieJan.ErrorBarsX.PlusRange, serieJan.ErrorBarsX.MinusRange);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error bar X for serie
- serieJan.HasErrorBarsX = True
- 'Set the plus range
- serieJan.ErrorBarsX.PlusRange = chart.ChartData(2, 2, 4, 2)
- 'Set the minus range
- serieJan.ErrorBarsX.MinusRange = chart.ChartData(2, 3, 4, 3)
- 'Add Error bar to serie
- serieJan.ErrorBar(True, serieJan.ErrorBarsX.PlusRange, serieJan.ErrorBarsX.MinusRange)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentationDocument = Presentation.Create();
- ISlide slide = presentationDocument.Slides.Add(SlideLayoutType.Blank);
- //Loads the excel file as stream
- Stream excelStream = File.OpenRead("Excel_Template.xlsx");
- //Creates and Appends chart to the paragraph with excel stream as parameter
- IPresentationChart chart = slide.Shapes.AddChart(excelStream, 1, "A1:C6", new RectangleF(0, 0, 470, 300));
- foreach (IOfficeChartSerie serie in chart.Series)
- {
- serie.InvertIfNegative = true;
- series.InvertIfNegativeColor = Color.Red;
- }
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 6, 1];
- //Sets chart type and title
- chart.ChartType = OfficeChartType.Bar_Clustered;
- chart.ChartTitle = "Purchase Details";
- chart.ChartTitleArea.FontName = "Calibri";
- chart.ChartTitleArea.Size = 14;
- chart.PrimaryValueAxis.CrossesAt = 1500;
- presentationDocument.Save("Output.pptx");
- presentationDocument.Close();
-
-
- Dim presentationDocument As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Loads the excel file as stream
- Dim excelStream As Stream = File.OpenRead("Excel_Template.xlsx")
- 'Creates and Appends chart to the paragraph with excel stream as parameter
- Dim chart As IPresentationChart = slide.Shapes.AddChart(excelStream, 1, "A1:C6", New RectangleF(0, 0, 470, 300))
- For Each serie As IOfficeChartSerie In chart.Series
- serie.InvertIfNegative = False
- series.InvertIfNegativeColor = Color.Red
- Next
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 6, 1)
- 'Sets chart type and title
- chart.ChartType = OfficeChartType.Bar_Clustered
- chart.ChartTitle = "Purchase Details"
- chart.ChartTitleArea.FontName = "Calibri"
- chart.ChartTitleArea.Size = 14
- chart.PrimaryValueAxis.CrossesAt = 1500
- presentationDocument.Save("Output.pptx")
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentationDocument As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentationDocument.Save("Output.pptx")
- 'Close the presentation
- presentationDocument.Close()
-
-
- IPresentation presentationDocument = Presentation.Create();
- ISlide slide = presentationDocument.Slides.Add(SlideLayoutType.Blank);
- //Loads the excel file as stream
- Stream excelStream = File.OpenRead("Excel_Template.xlsx");
- //Creates and Appends chart to the paragraph with excel stream as parameter
- IPresentationChart chart = slide.Shapes.AddChart(excelStream, 1, "A1:C6", new RectangleF(0, 0, 470, 300));
- foreach (IOfficeChartSerie serie in chart.Series)
- {
- serie.InvertIfNegative = false;
- }
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[2, 1, 6, 1];
- //Sets chart type and title
- chart.ChartType = OfficeChartType.Bar_Clustered;
- chart.ChartTitle = "Purchase Details";
- chart.ChartTitleArea.FontName = "Calibri";
- chart.ChartTitleArea.Size = 14;
- chart.PrimaryValueAxis.CrossesAt = 1500;
- presentationDocument.Save("Output.pptx");
- presentationDocument.Close();
-
-
- Dim presentationDocument As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Loads the excel file as stream
- Dim excelStream As Stream = File.OpenRead("Excel_Template.xlsx")
- 'Creates and Appends chart to the paragraph with excel stream as parameter
- Dim chart As IPresentationChart = slide.Shapes.AddChart(excelStream, 1, "A1:C6", New RectangleF(0, 0, 470, 300))
- For Each serie As IOfficeChartSerie In chart.Series
- serie.InvertIfNegative = False
- Next
- chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData(2, 1, 6, 1)
- 'Sets chart type and title
- chart.ChartType = OfficeChartType.Bar_Clustered
- chart.ChartTitle = "Purchase Details"
- chart.ChartTitleArea.FontName = "Calibri"
- chart.ChartTitleArea.Size = 14
- chart.PrimaryValueAxis.CrossesAt = 1500
- presentationDocument.Save("Output.pptx")
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of category labels
- IOfficeDataRange dataRange = chart.Series[0].CategoryLabels;
- //Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- Retrieves the range of category labels
- Dim dataRange As IOfficeDataRange = chart.Series(0).CategoryLabels
- 'Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of bubble sizes of the chart
- IOfficeDataRange dataRange = chart.Series[0].Bubbles;
- //Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the range of bubble sizes of the chart
- Dim dataRange As IOfficeDataRange = chart.Series(0).Bubbles
- 'Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar;
- //Reset the name of the serie
- serieFeb.Name = "February";
- //Get the Serie Format
- IOfficeChartSerieDataFormat serieFormat = serieFeb.SerieFormat;
- //Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar
- 'Reset the name of the serie
- serieFeb.Name = "February"
- 'Get the Serie Format
- Dim serieFormat As IOfficeChartSerieDataFormat = serieFeb.SerieFormat
- 'Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the name range of the series
- IOfficeDataRange dataRange = chart.Series[0].NameRange;
- //Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name");
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the name range of the series
- Dim dataRange As IOfficeDataRange = chart.Series(0).NameRange
- 'Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name")
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = true;
- //Add the trendline to chart serie
- serieJan.TrendLines.Add();
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()///Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = True
- 'Add the trendline to chart serie
- serieJan.TrendLines.Add()
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the series data points
- IOfficeChartDataPoints dataPoints = chart.Series[0].DataPoints;
- //Get the data point using the index, read only
- IOfficeChartDataPoint dataPoint = dataPoints[0];
- //Get the data labels of data point
- IOfficeChartDataLabels dataLabels = dataPoint.DataLabels;
- //Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center;
- //Set the series name
- dataLabels.IsSeriesName = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the series data points
- Dim dataPoints As IOfficeChartDataPoints = chart.Series(0).DataPoints
- 'Get the data point using the index, read only
- Dim dataPoint As IOfficeChartDataPoint = dataPoints(0)
- 'Get the data labels of data point
- Dim dataLabels As IOfficeChartDataLabels = dataPoint.DataLabels
- 'Set the position of the data label
- dataLabels.Position = OfficeDataLabelPosition.Center
- 'Set the series name
- dataLabels.IsSeriesName = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar;
- //Reset the name of the serie
- serieFeb.Name = "February";
- //Get the Serie Format
- IOfficeChartSerieDataFormat serieFormat = serieFeb.SerieFormat;
- //Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Radar
- chart.ChartType = OfficeChartType.Radar
- 'Reset the name of the serie
- serieFeb.Name = "February"
- 'Get the Serie Format
- Dim serieFormat As IOfficeChartSerieDataFormat = serieFeb.SerieFormat
- 'Set the radar axis labels
- serieFormat.CommonSerieOptions.HasRadarAxisLabels = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the serie type for each serie
- serieFeb.SerieType = OfficeChartType.Line;
- serieJan.SerieType = OfficeChartType.Area;
- serieMarch.SerieType = OfficeChartType.Bar_Clustered;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the serie type for each serie
- serieFeb.SerieType = OfficeChartType.Line
- serieJan.SerieType = OfficeChartType.Area
- serieMarch.SerieType = OfficeChartType.Bar_Clustered
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar Y
- serieJan.HasErrorBarsY = true;
- //Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsY.HasCap = true;
- //Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar Y
- serieJan.HasErrorBarsY = True
- 'Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsY.HasCap = True
- 'Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar Y
- serieJan.HasErrorBarsY = true;
- //Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsY.HasCap = true;
- //Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar Y
- serieJan.HasErrorBarsY = True
- 'Set the color of error barX border
- serieJan.ErrorBarsY.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsY.HasCap = True
- 'Set the include
- serieJan.ErrorBarsY.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar X
- serieJan.HasErrorBarsX = true;
- //Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsX.HasCap = true;
- //Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar X
- serieJan.HasErrorBarsX = True
- 'Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsX.HasCap = True
- 'Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line;
- //Set the error Bar X
- serieJan.HasErrorBarsX = true;
- //Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red;
- //Set the has cap
- serieJan.ErrorBarsX.HasCap = true;
- //Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type as Scatter line
- chart.ChartType = OfficeChartType.Scatter_Line
- 'Set the error Bar X
- serieJan.HasErrorBarsX = True
- 'Set the color of error barX border
- serieJan.ErrorBarsX.Border.LineColor = System.Drawing.Color.Red
- 'Set the has cap
- serieJan.ErrorBarsX.HasCap = True
- 'Set the include
- serieJan.ErrorBarsX.Include = OfficeErrorBarInclude.Minus
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = true;
- //Add the trendline to chart serie
- serieJan.TrendLines.Add();
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the primary axis for the serie
- serieMarch.UsePrimaryAxis = True
- 'Add the trendline to chart serie
- serieJan.TrendLines.Add()
- serieJan.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Filter the serie value
- serieJan.IsFiltered = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentation__1 As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Filter the serie value
- serieJan.IsFiltered = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the name range of the series
- IOfficeDataRange dataRange = chart.Series[0].NameRange;
- //Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name");
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the name range of the series
- Dim dataRange As IOfficeDataRange = chart.Series(0).NameRange
- 'Sets a new name to the series
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, "My serie Name")
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie - start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie - start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series - start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- Dim presentationDocument As IPresentation = Presentation.Create()
- Dim slide As ISlide = presentationDocument.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie - start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie - start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series - start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentationDocument.Save("Output.pptx")
- 'Close the presentation
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of category labels
- IOfficeDataRange dataRange = chart.Series[0].CategoryLabels;
- //Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- Retrieves the range of category labels
- Dim dataRange As IOfficeDataRange = chart.Series(0).CategoryLabels
- 'Changes the category label of a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 2.4)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- //Creates a Presentation instance
- IPresentation presentation = Presentation.Open("BubbleChart.pptx");
- ISlide slide = presentation.Slides[0];
- IPresentationChart chart = slide.Charts[0];
- //Retrieves the range of bubble sizes of the chart
- IOfficeDataRange dataRange = chart.Series[0].Bubbles;
- //Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20);
- //Saves the presentation
- presentation.Save("Output.pptx");
- //Closes the presentation
- presentation.Close();
-
-
- 'Creates a Presentation instance
- Dim presentationDocument As IPresentation = Presentation.Open("BubbleChart.pptx")
- Dim slide As ISlide = presentationDocument.Slides(0)
- Dim chart As IPresentationChart = slide.Charts(0)
- 'Retrieves the range of bubble sizes of the chart
- Dim dataRange As IOfficeDataRange = chart.Series(0).Bubbles
- 'Changes the bubble size in a specific cell within the data range.
- dataRange.SetValue(dataRange.FirstRow, dataRange.FirstColumn, 20)
- 'Saves the presentation
- presentationDocument.Save("Output.pptx")
- 'Closes the presentation
- presentationDocument.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10;
- //Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10
- 'Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Set the chart type
- chart.ChartType = OfficeChartType.Column_3D;
- //Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10;
- //Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Column_3D
- 'Set the number of series between tick-mark labels
- chart.PrimarySerieAxis.TickLabelSpacing = 10
- 'Sets the number of series between tick marks.
- chart.PrimarySerieAxis.TickMarkSpacing = 15
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Remove a serie using the index position
- chart.Series.RemoveAt(0);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Remove a serie using the index position
- chart.Series.RemoveAt(0)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Remove a specific serie from collection
- chart.Series.Remove(serieJan);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Remove a specific serie from collection
- chart.Series.Remove(serieJan)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the count of the series
- int count = chart.Series.Count;
- //Set the data range of chart serie � start row, start column, end row, end column
- chart.Series[0].Values = chart.ChartData[2, 2, 4, 2];
- chart.Series["Feb"].Values = chart.ChartData[2, 3, 4, 3];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the count of the series
- Dim count As Integer = chart.Series.Count
- 'Set the data range of chart serie � start row, start column, end row, end column
- chart.Series(0).Values = chart.ChartData(2, 2, 4, 2)
- chart.Series("Feb").Values = chart.ChartData(2, 3, 4, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the count of the series
- int count = chart.Series.Count;
- //Set the data range of chart serie � start row, start column, end row, end column
- chart.Series[0].Values = chart.ChartData[2, 2, 4, 2];
- chart.Series["Feb"].Values = chart.ChartData[2, 3, 4, 3];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the count of the series
- Dim count As Integer = chart.Series.Count
- 'Set the data range of chart serie � start row, start column, end row, end column
- chart.Series(0).Values = chart.ChartData(2, 2, 4, 2)
- chart.Series("Feb").Values = chart.ChartData(2, 3, 4, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add();
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb",OfficeChartType.Area);
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the count of the series
- int count = chart.Series.Count;
- //Set the data range of chart serie � start row, start column, end row, end column
- chart.Series[0].Values = chart.ChartData[2, 2, 4, 2];
- chart.Series["Feb"].Values = chart.ChartData[2, 3, 4, 3];
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add()
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb", OfficeChartType.Area)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Get the count of the series
- Dim count As Integer = chart.Series.Count
- 'Set the data range of chart serie � start row, start column, end row, end column
- chart.Series(0).Values = chart.ChartData(2, 2, 4, 2)
- chart.Series("Feb").Values = chart.ChartData(2, 3, 4, 3)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Set the trendline color and weight
- serieFeb.TrendLines[0].Border.LineWeight = OfficeChartLineWeight.Wide;
- serieFeb.TrendLines[0].Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Set the trendline color and weight
- serieFeb.TrendLines(0).Border.LineWeight = OfficeChartLineWeight.Wide
- serieFeb.TrendLines(0).Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Set the trendline color and weight
- serieFeb.TrendLines[0].Border.LineWeight = OfficeChartLineWeight.Wide;
- serieFeb.TrendLines[0].Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Set the trendline color and weight
- serieFeb.TrendLines(0).Border.LineWeight = OfficeChartLineWeight.Wide
- serieFeb.TrendLines(0).Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Remove a trendline object using index
- serieFeb.TrendLines.RemoveAt(1);
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Remove a trendline object using index
- serieFeb.TrendLines.RemoveAt(1)
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Clear the trendlines in serie
- serieFeb.TrendLines.Clear();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Clear the trendlines in serie
- serieFeb.TrendLines.Clear()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Specify the chart title
- chart.ChartTitle = "Sales Analysis";
- //Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered;
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- serieFeb.TrendLines.Add();
- //Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average);
- //Get the count of the trendline
- int count = serieFeb.TrendLines.Count;
- //Get the trendline instance from collection
- IOfficeChartTrendLine trendline = serieFeb.TrendLines[0];
- //Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide;
- trendline.Border.LineColor = System.Drawing.Color.Blue;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Specify the chart title
- chart.ChartTitle = "Sales Analysis"
- 'Specify the chart type
- chart.ChartType = OfficeChartType.Column_Clustered
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieFeb.Values = chart.ChartData(2, 3, 4, 3)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- serieFeb.TrendLines.Add()
- 'Add trendline with specific type
- serieFeb.TrendLines.Add(OfficeTrendLineType.Moving_Average)
- 'Get the count of the trendline
- Dim count As Integer = serieFeb.TrendLines.Count
- 'Get the trendline instance from collection
- Dim trendline As IOfficeChartTrendLine = serieFeb.TrendLines(0)
- 'Set the trendline color and weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Wide
- trendline.Border.LineColor = System.Drawing.Color.Blue
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Clear the trendline formats
- trendline.ClearFormats();
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Clear the trendline formats
- trendline.ClearFormats()
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green;
- //Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green
- 'Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the backward
- trendline.Backward = 0.3;
- //Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green;
- //Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the backward
- trendline.Backward = 0.3
- 'Set the line color of border
- trendline.Border.LineColor = System.Drawing.Color.Green
- 'Set the line weight
- trendline.Border.LineWeight = OfficeChartLineWeight.Medium
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the display equation
- trendline.DisplayEquation = true;
- //Set the display RSSquared
- trendline.DisplayRSquared = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the display equation
- trendline.DisplayEquation = True
- 'Set the display RSSquared
- trendline.DisplayRSquared = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the display equation
- trendline.DisplayEquation = true;
- //Set the display RSSquared
- trendline.DisplayRSquared = true;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the display equation
- trendline.DisplayEquation = True
- 'Set the display RSSquared
- trendline.DisplayRSquared = True
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance///Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the intercept as auto
- trendline.InterceptIsAuto = true;
- //Set the name as auto
- trendline.NameIsAuto = true;
- //Set the forward
- trendline.Forward = 0.3;
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the intercept as auto
- trendline.InterceptIsAuto = True
- 'Set the name as auto
- trendline.NameIsAuto = True
- 'Set the forward
- trendline.Forward = 0.3
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Logarithmic
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial;
- //Set the intercept of trendline
- trendline.Intercept = 0.8;
- //Set the name for trendline
- trendline.Name = "Trendline";
- //Set the order
- trendline.Order = 3;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the type of trendline
- trendline.Type = OfficeTrendLineType.Polynomial
- 'Set the intercept of trendline
- trendline.Intercept = 0.8
- 'Set the name for trendline
- trendline.Name = "Trendline"
- 'Set the order
- trendline.Order = 3
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Create a presentation instance
- IPresentation presentation = Presentation.Create();
- //Add a blank slide to the presentation
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered;
- //Add trendline to the serie
- serieJan.TrendLines.Add();
- //Get the trendline of serie
- IOfficeChartTrendLine trendline = serieJan.TrendLines[0];
- //Set the bold font style for data label
- trendline.DataLabel.Bold = true;
- //Set the color of data label
- trendline.DataLabel.Color = OfficeKnownColors.Red;
- //Set the font name
- trendline.DataLabel.FontName = "Helvetica";
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- 'Create a presentation instance
- Dim presentation__1 As IPresentation = Presentation.Create()
- 'Add a blank slide to the presentation
- Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
- 'Add chart to the slide with position and size
- Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 700, 500)
- 'Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan")
- chart.ChartData.SetValue(1, 3, "Feb")
- chart.ChartData.SetValue(1, 4, "March")
- 'Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2010")
- chart.ChartData.SetValue(2, 2, "60")
- chart.ChartData.SetValue(2, 3, "70")
- chart.ChartData.SetValue(2, 4, "80")
- 'Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2011")
- chart.ChartData.SetValue(3, 2, "80")
- chart.ChartData.SetValue(3, 3, "70")
- chart.ChartData.SetValue(3, 4, "60")
- 'Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2012")
- chart.ChartData.SetValue(4, 2, "60")
- chart.ChartData.SetValue(4, 3, "70")
- chart.ChartData.SetValue(4, 4, "80")
- 'Create a new chart series with the name
- Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
- 'Set the data range of chart serie � start row, start column, end row, end column
- serieJan.Values = chart.ChartData(2, 2, 4, 2)
- 'Create a new chart series with the name
- Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
- 'Set the data range of chart series � start row, start column, end row, end column
- serieMarch.Values = chart.ChartData(2, 4, 4, 4)
- 'Set the chart type
- chart.ChartType = OfficeChartType.Bar_Clustered
- 'Add trendline to the serie
- serieJan.TrendLines.Add()
- 'Get the trendline of serie
- Dim trendline As IOfficeChartTrendLine = serieJan.TrendLines(0)
- 'Set the bold font style for data label
- trendline.DataLabel.Bold = True
- 'Set the color of data label
- trendline.DataLabel.Color = OfficeKnownColors.Red
- 'Set the font name
- trendline.DataLabel.FontName = "Helvetica"
- 'Save the presentation
- presentation__1.Save("Output.pptx")
- 'Close the presentation
- presentation__1.Close()
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get a bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Get the side wall of chart
- IOfficeChartWallOrFloor sideWall = chart.SideWall;
- //Set the picture unit of side wall
- sideWall.PictureUnit = OfficeChartPictureType.stretch;
- //Set the thickness
- sideWall.Thickness = 40;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Open a presentation
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Get a bubble chart from the slide
- IPresentationChart chart = presentation.Slides[0].Charts[0];
- //Change the chart type to 3D
- chart.ChartType = OfficeChartType.Bar_Clustered_3D;
- //Get the side wall of chart
- IOfficeChartWallOrFloor sideWall = chart.SideWall;
- //Set the picture unit of side wall
- sideWall.PictureUnit = OfficeChartPictureType.stretch;
- //Set the thickness
- sideWall.Thickness = 40;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
- This is a memory efficient way to represent a table where values can remain empty. Only rows - that actually contain data will allocate an SFArrayList and the array only holds - as many objects as the specific row contains columns.
-When you access data that are out of range, an empty () object will be returned. - If you set data that are out of range, an exception will be thrown. If you set data for - a row that is empty, the row will be allocated before the value is stored.
-SFTable provides methods that let you insert, remove or rearrange columns or m_arrRows - in the table.
-This is a memory efficient way to represent a table where values can remain empty. Only rows - that actually contain data will allocate an SFArrayList and the array only holds - as many objects as the specific row contains columns.
-When you access data that are out of range, an empty () object will be returned. - If you set data that are out of range, an exception will be thrown. If you set data for - a row that is empty, the row will be allocated before the value is stored.
-SFTable provides methods that let you insert, remove or rearrange columns or m_arrRows - in the table.
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Get image
- System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
-
- //Add picture shape
- IPictureShape picture = worksheet.Shapes.AddPicture(image, "Image1", ExcelImageFormat.Jpeg);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Add images
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, "image.png");
- IPictureShape picture2 = worksheet.Pictures.AddPicture(1, 15, "image.png");
-
- //Remove image
- picture.Remove(true);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream from svg
- Stream svgStream = new FileStream("image.svg", FileMode.Open);
-
- //Create image stream from png
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, svgStream, stream, 50, 50);
-
- //Check
- Console.Write(picture.FileName);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- Console.ReadKey();
- }
- //Output will be
- //Picture0
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream from svg
- Stream svgStream = new FileStream("image.svg", FileMode.Open);
-
- //Create image stream from png
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, svgStream, stream, 50, 50);
-
- //Check
- Console.Write(picture.Picture != null);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- Console.ReadKey();
- }
- //Output will be
- //True
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream from svg
- Stream svgStream = new FileStream("image.svg", FileMode.Open);
-
- //Create image stream from png
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, svgStream, stream, 50, 50);
-
- //Check
- Console.Write(picture.SvgData != null);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- Console.ReadKey();
- }
- //Output will be
- //True
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel top
- format.BevelTop = Office2007ChartBevelProperties.CoolSlant;
- //Set the height of bevel top
- format.BevelTopHeight = 300;
- //Set the width of bevel top
- format.BevelTopWidth = 320;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel bottom
- format.BevelBottom = Office2007ChartBevelProperties.Angle;
- //Set the height of bevel bottom
- format.BevelBottomHeight = 100;
- //Set the width of bevel bottom
- format.BevelBottomWidth = 120;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the 3D lightning
- format.Lighting = Office2007ChartLightingProperties.Chilly;
- //Set the 3D material
- format.Material = Office2007ChartMaterialProperties.DarkEdge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the 3D lightning
- format.Lighting = Office2007ChartLightingProperties.Chilly;
- //Set the 3D material
- format.Material = Office2007ChartMaterialProperties.DarkEdge;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel top
- format.BevelTop = Office2007ChartBevelProperties.CoolSlant;
- //Set the height of bevel top
- format.BevelTopHeight = 300;
- //Set the width of bevel top
- format.BevelTopWidth = 320;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel top
- format.BevelTop = Office2007ChartBevelProperties.CoolSlant;
- //Set the height of bevel top
- format.BevelTopHeight = 300;
- //Set the width of bevel top
- format.BevelTopWidth = 320;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel bottom
- format.BevelBottom = Office2007ChartBevelProperties.Angle;
- //Set the height of bevel bottom
- format.BevelBottomHeight = 100;
- //Set the width of bevel bottom
- format.BevelBottomWidth = 120;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- IPresentation presentation = Presentation.Create();
- ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
- //Add chart to the slide with position and size
- IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
- //Set chart data - Row1
- chart.ChartData.SetValue(1, 2, "Jan");
- chart.ChartData.SetValue(1, 3, "Feb");
- chart.ChartData.SetValue(1, 4, "March");
- //Set chart data - Row2
- chart.ChartData.SetValue(2, 1, "2011");
- chart.ChartData.SetValue(2, 2, "60");
- chart.ChartData.SetValue(2, 3, "70");
- chart.ChartData.SetValue(2, 4, "80");
- //Set chart data - Row3
- chart.ChartData.SetValue(3, 1, "2009");
- chart.ChartData.SetValue(3, 2, "80");
- chart.ChartData.SetValue(3, 3, "70");
- chart.ChartData.SetValue(3, 4, "60");
- //Set chart data - Row4
- chart.ChartData.SetValue(4, 1, "2010");
- chart.ChartData.SetValue(4, 2, "60");
- chart.ChartData.SetValue(4, 3, "70");
- chart.ChartData.SetValue(4, 4, "80");
- //Create a new chart series with the name
- IOfficeChartSerie serieJan = chart.Series.Add("Jan");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieJan.Values = chart.ChartData[2, 2, 4, 2];
- //Create a new chart series with the name
- IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
- //Set the data range of chart serie – start row, start column, end row, end column
- serieFeb.Values = chart.ChartData[2, 3, 4, 3];
- //Create a new chart series with the name
- IOfficeChartSerie serieMarch = chart.Series.Add("March");
- //Set the data range of chart series – start row, start column, end row, end column
- serieMarch.Values = chart.ChartData[2, 4, 4, 4];
- //Get the 3D format of chart serie
- IThreeDFormat format = chart.Series[0].SerieFormat.ThreeD;
- //Set the bevel bottom
- format.BevelBottom = Office2007ChartBevelProperties.Angle;
- //Set the height of bevel bottom
- format.BevelBottomHeight = 100;
- //Set the width of bevel bottom
- format.BevelBottomWidth = 120;
- //Save the presentation
- presentation.Save("Output.pptx");
- //Close the presentation
- presentation.Close();
-
-
- //Open a PowerPoint presentation file
- IPresentation presentation = Presentation.Open("Template.pptx");
- //Create an instance of ChartToImageConverter
- presentation.ChartToImageConverter = new ChartToImageConverter();
- //Set the scaling mode as best
- presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best;
- //Convert the first slide into image
- System.Drawing.Image image = presentation.Slides[0].ConvertToImage(Syncfusion.Drawing.ImageType.Metafile);
- //Save the image as file
- image.Save("slide1.png");
- //close the presentation instance
- presentation.Close();
-
-
- 'Open a PowerPoint presentation file
- Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
- 'Create an instance of ChartToImageConverter
- presentation__1.ChartToImageConverter = New ChartToImageConverter()
- 'Set the scaling mode as best
- presentation__1.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best
- 'Convert the first slide into image
- Dim image As System.Drawing.Image = presentation__1.Slides(0).ConvertToImage(Syncfusion.Drawing.ImageType.Metafile)
- 'Save the image as file
- image.Save("slide1.png")
- 'close the presentation instance
- presentation__1.Close()
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Open("GroupShapes.xlsx");
- IWorksheet worksheet = workbook.Worksheets[0];
-
- IShapes shapes = worksheet.Shapes;
- IShape[] groupItems = (shapes[0] as IGroupShape).Items;
-
- //Save and dispose
- workbook.SaveAs("GroupShapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Get image
- System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(4, 5, image);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Get image
- System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(4, 5, image, ExcelImageFormat.Jpeg);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, stream);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream from svg
- Stream svgStream = new FileStream("image.svg", FileMode.Open);
-
- //Create image stream from png
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, svgStream, stream);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream from svg
- Stream svgStream = new FileStream("image.svg", FileMode.Open);
-
- //Create image stream from png
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, svgStream, stream, 50, 50);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, stream, ExcelImageFormat.Jpeg);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Get image
- System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, 30, 8, image);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Get image
- System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, 30, 8, image, ExcelImageFormat.Jpeg);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, 30, 8, stream);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, 30, 8, stream, ExcelImageFormat.Jpeg);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Get image
- System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, image, 50, 50);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Get image
- System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, image, 50, 50, ExcelImageFormat.Jpeg);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, stream, 50, 50);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Create image stream
- Stream stream = new FileStream("image.png", FileMode.Open);
-
- //Add image
- IPictureShape picture = worksheet.Pictures.AddPicture(1, 1, stream, 50, 50, ExcelImageFormat.Jpeg);
-
- //Save and dispose
- workbook.SaveAs("Shapes.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Add pictures
- worksheet.Pictures.AddPicture("image.png");
- worksheet.Pictures.AddPicture("image.png");
-
- //Get count
- Console.Write(worksheet.Pictures.Count);
-
- //Save and dispose
- workbook.SaveAs("Pictures.xlsx");
- workbook.Close();
- Console.ReadKey();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Add picture
- worksheet.Pictures.AddPicture("image.png");
-
- //Set picture
- IPictureShape picture = worksheet.Pictures[0];
-
- //Set dimension
- picture.Left = 3;
- picture.Top = 3;
- picture.Height = 50;
- picture.Width = 50;
-
- //Save and dispose
- workbook.SaveAs("Pictures.xlsx");
- workbook.Close();
- }
-
-
- using (ExcelEngine excelEngine = new ExcelEngine())
- {
- //Create worksheet
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Excel2013;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Add picture
- worksheet.Pictures.AddPicture("image.png");
-
- //Set picture
- IPictureShape picture = worksheet.Pictures["image"];
-
- //Set dimension
- picture.Left = 3;
- picture.Top = 3;
- picture.Height = 50;
- picture.Width = 50;
-
- //Save and dispose
- workbook.SaveAs("OLEObjects.xlsx");
- workbook.Close();
- }
-
-
- public static GridModel LoadSoap(Stream s)
- {
- try
- {
- AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(GridAssembly.AssemblyResolver);
- SoapFormatter b = new SoapFormatter();
- b.AssemblyFormat = FormatterAssemblyStyle.Simple;
- GridModel t = b.Deserialize(s) as GridModel;
- t.Modified = false;
- return t;
- }
- finally
- {
- AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(GridAssembly.AssemblyResolver);
- }
- }
-
-