using system; using system.collections; using system.componentmodel; using system.data; using system.drawing; using system.web; using system.web.sessionstate; using system.web.ui; using system.web.ui.webcontrols; using system.web.ui.htmlcontrols; using system.drawing.imaging; using system.drawing.drawing2d;
/**//*自写编码*/ int imgwidth=600; //1.[总宽度] ***图宽度 int imgheight=300; //2.[总高度] ***图高度 int itemnum=1; //3.[项目数量] ***图表划分的块 int childnum=6; //4.[块数] ***大块中划分的子项的数量 float childrate=0.6f; //5.[各块总占空间比率] //int childspace=15; //6.[各块间的间距] int chartleft=80; //7.[图表左边距] ***图表距图的左边距离 int chartright=50; //8.[图表右边距] ***图表距图的右边距离 int charttop=50; //9.[图表顶边距] ***图表距图顶边距离 int chartbottom=50; //10.[图表底边距] ***图表距图底边距离 int ymaxvalue=5000; //11.[纵坐标标尺最大值] ***纵坐标标尺的最大值 int yitemnum=10; //12.[纵坐标标尺段数] ***纵坐标标尺的段数 int ytop=15; //13.[距纵轴顶端间隔] int ystrstart=35; //14.[纵坐标标尺文字起始x坐标] int xright=15; //15.[距横轴右端间隔] int xstrstart=20; //16.[横坐标标尺文字起始y坐标]
//[图表总宽度]=[总宽度]-[图表左边距]-[图表右边距]-[距横轴右端间隔] int chartwidth=imgwidth-chartleft-chartright-xright; //[项目宽度]=[图表总宽度]/[项目数量] int itemwidth=chartwidth/itemnum; //[各块总占空间比率的实际宽度]=[项目宽度]*[各块总占空间比率] int factwidth=convert.toint32(math.floor(itemwidth*childrate)); //[各块矩形宽度]=[各块总占空间比率的实际宽度]/[块数] int rectanglewidth=factwidth/childnum; //[各块间的间距]=([项目宽度]-[各块总占空间比率的实际宽度])/([块数]+1) int childspace=convert.toint32(math.floor((itemwidth-factwidth)/(childnum+1)));