Graph Generated in a Class
-
- Newbie
- Posts: 65
- Joined: Mon Jan 19, 2004 5:00 am
Graph Generated in a Class
Have got graphs working on a website, I have a class routine with generates a XML file. It is possible to use the graph software in just a class, as I can't seem to work out how oyu would setup the graph etc
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Graph Generated in a Class
Hi MikeTheLad,
Yes, you could reference TeeChart.dll at the project and use a chart at runtime, for example:
Yes, you could reference TeeChart.dll at the project and use a chart at runtime, for example:
Code: Select all
public class MyChartClass
{
public MyChartClass()
{
Steema.TeeChart.TChart myChart = new Steema.TeeChart.TChart();
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(myChart.Chart);
bar1.FillSampleValues();
myChart.Export.Image.JPEG.Save(@"c:\temp\runtimechart.jpg");
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
MyChartClass theChart = new MyChartClass();
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |