开发者

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

开发者 https://www.devze.com 2023-02-16 11:23 出处:网络
How I can high开发者_运维知识库light a value in the x-axis using MS. Chart Controls? X-axis value, not in the graph.

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

精彩评论

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

关注公众号