Just look at the code below.
Code: Select all
Series2->AddXY(0, 50, "", claRed);
Series2->AddXY(10, 100, "", claBlue);
Series2->ValueColor[10] = claWhite;
Code: Select all
Series2->AddXY(0, 50, "", claRed);
Series2->AddXY(10, 100, "", claBlue);
Series2->ValueColor[10] = claWhite;
Code: Select all
Series2->AddXY(0, 50, "", claRed);
Series2->AddXY(10, 100, "", claBlue);
Series2->ValueColor[10] = claWhite;
Code: Select all
Series2->AddXY(0, 50, "", claRed);
Series2->AddXY(10, 100, "", claBlue);
Series2->ValueColor[9] = claWhite;
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 |
Code: Select all
// Series1 is a TPointSeries
// Add two points to Series1
Series1->AddXY(0, 50, "", claRed); // Point1 having the index of 0
Series1->AddXY(10, 100, "", claBlue); // Point2 having the index of 10
ShowMessage(Series1->Count()); // 2 points
// Question1: As you say,ValueColor ValueList indexs from 0,
// so the line below should change the color of Point2,
// but as the screenshot shown, another point was added at the index of Ponit2,
Series1->ValueColor[10] = claWhite;
// Count() = 11 points.
// Question2: the 'ValueColor' goes to change the number of Series?
ShowMessage(Series1->Count());
Count has a value of 2. So, valid indexes in the series are: 0 and 1.ShowMessage(Series1->Count()); // 2 points
To change the color of the second point you should use.// Question1: As you say,ValueColor ValueList indexs from 0,
// so the line below should change the color of Point2,
// but as the screenshot shown, another point was added at the index of Ponit2,
Series1->ValueColor[10] = claWhite;
Code: Select all
Series1->ValueColor[1] = claWhite;[/quote]
That changes the number of points in the series. You may want to check that the indices you are using are between the 0 and Series1->Count()-1 range.// Count() = 11 points.
// Question2: the 'ValueColor' goes to change the number of Series?
ShowMessage(Series1->Count());
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 |
As shown in the attachment, the legend is showing thatIf you use an invalid index it adds sequential values up to this point with Y value being 0.
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 |