我想以不同的顏色(星期一紅色,星期二綠色等)顯示星期中的每一天,並且我無法正確顯示圖表中的數據。
我有系列每一天。但與圖表類型:列該圖顯示每一天都非常醜陋(請參閱圖像:http://i49.tinypic.com/oszeqt.png)。
數據圖表:如何正確地與一天中的顏色來顯示各列:代碼如何在圖表中正確顯示星期幾的顏色列
DateTime dateValue = new DateTime(2012, 5, int.Parse(tempDay));
switch ((int)dateValue.DayOfWeek)
{
case 1:
chart1.Series["Monday"].Points.AddXY(int.Parse(tempDay), int.Parse(tempTime));
break;
case 2:
chart1.Series["Tuesday"].Points.AddXY(int.Parse(tempDay), int.Parse(tempTime));
break;
case 3:
chart1.Series["Wednesday"].Points.AddXY(int.Parse(tempDay), int.Parse(tempTime));
break;
case 4:
chart1.Series["Thursday"].Points.AddXY(int.Parse(tempDay), int.Parse(tempTime));
break;
case 5:
chart1.Series["Friday"].Points.AddXY(int.Parse(tempDay), int.Parse(tempTime));
break;
case 6:
chart1.Series["Saturday"].Points.AddXY(int.Parse(tempDay), int.Parse(tempTime));
break;
case 7:
chart1.Series["Sunday"].Points.AddXY(int.Parse(tempDay), int.Parse(tempTime));
break;
}
我的問題
01:12000
02:12500
03:13000
04:13500
05:14029
06:14509
07:15000
08:15500
09:16000
10:16500
11:17000
12:17125
位。 (我不需要單獨系列的每一天。)
顏色我只是使用chart1 .Series [「Monday」]。Color = System.Drawing.ColorTranslator.FromHtml(「#C2E5EB」);顏色不是我的問題 – miky