XtraCharts
XtraCharts是ComponentOne控件包一大重要控件,涵盖了一个画图控件的所有需要输出的效果,并提供了一些特色功能,并直接从流输出不需要产生临时图片文件。介绍一些常用的属性以及方法。
简介
命名空间引用添加
usingDevExpress.XtraCharts;
using DevExpress.XtraCharts.Web;
using DevExpress.XtraCharts.Native;
数据绑定
privatevoidChartBinding(object sender)
{
string Str_SQL = "select top 7 UnitPrice,UnitsInStock,ReorderLevel,ProductID from Products order by ProductID ";
DataSet DS = DataHandle.ExecuteSQL(Str_SQL);
WebChartControl1.Series.Clear();
//定义线型,名称
Series S1 = new Series("线条图测试", ViewType.Line);
//定义X轴的数据的类型。质量,数字,时间
S1.ArgumentScaleType = ScaleType.Numerical;
//定义线条上点的标识形状
((LineSeriesView)S1.View).LineMarkerOptions.Kind = MarkerKind.Circle;
//线条的类型,虚线,实线
((LineSeriesView)S1.View).LineStyle.DashStyle = DashStyle.Solid;