Devexpress Chart图表控件 如何在WPF 后台代码添加Point数据
1个回答
展开全部
rivate void BindData(ViewType vt)
{
chartControl1.Series.Clear();
//Series series1 = new Series("日志统计", ViewType.RadarArea);
Series series1 = new Series("日志统计", vt);
chartControl1.Series.Add(series1);
string sSQL = string.Format("select code,baseprice from tRoomType");
DataTable tableMain = SqlLiteHelper.GetDataTable(out sError, sSQL);
tableMain.TableName = "主表";
SeriesPoint point = null;
foreach (DataRow row in tableMain.Rows)
{
if (row["code"] != null)
{
point = new SeriesPoint(row["code"].ToString());
double[] vals = { Convert.ToDouble(row["baseprice"]) };
point.Values = vals;
{
chartControl1.Series.Clear();
//Series series1 = new Series("日志统计", ViewType.RadarArea);
Series series1 = new Series("日志统计", vt);
chartControl1.Series.Add(series1);
string sSQL = string.Format("select code,baseprice from tRoomType");
DataTable tableMain = SqlLiteHelper.GetDataTable(out sError, sSQL);
tableMain.TableName = "主表";
SeriesPoint point = null;
foreach (DataRow row in tableMain.Rows)
{
if (row["code"] != null)
{
point = new SeriesPoint(row["code"].ToString());
double[] vals = { Convert.ToDouble(row["baseprice"]) };
point.Values = vals;
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询