移动BOS点线图显示不了
金蝶云社区-King_xk
King_xk
0人赞赏了该文章 574次浏览 未经作者许可,禁止转载编辑于2017年07月07日 22:05:50

///


/// 测试表单插件
///

[Description("点线图测试插件")]
public class TestPointLineEdit : AbstractDynamicFormPlugIn
{
private List _listItem = new List();
Dictionary _dctFormOpenParam = new Dictionary();

#region 重载函数

public override void AfterCreateNewData(EventArgs e)
{
//this.FillData();
this.BindChart();
}
#endregion

private void BindChart()
{
DynamicObject dy = BusinessDataServiceHelper.Load(this.View.Context, "BAM_MOB_ChartData", null, null).FirstOrDefault();
if (dy == null)
{
return;
}

DynamicObjectCollection entityDy = dy["FEntity"] as DynamicObjectCollection;

ChartView chartView = this.View.GetControl("FPointLineChart");
var chartdata = new ChartDataEntity();
chartdata.caption = dy["Caption"].ToString();//"图表测试";
//chartdata.chartype = ChartStyleConst.POINTLINE;
chartdata.xAxisName = dy["xAxisName"].ToString();//"月份";
chartdata.yAxisName = dy["yAxisName"].ToString();//"销量";

foreach (DynamicObject val in entityDy)
{
chartdata.objectData.Add(new ChartDataDetail()
{
categoryName = val["xValue"].ToString(),//"一月份",
categoryvalue = (Decimal)val["yValue"] //1200
});
}
chartView.SetItems(chartdata);
}
}

为什么我的电线图没显示?

001.jpg(69.19KB)

002.jpg(8.50KB)