Setting Chart Properties Programmatically

G

Guest

Hello,
I am using VS2005 Beta2 and I have added a Simple Line-Graph chart to a
ReportViewer control.

I can click on the chart and alter for example the Minimum and Maximum scale
values of the Y-axis.

The question I have is that, can I change these values from within my code
and how?

Thank you,
Anil.
 
A

Alvin Bruney - ASP.NET MVP

yup, if you create the chart programatically, store a reference to the chart
for later use. you can then access the series for the chart that gives you
access to the scaling object which in turn leads you to min/max property

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
G

Guest

Hi Alvin,

Unfortunately, I do not create the chart programmatically. I drag and drop
the chart onto the design surface from the ToolBox.

Do you have any sample code that shows how to create the charts (that come
with VS2005 Beta 2) programmatically?

Thank you for your help.

Anil.



Alvin Bruney - ASP.NET MVP said:
yup, if you create the chart programatically, store a reference to the chart
for later use. you can then access the series for the chart that gives you
access to the scaling object which in turn leads you to min/max property

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Anil said:
Hello,
I am using VS2005 Beta2 and I have added a Simple Line-Graph chart to a
ReportViewer control.

I can click on the chart and alter for example the Minimum and Maximum scale
values of the Y-axis.

The question I have is that, can I change these values from within my code
and how?

Thank you,
Anil.
 

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
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top