Tee Chart ActiveX 5 with C# .NET
Posted: Thu Jun 16, 2005 4:00 am
Hello,
I have been trying to use TeeChart v5 in the .Net Environment. I can display a graph using FillSampleValues, but I am running into issues using real data with some of TeeCharts expected Data Types.
For Example, in .NET C# TeeChart is expecting colors using a uint datatype. I am not able to use Color.Red or RGB(255,0,0). I was able to work around the issue by randomly generating colors then displaying a color code. Is there a better way to generate a reference list of colors for the uint datatype in C#?
Also, in attempting to add data points to a series using Series(index).AddXY I ran into an issue with the Double Data Type TChart is expecting for the X Values. My X Values are dates. DateTime datatype. I have not been able to figure out how to convert a DateTime to type double. The syntax: Convert.ToDouble(DateTime Variable) is invlaid. Any suggestions for adding a series with datetime x values?
Lastley I've noticed the ActiveX object doesn't work inside the form tags. I've been able to work around this by displaying the chart object outside of the tags but I was wondering if there was someway to make it work inside of the form tags.
I know version 5 is pre.Net and I can get TeeChart to work using classic asp and vbscript. I would just like to take advantage of .Net. features. Any help appreciated.
Thank you.
I have been trying to use TeeChart v5 in the .Net Environment. I can display a graph using FillSampleValues, but I am running into issues using real data with some of TeeCharts expected Data Types.
For Example, in .NET C# TeeChart is expecting colors using a uint datatype. I am not able to use Color.Red or RGB(255,0,0). I was able to work around the issue by randomly generating colors then displaying a color code. Is there a better way to generate a reference list of colors for the uint datatype in C#?
Also, in attempting to add data points to a series using Series(index).AddXY I ran into an issue with the Double Data Type TChart is expecting for the X Values. My X Values are dates. DateTime datatype. I have not been able to figure out how to convert a DateTime to type double. The syntax: Convert.ToDouble(DateTime Variable) is invlaid. Any suggestions for adding a series with datetime x values?
Lastley I've noticed the ActiveX object doesn't work inside the form tags. I've been able to work around this by displaying the chart object outside of the tags but I was wondering if there was someway to make it work inside of the form tags.
I know version 5 is pre.Net and I can get TeeChart to work using classic asp and vbscript. I would just like to take advantage of .Net. features. Any help appreciated.
Thank you.