我爱Aspx >> Asp.Net >> 源码推荐:一个使用C#绘制图形引擎的FrameworkmaxLegendHeight = (maxLegendHeight > currentHeight) ? maxLegendHeight : currentHeight ;
}
legendRect = new RectangleF(r.X+2, r.Y+2, maxLegendWidth + 25 + 5, ((maxLegendHeight+2)*chartData.Lines.Count) + 3) ;
}
private void DrawBackground() {
LinearGradientBrush b = new LinearGradientBrush(r, Color.SteelBlue, backColor,LinearGradientMode.Horizontal);
g.FillRectangle(b, r);
b.Dispose();
}
private void InternalDrawChart() {
DrawGrid() ;
foreach (ChartLine cl in chartData.Lines) {
DrawLine(cl);
}
DrawLegend() ;
//Draw time on chart
string timeString = DateTime.ToString(DateTime.Now) ;
SizeF textsize = g.MeasureString(timeString,baseFont);
g.DrawString(timeString, baseFont, new SolidBrush(foreColor), r.Width - textsize.Width - 5, textsize.Height * 2 / 3) ;
}
private void DrawGrid() {
Pen gridPen = new Pen(chartData.GridColor) ;
//Vertical - include tick desc's
if (chartData.ShowVGridLines) {
for (int i = 0 ; (vspacing * i) < right; i++) {
float x = left + (vspacing *i);
string desc = chartData.XAxisTitles[i];
g.DrawLine(gridPen, x,top,x,bottom +(baseFont.Size*1/3));
SizeF textsize = g.MeasureString(desc,baseFont);
g.DrawString(desc, baseFont, new SolidBrush(chartData.GridColor), x-(textsize.Width/2), bottom + (baseFont.Size*2/3)) ;
}
Ҷƪл˵?
在C#里如何调用标准DLL函数[05-05]
C#抢鲜快报之FAQ20[05-05]
Beginner with c# 7[05-05]
Beginner with c# 6[05-05]
Beginner with c# 5[05-05]
Beginner with c# 4[05-05]
Beginner with c# 3[05-05]
Beginner with c# 2[05-05]
Beginner with C#[05-05]
源码推荐:一个使用C#绘制图形引..[05-05]
如何写系统分析书[05-05]
一个统一的链表结构[05-05]
优化delphi5.0秘籍大曝光[05-05]
在C#里如何调用标准DLL函数[05-05]
开放源代码的定义[05-05]
MMX Instructions[05-05]
Opcodes of intel[05-05]
程序员与MM[05-05]
用CTI实现与Web交谈[05-05]
CTI技术和呼叫中心[05-05]