• chart控件基础设置


    1.chart图显示点和数值:
          <dxc:LineSeries2D AxisY="{Binding ElementName=axisy1}" DisplayName="Ratio" ArgumentDataMember="UserName" ValueDataMember="DefectRatio" CrosshairLabelPattern="{}{S}: {V:0.00%}" LabelsVisibility="False" MarkerVisible="True">
                                            <dxc:LineSeries2D.LineStyle>
                                                <dxc:LineStyle Thickness="3"/>
                                            </dxc:LineSeries2D.LineStyle>
                                        </dxc:LineSeries2D>
    LabelsVisibility :是否显示数值
    MarkerVisible:是否显示点
     
    2.设置Y轴不从0开始显示:
     <dxc:XYDiagram2D.AxisY>
                                            <dxc:AxisY2D>
                                                <dxc:AxisY2D.Label>
                                                    <dxc:AxisLabel TextPattern="{}{V:p}"/>
                                                </dxc:AxisY2D.Label>
                                                <dxc:AxisY2D.WholeRange>
                                                    <dxc:Range dxc:AxisY2D.AlwaysShowZeroLevel="False"/>
                                                </dxc:AxisY2D.WholeRange>
                                            </dxc:AxisY2D>
                                        </dxc:XYDiagram2D.AxisY>

    3.设置Line:

    <dxc:LineSeries2D DisplayName="Dwell Yield Target" AxisY="{Binding ElementName=axisy0}" ArgumentDataMember="X" 
                                          ValueDataMember="Y5" Brush="#9D3D3A" MarkerVisible="False"  LabelsVisibility="True" CrosshairLabelPattern="{}{S}: {V:0.00%}">
                                                <dxc:LineSeries2D.MarkerModel>
                                                    <dxc:SquareMarker2DModel/>
                                                </dxc:LineSeries2D.MarkerModel>
                                                <dxc:LineSeries2D.Label>
                                                    <dxc:SeriesLabel TextPattern="{}{V:0.0%}" ConnectorVisible="False" ResolveOverlappingMode="HideOverlapped">
                                                        <dxc:SeriesLabel.ElementTemplate>
                                                            <DataTemplate>
                                                                <Border>
                                                                    <Label Content="{Binding Path=Text}" Foreground="Black" FontSize="10"/>
                                                                </Border>
                                                            </DataTemplate>
                                                        </dxc:SeriesLabel.ElementTemplate>
                                                    </dxc:SeriesLabel>
                                                </dxc:LineSeries2D.Label>
                                                <dxc:LineSeries2D.LineStyle>
                                                    <dxc:LineStyle Thickness="2">
                                                        <dxc:LineStyle.DashStyle>
                                                            <DashStyle Dashes="3" Offset="0">
                                                            </DashStyle>
                                                        </dxc:LineStyle.DashStyle>
                                                    </dxc:LineStyle>
                                                </dxc:LineSeries2D.LineStyle>
                                            </dxc:LineSeries2D>

    Thickness:设置Line的宽度

    Dashes:点与线之前的长度

  • 相关阅读:
    四、单片机学习——矩阵键盘实验
    二、单片机学习——独立按键实验
    三、单片机学习——数码管实验(共阳)
    一、单片机学习——流水灯实验
    Cacti监控Linux安装配置snmp服务
    firewalld和iptables区别
    Zabbix图形界面乱码修复为中文显示
    Centos7安装Zabbix 5.0 LTS 版本安装(详细版)
    Ubuntu Server 18.04 网络配置
    linux下开启root用户远程登录,允许无密码登录
  • 原文地址:https://www.cnblogs.com/Pomelo-now/p/9930117.html
Copyright © 2020-2023  润新知