开发者

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;
        }
    }

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜