最近在AE开发中用到了 DevExpress.XtraCharts.Series.Label.PointOptions这个属性,vs下编译出现如下警告
该警告的意思是项目中使用的这个属性已经过时,建议使用series.Label.TextPattern这个属性:
//
// 摘要:
// Gets or sets a string which represents the pattern specifying the text to
// be displayed within series labels.
[Category("Behavior")]
[Editor("DevExpress.XtraCharts.Design.SeriesLabelTextPatternEditor,DevExpress.XtraCharts.v15.1.Wizard, Version=15.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a", typeof(UITypeEditor))]
[XtraSerializableProperty]
public string TextPattern { get; set; }
修改后:
这里总结一下TextPattern的用法:她是一个string类型的属性,表示数据标签上要显示的内容
其可选的值为{A}{V}{S} 一般的这是方式有series.Label.TextPattern = "{V}";//series.Label.TextPattern = "{V}{A}"等
{A}表示argument {V}表示数据值 {S}表示series
如果series.Label.TextPattern=“”{A}//{V}//{S}“” ,则效果如下: