Add chart
Adds a new chart to the selected cell range.
(function()
{
Api.GetActiveSheet().AddChart("'Sheet1'!$C$5:$D$7", true, "bar", 2, 105 * 36000, 105 * 36000, 5, 2 * 36000, 1, 3 * 36000);
})();
Methods used:
GetActiveSheet,
AddChart
Sub example()
With ActiveSheet.ChartObjects.Add(Left:=300, Width:=300, Top:=10, Height:=300)
.Chart.SetSourceData Source:=Sheets("Sheet1").Range("C5:D7")
End With
End Sub