asp.net c#如何在图表中使用自定义颜色 [英] asp.net c# how to use custom colours in charts
本文介绍了asp.net c#如何在图表中使用自定义颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以告诉我,我也许能够在ASP.Net图表控件中使用自定义颜色。因此,例如,我有两个系列TOTAL和TARGET,我想将total的颜色设置为绿色,将target的颜色设置为红色。
can any one show me I might be able to use custom colours in an ASP.Net chart control. so for example I have two series TOTAL and TARGET and I want to set the colour for total to green and the colour for target to be red .
推荐答案
假设您的Series1有两个点。
因此,您可以自定义颜色,如下所示:
suppose that you have two points for your Series1. So you can customise the colors as follow:
Chart1.Series["Series1"].Points[0].Color=Color.Red;
Chart1.Series["Series1"].Points[1].Color=Color.Yellow;
这篇关于asp.net c#如何在图表中使用自定义颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文