开发者

Highlight one column in Asp.net Chart Control Series

Any help or pointers would be great on this, I'm going through the ASP.NET chart controls WebSamples project but I haven't found what I'm looking for yet. So basically if I had a standard bar chart with data such as below:

John - 68%
Fred - 75%
Mary - 开发者_C百科32%
Anne - 88%

Displaying it in one series with names as the x axis and percentages as the y, is there anyway to change or highlight the bar colour of just one, so say all the bars in the series are blue but I want to programmatically change mary's bar colour to red. Is this possible?


Right, well I've found a colution to this, if anyone has a neater solution then please post it. If you can find out the index of the bar by looping through your data or however then you can set the bar color as below.

myChart.Series[0].Points[theColumnIndex].Color = System.Drawing.Color.Red;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜