找传奇、传世资源到传世资源站!

DevExpress动态创建统计图

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

how-to-programmatically-create-a-chart

using System.Collections;using System.Windows;using DevExpress.Xpf.Charts;namespace DXCharts_Runtime { public partial class MainWindow : Window { public MainWindow () { InitializeComponent(); } private void Window_Loaded (object sender, RoutedEventArgs e) { // Create a chart. ChartControl chart = new ChartControl(); // Create a diagram. XYDiagram2D diagram = new XYDiagram2D(); chart.Diagram = diagram; // Create a bar series. BarSideBySideSeries2D series = new BarSideBySideSeries2D(); diagram.Series.Add(series); // Add points to the series. series.Points.Add(new SeriesPoint("A", 1)); series.Points.Add(new SeriesPoint("B", 3)); series.Points.Add(new SeriesPoint("C", 5)); series.Points.Add(new SeriesPoint("D", 2)); series.Points.Add(new SeriesPoint("E", 7)); // Add the chart to the window. this.Content = chart; } }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复