///
/// 测试表单插件
///
[Description("点线图测试插件")]
public class TestPointLineEdit : AbstractDynamicFormPlugIn
{
private List
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
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);
}
}
为什么我的电线图没显示?
推荐阅读