Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to set the Chart type to XY Plotter
I am trying to set the chart types to XYScatter through code. I am
using the Createobject(Excel.App...) instead of referencing the excel object. However, i end up setting the chart type to any of the XY Scatter (XY Scatt with data points connected, smoothed lines, etc) but cannot create the simple XYScatter(just points). The chartType for XYScatter starts from 71 thru 74 (70 is the pie chart and 75 is area chart). Has any bdy come across such problem, any suggestions?? Thanks Heres the code: Set xlChart = xlChartSheet.chartobjects.Add(360, 5, 350, 250).Chart With xlChart .ChartType = 72 .SeriesCollection.Add Source:=xlWS.Range("A4:A" & lastRow & ", " & xlWS.Cells(4, colCount + 1).Address & ":" & Left(xlWS.Cells(4, colCount + 1).Address, 3) & lastRow), RowCol:=2 .SeriesCollection(1).XValues = xlWS.Range("P4:P" & lastRow) .SeriesCollection(1).Values = xlWS.Range("E4:E" & lastRow) .SeriesCollection(1).TrendLines.Add .HasTitle = True .ChartTitle.Caption = "Gas vs Power Price" .HasLegend = False .PlotArea.Height = 280 .PlotArea.Width = 490 End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
unable to type in cell | Excel Discussion (Misc queries) | |||
Printing Chart on Plotter | Charts and Charting in Excel | |||
Chart not printing on plotter Excel 2000 | Excel Discussion (Misc queries) | |||
unable to type in selected row | New Users to Excel | |||
Adding a line Chart Type to a stacked-clustered Chart Type | Charts and Charting in Excel |