找回密码
 立即注册

QQ登录

只需一步,快速开始

SAEUSER001
注册会员   /  发表于:2017-10-9 10:01  /   查看:3228  /  回复:1
C1Chart如何显示百分比(不修改原始数据):

y轴原始数据没有乘以100,数据如这样的格式:0.08;0.9;0.8 ......
希望在y轴显示数据时,能在原始数据的基础上乘以100,即:8;90;80.....

我看YFunction类好像能实现这样的功能,但不知道怎么用?
            private class PercentFunction : ISimpleFunction
            {
                public double Calculate(double x)
                {
                    return x * 100;
                }
            }


//使用:
YFunction _YFunction;
_YFunction = new YFunction();
_YFunction.CustomFunction = new PercentFunction();

chart.ChartGroups.Group0.ChartData.FunctionsList.Clear();
chart.ChartGroups.Group0.ChartData.FunctionsList.Add(yfun);


但这样会在“Legend”区域多出一条线,具体y轴数据还是没变化。


本帖子中包含更多资源

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

x

1 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-10-9 17:45:47
沙发
图表都是根据数据实际展示的,您这个需求需要调研一下看有没有可行方案
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部