zoukankan      html  css  js  c++  java
  • wpf使用livecharts---曲线隐藏/虚线化方格线(X/Y轴)、去掉阴影

    隐藏X轴,Y轴显示虚线:

    <lvc:CartesianChart Grid.Row="2" Grid.Column="0" Name="cartesianChart1" DisableAnimations="True" Visibility="Hidden" Hoverable="False" DataTooltip="{x:Null}"  Margin="20,20,0,20" Series="{Binding SeriesCollection1}" LegendLocation="None">
        <lvc:CartesianChart.AxisX>
            <lvc:Axis Labels="{Binding Labels1}" FontSize="12" LabelsRotation="0" DisableAnimations="True">
                <lvc:Axis.Separator>
                    <lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
                    </lvc:Separator>
                </lvc:Axis.Separator>
            </lvc:Axis>
        </lvc:CartesianChart.AxisX>
        <lvc:CartesianChart.AxisY>
            <lvc:Axis>
                <lvc:Axis.Separator>
                    <lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Step="{Binding AxisStep}"  Stroke="#404F56" >
                    </lvc:Separator>
                </lvc:Axis.Separator>
            </lvc:Axis>
        </lvc:CartesianChart.AxisY>
    </lvc:CartesianChart>

    去掉阴影:

    直接设置Fill属性为透明即可:

    前台设置:Fill=“transparent”;

    后台控制:

     //曲线阴影区域不显示背景色
    var fill = new SolidColorBrush();
    fill.Opacity = 1;
    
    LineSeries setTemp = new LineSeries();
    setTemp.Fill = fill;
  • 相关阅读:
    二叉树的创建、遍历、翻转
    KVO
    Objective-C Runtime 的一些理解
    深浅拷贝、copy的使用
    Python学习笔记(二)
    Python常见陷阱
    [LeetCode] 36. Valid Sudoku
    [LeetCode] 35. Search Insert Position
    [LeetCode] 34. Search for a Range
    [LeetCode] 33. Search in Rotated Sorted Array
  • 原文地址:https://www.cnblogs.com/wanggang2016/p/13717705.html
Copyright © 2011-2022 走看看