User (Legacy) Posted January 18, 2006 Report Posted January 18, 2006 Hi, Is Chart.Points Property not filled up if I dataBind my chart? Say my chart is databind and has 3 values, but why does Chart.Points.Count returns 0 (Chart.Points is empty). I need to alter each pointAttributes (i..e. color). Is there a way to do this. Need help. Thank You, Raymond Dazo Interprise Solutions Team
Software FX Posted January 18, 2006 Report Posted January 18, 2006 chart.Point refers to individual point attributes for each point which don´t exist unless you assign them. Point attributes can be assigned to particular points or groups of points. The number of elements in chart.Points does not necessarily correspond to the number of points in the chart´s data. If you want to create a point attribute for each point you can do so as follows: for (int = 0; i < chart.Data.Points; i++) chart.Point[i] = new PointAttributes(); -- Francisco Padron www.chartfx.com
User (Legacy) Posted January 18, 2006 Author Report Posted January 18, 2006 Hi Francisco, Yes it works. I see that even if the collection is empty and if you access the first element, it will auto create the first element w/o throwing an error. Even if you didn´t assign a new Attribute. Say: ?Chart.Points(0).Text using the immediate window. Thank you, Raymond Dazo Interprise Solutions Team "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:K5PNT7HHGHA.2580@webserver3.softwarefx.com... > chart.Point refers to individual point attributes for each point which > don´t exist unless you assign them. Point attributes can be assigned to > particular points or groups of points. The number of elements in > chart.Points does not necessarily correspond to the number of points in > the chart´s data. > > If you want to create a point attribute for each point you can do so as > follows: > > for (int = 0; i < chart.Data.Points; i++) > chart.Point[i] = new PointAttributes(); > > -- > Francisco Padron > www.chartfx.com >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.