找回密码
 立即注册

QQ登录

只需一步,快速开始

studynew

注册会员

1

主题

1

帖子

17

积分

注册会员

积分
17
最新发帖
studynew
注册会员   /  发表于:2020-8-4 09:33  /   查看:2461  /  回复:1
本帖最后由 studynew 于 2020-8-4 09:35 编辑

this.Pie1.ItemsSource = GenDemoData();
private List< PieData> GenDemoData()
        {
            List< PieData> list = new List< PieData>();

            for (int i = 0; i < 4; i++)
            {
                list.Add(new PieData("Item " + (i + 1), rnd.Next(1000)));
            }

            return list;
        }

public class PieData
    {
        private string name = string.Empty;
        private int count = 0;

        public PieData(string name, int count)
        {
            this.name = name;
            this.count = count;
        }

        public string Name
        {
            get
            {
                return name;
            }

            set
            {
                name = value;
            }
        }

        public int Count
        {
            get
            {
                return count;
            }

            set
            {
                count = value;
            }
        }
    }

MainWindow.xaml中
<c1:C1FlexPie x:Name=" Pie1" Binding="Count" BindingName="Name"  >
                <c1:C1FlexPie.DataLabel>
                    <c1: PieDataLabel Content="{}{y}" Position="Outside"/>
                </c1: C1FlexPie.DataLabel>
            </c1:C1FlexPie>

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

1 个回复

倒序浏览
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2020-8-4 14:40:36
沙发
已经打开和运行了项目,看起来代码没有问题,我这里测试也是可以正常刷新的
目前我测试使用的版本是4.5.20202.716,具体是不是新老版本的问题还要确认,我建议你还是再去确认一下如问题,以及重现方法
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部