David
David

Reputation: 109

How to: Highlighting one value in the x-axis label in chart control?

How I can highlight a value in the x-axis using MS. Chart Controls?

X-axis value, not in the graph.

Thanks!

Upvotes: 1

Views: 1151

Answers (1)

Bracke
Bracke

Reputation: 122

Use the charts Customize event (OnCustomize="chart_Customize"):

protected void monthchart_Customize(object source, EventArgs e)
{
    foreach (CustomLabel cl in chart.ChartAreas[0].AxisX.CustomLabels)
    {
        if (cl.Text == "rightcolumnname")
        {
            cl.ForeColor = Color.Gold;
        }
    }

}

Upvotes: 1

Related Questions