How to: Highlighting one value in the x-axis label in chart control?
How I can high开发者_运维知识库light a value in the x-axis using MS. Chart Controls?
X-axis value, not in the graph.
Thanks!
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;
}
}
}
精彩评论