.net - Change color of a label in the barChart (TeeChart) -


I have a similar bar chart with 4 labels. I have to have the third label white and there is a bold interface in it.

I tried to reach Axis Labels. They manipulate them, but there is no element in this collection. The event GetAxisDrawElement gives me the label but I have no access to the font and color properties.

You can use GetAxisLabel events, for example

 < Code> Private Zero initializeChart () {Bar Series = New Bar (tChart1.Chart); Series.Add (1); Series.Add (2); Series.Add (3); Series.Add (4); TChart1.GetAxisLabel + = tChart1_GetAxisLabel; } Zero tChart1_GetAxisLabel (Object Sender, GetAxisLabelEventArgs E) {Axis Axis = Sender as Axis; If (axis.elections (tChart1.Axes.Bottom)) {axis.Labels.Font.Bold = e.LabelText.Equals ("3"); Axis.Labels.Font.Color = e.LabelText.Equals ("3")? Colour. Color: Color. Black; Axis.Labels.Font.Size = e.LabelText.Equals ("3")? 16: 8; }}  

Comments