User (Legacy) Posted July 2, 2004 Report Share Posted July 2, 2004 hi, I have a small problem: I want to colour bars in a bar chart according to their labels, e.g if the label is "benchmark", I want to make that bar green. Now, I can see how to set the point colour by index (chart1.Point[0,1].Color = Color.Red; for instance), but I can't see how to do it without knowing the indices. I can't assume that the "benchmark" point is going to be at any particular position in the series. Is there any way of getting the label associated with a particular point? cheers Rob Link to comment Share on other sites More sharing options...
Software FX Posted July 2, 2004 Report Share Posted July 2, 2004 So you want to make the bar that has a label equal to "benchmark" green ? You need to loop through all the points, compare its label to "benchmark" and set the color appropriately. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted July 2, 2004 Author Report Share Posted July 2, 2004 > So you want to make the bar that has a label equal to "benchmark" green ? yep, that's pretty much it > You need to loop through all the points, compare its label to "benchmark" > and set the color appropriately. that's what I thought. But I can't see a Label property in the PointAttributes class. Am I missing something obvious here? cheers Rob Link to comment Share on other sites More sharing options...
Software FX Posted July 2, 2004 Report Share Posted July 2, 2004 The labels is not in the point attributes as it is shared by all series. Use chart.axisX.Label[i] to obtain the associated label. -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.