日期:2014-05-17  浏览次数:20537 次

NET统计图使用Chartlet控件绑定数据为空时页面出错
Chartlet4.AppearanceStyle = FanG.Chartlet.AppearanceStyles.HBar_2D_Aurora_FlatCrystal_Glow_NoBorder;
        Chartlet4.XLabels.RotateAngle = 0;
        Chartlet4.ChartTitle.Text = "HBar-Pareto (横向柱图-柏拉图)";
        Chartlet4.Fill.TextureEnable = true;
        Chartlet4.BindChartData(ds);
当ds为空时页面出错,怎么办?
我是新手,请大家多多指教!
------解决方案--------------------
 if (ds != null)
            {
                Chartlet4.AppearanceStyle = FanG.Chartlet.AppearanceStyles.HBar_2D_Aurora_FlatCrystal_Glow_NoBorder;
                Chartlet4.XLabels.RotateAngle = 0;
                Chartlet4.ChartTitle.Text = "HBar-Pareto (横向柱图-柏拉图)";
                Chartlet4.Fill.TextureEnable = true;
                Chartlet4.BindChartData(ds);
            }