XtraChart中的图例无法显示 [英] Legend in XtraChart cannot display

查看:191
本文介绍了XtraChart中的图例无法显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有一个报告,其中有一个显示结果的图表。图表可以很好地显示,但没有图例。对我的设计视图无法打开(我也不知道为什么它也无法打开,对不起)。我尝试在后面的代码中创建它如下:



Hi i have a report which has a chart to display the result. The chart can display well but there is no legend on it. My design view cannot be opened(i dont have any idea on why it cant be opened also, sorry). I tried create it in code behind as follow:

this.xrChart1.Legend.AlignmentVertical = DevExpress.XtraCharts.LegendAlignmentVertical.Top;

this.xrChart1.Legend.AlignmentHorizontal = DevExpress.XtraCharts.LegendAlignmentHorizontal.Right;

this.xrChart1.Legend.MaxVerticalPercentage = 60;







但传说不会显示出来,任何想法都会受到赞赏。 FIY,我把上面的代码放在Report.Designer.cs而不是Report.aspx.cs中。它会影响结果吗?




but the legend would not display out, any ideas would be appreciated. FIY, i put the above codes inside the Report.Designer.cs instead of Report.aspx.cs. Would it affect the outcome?

推荐答案

在您使用图表时声明的系列下。例如series1,series2等,这样写:



under the Series which you have declared if you are using chart. For example series1, series2, etc. write like this:

series1.Name = "any name here";





的颜色传说将自动遵循系列的颜色。



the colour of the legends will automatically follow the series's colour.


这篇关于XtraChart中的图例无法显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆