Setting Chart Properties Programmatically

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
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.
 
Back
Top