彩票走势图

[DevExpress] ChartControl雷达图样式设置

转帖|使用教程|编辑:龚雪|2017-01-24 17:09:37.000|阅读 899 次

概述:如何在DevExpress中定义雷达图样式

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

1. 先设置主体,把背景设置成透明

ShapeStyle="Polygon"是设置雷达图的形状,Polygon指多边形,Circle指圆圈

RotationDirection="Clockwise",设置数据是否顺时针显示

2.设置AxisY

    <dxc:RadarDiagram2D.AxisY>
        <dxc:RadarAxisY2D GridLinesBrush="#FF0885FF" GridLinesMinorVisible="False" Brush="Transparent">
            <dxc:RadarAxisY2D.NumericScaleOptions>
                <dxc:ContinuousNumericScaleOptions AutoGrid="False" GridSpacing="20" GridOffset="0" ></dxc:ContinuousNumericScaleOptions>
            </dxc:RadarAxisY2D.NumericScaleOptions>
            <dxc:RadarAxisY2D.Label>
                <dxc:AxisLabel Visible="False"></dxc:AxisLabel>
            </dxc:RadarAxisY2D.Label>
            <dxc:RadarAxisY2D.WholeRange>
                <dxc:Range MinValue="0" MaxValue="100" AutoSideMargins="False"></dxc:Range>
            </dxc:RadarAxisY2D.WholeRange>
        </dxc:RadarAxisY2D>
    </dxc:RadarDiagram2D.AxisY>

GridLinesMinorVisible设置是否补充线条,

AutoGrid="False" GridSpacing="20"设置刻度间隔

dxc:AxisLabel Visible="False"这个可以设置是否显示Y刻度

Range可默认设置

3. 设置AxisX

    <dxc:RadarDiagram2D.AxisX>
        <dxc:RadarAxisX2D GridLinesVisible="True" Interlaced="False" GridLinesMinorVisible="False" GridLinesBrush="#FF0885FF">
            <dxc:RadarAxisX2D.Label>
                <dxc:AxisLabel Foreground="White"> 
                </dxc:AxisLabel>
            </dxc:RadarAxisX2D.Label>
        </dxc:RadarAxisX2D>
    </dxc:RadarDiagram2D.AxisX>

GridLinesBrush设置中间交叉线的颜色

dxc:AxisLabel设置数据标题的样式

4. 数据

    <dxc:RadarDiagram2D.Series>
        <dxc:RadarAreaSeries2D Transparency="0.7" Brush="GreenYellow">
            <dxc:RadarAreaSeries2D.MarkerModel>
                <dxc:CustomMarker2DModel>
                    <dxc:CustomMarker2DModel.PointTemplate>
                        <ControlTemplate TargetType="dxc:CustomModelControl">
                            <Ellipse Width="4" Height="4" Fill="GreenYellow"></Ellipse>
                        </ControlTemplate>
                    </dxc:CustomMarker2DModel.PointTemplate>
                </dxc:CustomMarker2DModel>
            </dxc:RadarAreaSeries2D.MarkerModel>
            <dxc:RadarAreaSeries2D.Label>
                <dxc:SeriesLabel Visible="True" ConnectorVisible="False" ElementTemplate="{StaticResource LabelItemDataTemplate}" 
                                    Indent="0" dxc:CircularSeries2D.Angle="0"></dxc:SeriesLabel>
            </dxc:RadarAreaSeries2D.Label>
            <dxc:SeriesPoint Argument="C#" Value="95" Tag="30"></dxc:SeriesPoint>
            <dxc:SeriesPoint Argument="Java" Value="20" Tag="100" />
            <dxc:SeriesPoint Argument="Python" Value="60" Tag="30" />
            <dxc:SeriesPoint Argument="Ruby" Value="80" Tag="20"/>
            <dxc:SeriesPoint Argument="VB.Net" Value="50" Tag="0"/>
            <dxc:SeriesPoint Argument="VBA" Value="90" Tag="62" />
        </dxc:RadarAreaSeries2D>
    </dxc:RadarDiagram2D.Series>

CustomMarker2DModel.PointTemplate可以重写数据点的模板

dxc:SeriesLabel Visible="True" ConnectorVisible="False" ElementTemplate="{StaticResource LabelItemDataTemplate}"  设置数据值的显示样式

效果展示:

想要了解更多DevExpress使用技巧?海量视频课程以及最专业的DevExpress培训尽在。


标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn


为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP