Home All Groups Group Topic Archive Search About
Author
28 Mar 2005 4:37 AM
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 ?

Author
29 Mar 2005 5:02 AM
Alvin Bruney [ASP.NET MVP]
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
_________________________


Show quoteHide quote
"LB" <1@1.com> wrote in message
news:OUfbQ$0MFHA.3788@tk2msftngp13.phx.gbl...
> 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 ?
>
Are all your drivers up to date? click for free checkup

Author
29 Mar 2005 5:20 AM
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




Show quoteHide quote
"Alvin Bruney [ASP.NET MVP]" <www.lulu.com/owc> wrote in message
news:uAlGGyBNFHA.3928@TK2MSFTNGP09.phx.gbl...
> 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" <1@1.com> wrote in message
> news:OUfbQ$0MFHA.3788@tk2msftngp13.phx.gbl...
>> 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 ?
>>
>
>
Author
30 Mar 2005 2:41 AM
Alvin Bruney [ASP.NET MVP]
The reason you can't adjust it is because the chart image is actually
streamed as a gif file thru the BinaryWrite property. One approach is to
write the gif image into a placeholder and then adjust the placeholder using
the styles property.

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


Show quoteHide quote
"LB" <1@1.com> wrote in message
news:eyAF%237BNFHA.568@TK2MSFTNGP09.phx.gbl...
> 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 [ASP.NET MVP]" <www.lulu.com/owc> wrote in message
> news:uAlGGyBNFHA.3928@TK2MSFTNGP09.phx.gbl...
>> 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" <1@1.com> wrote in message
>> news:OUfbQ$0MFHA.3788@tk2msftngp13.phx.gbl...
>>> 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 ?
>>>
>>
>>
>
>

Bookmark and Share

Post Thread options