Chart position

L

LB

Hello
trying to use the micorsoft.office.interop to create chart, i got stuck to
position the chart on the page.
everytime I try to use :
ChartSpace1.Charts(0). top = 500, I get the following error :
This is an inappropriate time to alter layout

Any idea how to position the chart ?
 
L

LB

I'm not sure I understand "the code behind approach", but here is an
example, I use some categories and 3 series. The charts always display on
the top left of the webform. Is there a way to change the position of the
chart on the webform ?
'Format the chart elements.

With ChartSpace1.Charts(0)

..SeriesCollection(0).Interior.Color = "PapayaWhip" '2003

..SeriesCollection(1).Interior.Color = "LightGreen" '2004

..SeriesCollection(2).Interior.Color = "Lightskyblue" '2005

..PlotArea.Interior.Color = "silver" '"Wheat"

..HasLegend = True

'.Legend.Position = _

' OWC.ChartLegendPositionEnum.chLegendPositionBottom

..HasTitle = True

..Title.Caption = "qty the last 3 years"

..Axes(0).HasTitle = True

..Axes(0).Title.Caption = "Month"

..Axes(1).HasTitle = True

..Axes(1).Title.Caption = "Quantity"

..Type = OWC.ChartChartTypeEnum.chChartTypeColumnClustered3D

End With




Alvin Bruney said:
what does this mean? are you using the owc? is this code behind or html
code. that call will only work with html code, it will not work with the
codebehind approach.

--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
_________________________


LB said:
Hello
trying to use the micorsoft.office.interop to create chart, i got stuck
to position the chart on the page.
everytime I try to use :
ChartSpace1.Charts(0). top = 500, I get the following error :
This is an inappropriate time to alter layout

Any idea how to position the chart ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top