Hi, I have chart with 12 Series. I am adding data to series via AddArray function. I can't add string array to my char on x ax.
Here is my source code:
int i;
int[][] poleInt = new int[12][];
string [] x = new string[1000];
// I have fill both arrays with sample values.
for (i = 0; i < 12; i++)
{
for (int j = 0; j < 1000; j++)
{
poleInt = new int[1000];
}
}
// I am filling Series like this:
for (i = 0; i < 12; i++)
{
{
TChart1.Series(i).AddArray(1000,poleInt,x);
}
}
And this is my problem: If x array is type int it is allright and chart is displayed, if x array is type string my application is crashed. I need string values on X ax.
I am programing in ASP.NET using C# language.
Could anyone help me please?
Problem with AddArray function
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi zizou5,
First of all please notice that I have moved your message to the TeeChart Pro ActiveX forum as it seems to me you are using this version.
It is not possible to add strings for x values like this. You still need to supply numeric (integer or double) values for the X values and then also supply strings to be displayed in the x axis using AddXY method:
Then bottom axis labels will be automatically set to display text. You could also force them doing this:
First of all please notice that I have moved your message to the TeeChart Pro ActiveX forum as it seems to me you are using this version.
It is not possible to add strings for x values like this. You still need to supply numeric (integer or double) values for the X values and then also supply strings to be displayed in the x axis using AddXY method:
Code: Select all
function AddXY(AX, AY: Double; Const ALabel: WideString; Value: OLE_COLOR): Integer;
Code: Select all
TChart1.Axis.Bottom.Labels.Style = talText
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 |