MSChart<2> 柱状图绘制及其样式
2011-12-12 15:37
197 查看
微软Chart控件的安装及其使用,参考:微软图表控件MsChart使用初探,这篇文章写得相当详细,入门使用全是她的功劳~
以下,是分享的一个柱状图的好看的样式, 先预览一下:
HTML
后台代码: 绑定Chart
另外还有线性图,饼状图,和雷达图,都是最初步的应用,一次项目的总结。如果你也遇到这个问题,请参考。
大牛们,如果你们看到有什么错误,还望不吝赐教。
谢谢~
以下,是分享的一个柱状图的好看的样式, 先预览一下:
HTML
<asp:Chart ID="Chart2" runat="server" BorderlineDashStyle="Solid" BorderlineColor="Gray" Width="768px" BackGradientStyle="DiagonalLeft" BackSecondaryColor="AliceBlue" BackColor="WhiteSmoke"> <Legends> <asp:Legend Name="ExpLgd" BackColor="Transparent" Docking="Top"></asp:Legend> </Legends> <Series> <asp:Series Name="Series1" IsValueShownAsLabel="true" Color="#0066FF" CustomProperties="DrawingStyle=Cylinder, MinPixelPointWidth=20, MaxPixelPointWidth=35, PointWidth=0.3" IsXValueIndexed="False" ShadowOffset="1" Legend="ExpLgd" ChartArea="ChartArea1"> </asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1" BackColor="WhiteSmoke" BackSecondaryColor="Silver" BackGradientStyle="DiagonalLeft" ShadowOffset="2"> <AxisY> <MajorGrid LineColor="LightSlateGray" LineDashStyle="Dash" /> </AxisY> <AxisX> <MajorGrid Enabled="False" /> <LabelStyle Font="Microsoft Sans Serif, 8pt" /> </AxisX> </asp:ChartArea> </ChartAreas> </asp:Chart>
后台代码: 绑定Chart
private void BindScoreTrend() { Report1BLL reportBLL = new Report1BLL(); DataTable dt = null; dt = reportBLL.GetScoreTrend(testID); Chart2.Series["Series1"].Points.DataBind(dt.DefaultView, "SWVersion", "TotalScore", "LegendText=SWVersion,YValues=TotalScore,ToolTip=TotalScore"); Chart2.Series["Series1"].ChartType = SeriesChartType.Column; Chart2.Series["Series1"].Name = " Total Score"; //ddlActivity.SelectedItem.Text; Chart2.DataBind(); }
另外还有线性图,饼状图,和雷达图,都是最初步的应用,一次项目的总结。如果你也遇到这个问题,请参考。
大牛们,如果你们看到有什么错误,还望不吝赐教。
谢谢~
相关文章推荐
- Quartz调度框架应用总结<2>--作业及其相关
- sql分页样式,有点仿百度的写法 <1><2><3>...<11>
- MsChart<5> 累计柱状图 分类统计
- Echarts 3.19 .net<ajax+json>绘制柱状图 非静态
- 网页中的 <body> 和 <html> 元素及其样式
- 第8课:<span>标签为文字设置单独样式
- UITextView 文字多不绘制,-[<UITitleLayer: 0x5584190> display]: Ignoring bogus layer size
- 指尖上的代码[C语言版]-<2>
- [Elasticsearch2.x] 多字段搜索 (二) - 最佳字段查询及其调优 <译>
- Android Fragment 学习<2> 滑动TAb导航(ActionBar)
- 转<存储过程实现分页2>
- 面向对象<2>__笔记(12)
- 面向对象系统分析与开发专题<2>__面向对象方法与工具
- Django之第一个app<2>
- 第四周 【项目1-三角形类的构造函数】<2>
- <仅是自己做笔记。。。系列-2>求二叉树中节点的最大距离
- <<web>>css3 各种平面图形的绘制(转)
- Linux内核部件分析<2> 原子性操作atomic_t
- Android Audio 框架简读 <2>
- MsChart<1> 线性图