如何使用DevExpress DXCharts创建一个二维面积图(2D Area chart)?
作者:zhuhm 来源:本站原创 浏览:Loading...次 发布时间:2012-09-06 评论:0条
本文主要介绍如何使用DevExpress DXCharts创建一个二维面积图。
VB.NET
<UserControl x:Class="AreaChart.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" >
<Grid x:Name="LayoutRoot" Background="White">
<dxc:ChartControl Name="chartControl1" >
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.Series>
<dxc:AreaSeries2D DisplayName="First Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="1" />
<dxc:SeriesPoint Argument="B" Value="3" />
<dxc:SeriesPoint Argument="C" Value="7" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
<dxc:AreaSeries2D DisplayName="Second Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="2" />
<dxc:SeriesPoint Argument="B" Value="2" />
<dxc:SeriesPoint Argument="C" Value="5" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
</dxc:XYDiagram2D.Series>
<!--region #SideMarginsEnabled-->
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D />
</dxc:XYDiagram2D.AxisX>
<!--endregion #SideMarginsEnabled-->
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
<dxc:ChartControl.Legend>
<dxc:Legend />
</dxc:ChartControl.Legend>
</dxc:ChartControl>
</Grid>
</UserControl>
<UserControl x:Class="AreaChart.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" >
<Grid x:Name="LayoutRoot" Background="White">
<dxc:ChartControl Name="chartControl1" >
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.Series>
<dxc:AreaSeries2D DisplayName="First Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="1" />
<dxc:SeriesPoint Argument="B" Value="3" />
<dxc:SeriesPoint Argument="C" Value="7" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
<dxc:AreaSeries2D DisplayName="Second Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="2" />
<dxc:SeriesPoint Argument="B" Value="2" />
<dxc:SeriesPoint Argument="C" Value="5" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
</dxc:XYDiagram2D.Series>
<!--region #SideMarginsEnabled-->
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D />
</dxc:XYDiagram2D.AxisX>
<!--endregion #SideMarginsEnabled-->
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
<dxc:ChartControl.Legend>
<dxc:Legend />
</dxc:ChartControl.Legend>
</dxc:ChartControl>
</Grid>
</UserControl>
C#
<UserControl x:Class="AreaChart.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" >
<Grid x:Name="LayoutRoot" Background="White">
<dxc:ChartControl Name="chartControl1" >
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.Series>
<dxc:AreaSeries2D DisplayName="First Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="1" />
<dxc:SeriesPoint Argument="B" Value="3" />
<dxc:SeriesPoint Argument="C" Value="7" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
<dxc:AreaSeries2D DisplayName="Second Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="2" />
<dxc:SeriesPoint Argument="B" Value="2" />
<dxc:SeriesPoint Argument="C" Value="5" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
</dxc:XYDiagram2D.Series>
<!--region #SideMarginsEnabled-->
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D >
<dxc:AxisX2D.Range>
<dxc:AxisRange SideMarginsEnabled="True" />
</dxc:AxisX2D.Range>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<!--endregion #SideMarginsEnabled-->
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
<dxc:ChartControl.Legend>
<dxc:Legend />
</dxc:ChartControl.Legend>
</dxc:ChartControl>
</Grid>
</UserControl>
<UserControl x:Class="AreaChart.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" >
<Grid x:Name="LayoutRoot" Background="White">
<dxc:ChartControl Name="chartControl1" >
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.Series>
<dxc:AreaSeries2D DisplayName="First Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="1" />
<dxc:SeriesPoint Argument="B" Value="3" />
<dxc:SeriesPoint Argument="C" Value="7" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
<dxc:AreaSeries2D DisplayName="Second Series" Transparency="0.5">
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="2" />
<dxc:SeriesPoint Argument="B" Value="2" />
<dxc:SeriesPoint Argument="C" Value="5" />
<dxc:SeriesPoint Argument="D" Value="4" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
</dxc:XYDiagram2D.Series>
<!--region #SideMarginsEnabled-->
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D >
<dxc:AxisX2D.Range>
<dxc:AxisRange SideMarginsEnabled="True" />
</dxc:AxisX2D.Range>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<!--endregion #SideMarginsEnabled-->
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
<dxc:ChartControl.Legend>
<dxc:Legend />
</dxc:ChartControl.Legend>
</dxc:ChartControl>
</Grid>
</UserControl>
本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [http://www.devexpresscn.com/]
本文地址:http://www.devexpresscn.com/DevExpress-Resources/Documentation-223.html
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [http://www.devexpresscn.com/]
本文地址:http://www.devexpresscn.com/DevExpress-Resources/Documentation-223.html
关键字: DXCharts
评论列表
暂无评论
请谈谈你的看法 请使用IE或者Firefox浏览器,暂不支持Chrome!
慧都控件网为DevExpress界面控件的中国地区唯一正式授权经销商,正版控件销售公司,授权代理商,经销商及合作伙伴。
电话:400-700-1020
023-66090381
邮箱:sales@evget.com
相关资源
- GridView详细视图的服务器模式功能使用方法
- 使用CreatePrintInfoInstance导出自定义文本和Gridbands
- Silverlight报表项目中如何实现通过点击列表头排序
- DXGrid的列能不能通过双击列表头实现
- DXPivotGrid如何增加一列百分比
- DXGrid单元格样式
- DevExpress历史版本下载地址大全
- 更改数据单元格的呈现效果
- Chart中图例与鼠标滑过时显示的数据不一致
- DXChart与透视网格控件集成例子中图例显示的问题
- 定义DXGrid的打印外观
- WebChartControl指定显示类型的问题
- ASP.NET MVC应用程序中使用XPO
- ASP.NET MVC应用程序中初始化报表参数
- 如何在web程序的运行时状态下缩放报表?
- DevExpress使用心得
- 如何序列化包含可序列化的DX控件的WPF窗体
- ASPxPopupControl控件实现向下钻取报告
- 放大DXGrid单元格中的图像
- 如何修改DXGrid for WPF单元格的背景色?