LiveCharts文档-3开始-5序列Series
LiveCharts文档-3开始-5序列Series
Strokes和Fills 笔触和填充
所有的Series都有笔触和填充属来处理颜色,都支持的是System.Windows.Media.Brush.你也可以使用复杂的填充和笔触,请参阅其他的文章。
mySeries.Fill = Brushes.Red;
mySeries.Stroke = Brushes.Blue;
Stroke 间隔和粗细
使用Series.StrokeThickness属性设置笔触粗细,使用Series.StrokeDashArray属性来设置间隔。
mySeries.StrokeDashArray = new DoubleCollection {2};
ZIndex 叠放顺序
每个series绘制的每个形状都绑定在Panel.ZIndex属性上,所以你可以非常容易的控制每个Series的叠放顺序。这里有一个小例子。
System.Windows.Controls.Panel.SetZIndex(mySeries, 0);
System.Windows.Controls.Panel.SetZIndex(mySeries, 1);
System.Windows.Controls.Panel.SetZIndex(mySeries, 2);
Visibility 可见性
所有绘制的形状也都绑定在Series.Visibility属性上,你可以在程序运行的时候很容易的控制series的可见性。
注意:所有stacked series(包括pie series)不仅会在可见性上有变化,同时也会从stakced值中移除这个series,整个chart都会被更新,如果这个series不存在的话。
特殊的属性
有一些属性只存在特定的series中,想要看关于定制series的更多信息,请查看之后的文章。
请看下面这个例子:

using System;
using System.Drawing;
using System.Windows.Forms;
using LiveCharts;
using LiveCharts.Wpf;
namespace Winforms.Cartesian.Customized_Series
{
public partial class CustomizedSeries : Form
{
public CustomizedSeries()
{
InitializeComponent();
cartesianChart1.Series.Add(new LineSeries
{
Values = new ChartValues<double> { 3, 4, 6, 3, 2, 6 },
StrokeThickness = 4,
StrokeDashArray = new System.Windows.Media.DoubleCollection(20),
Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(107, 185, 69)),
Fill = System.Windows.Media.Brushes.Transparent,
LineSmoothness = 0,
PointGeometry = null
});
cartesianChart1.Series.Add(new LineSeries
{
Values = new ChartValues<double> { 5, 3, 5, 7, 3, 9 },
StrokeThickness = 2,
Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(28, 142, 196)),
Fill = System.Windows.Media.Brushes.Transparent,
LineSmoothness = 1,
PointGeometrySize = 15,
PointForeround =
new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(34, 46, 49))
});
cartesianChart1.Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(34, 46, 49));
cartesianChart1.AxisX.Add(new Axis
{
IsMerged = true,
Separator = new Separator
{
StrokeThickness = 1,
StrokeDashArray = new System.Windows.Media.DoubleCollection(2),
Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(64, 79, 86))
}
});
cartesianChart1.AxisY.Add(new Axis
{
IsMerged = true,
Separator = new Separator
{
StrokeThickness = 1.5,
StrokeDashArray = new System.Windows.Media.DoubleCollection(4),
Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(64, 79, 86))
}
});
}
}
}
LiveCharts文档-3开始-5序列Series的更多相关文章
- LiveCharts文档-3开始-3类型和设置
原文:LiveCharts文档-3开始-3类型和设置 LiveCharts文档-3开始-3类型和设置 类型和设置 这一部分非常的重要,涉及到LiveCharts的基本构成单元的介绍 LiveChart ...
- LiveCharts文档-3开始-7标签
原文:LiveCharts文档-3开始-7标签 LiveCharts文档-3开始-7标签 Label就是Chart中表示数值的字符串,通常被放置在轴的位置和提示当中. 下图中的这些字符串显示的都是标签 ...
- LiveCharts文档-3开始-8自定义工具提示
原文:LiveCharts文档-3开始-8自定义工具提示 LiveCharts文档-3开始-8自定义工具提示 默认每个需要tooltip或者legend的chart都会初始化一个DefaultLeng ...
- LiveCharts文档-4基本绘图-1基本线条图
原文:LiveCharts文档-4基本绘图-1基本线条图 4基本绘图-1基本线条图 using System; using System.Windows.Forms; using System.Win ...
- LiveCharts文档-4基本绘图-2基本柱形图
原文:LiveCharts文档-4基本绘图-2基本柱形图 4基本绘图-2基本柱形图 using System.Windows.Forms; using LiveCharts; using LiveCh ...
- LiveCharts文档-3开始-4可用的图表
原文:LiveCharts文档-3开始-4可用的图表 LiveCharts文档-3开始-4可用的图表 LiveCharts共有5类图表,你将会在后面的章节当中看到这些图表的使用方法. Cartesia ...
- LiveCharts文档-3开始-2基础
原文:LiveCharts文档-3开始-2基础 LiveCharts文档-3开始-2基础 基本使用 LiveCharts设计的很容易使用,所有的东西都可以自动的实现更新和动画,库会在它觉得有必要更新的 ...
- LiveCharts文档-4基本绘图-3其他
原文:LiveCharts文档-4基本绘图-3其他 4基本绘图-3其他 因为每个图表的使用方法大同小异,所以不再啰嗦重复,具体直接看这个链接里的介绍.原文链接 其他的图表类型有 基本堆叠图 基本条形图 ...
- LiveCharts文档-3开始-6轴Axes
原文:LiveCharts文档-3开始-6轴Axes LiveCharts文档-3开始-6轴Axes 通常来说,你可以自定义LiveChart里的任何东西,Axes也不例外.下面这幅图展示了Axes. ...
随机推荐
- (网页)20个JS 小技巧超级实用
转自CSDN: 1. 将彻底屏蔽鼠标右键 oncontextmenu=”window.event.returnValue=false”< table border oncontextmenu=r ...
- [20171113]修改表结构删除列相关问题2.txt
[20171113]修改表结构删除列相关问题2.txt --//测试看看修改表结构删除列产生的redo向量,对这些操作细节不了解,分析redo看看. 1.环境:SCOTT@book> @ &am ...
- Sublime Text 3 注册码激活码被移除的解决办法
新版的sublime text3中加入了验证功能,之前成功注册的也被移除了,在网上搜索的验证码要么已经失效要么已经被封,少数几个正常的注册输入进去注册成功后几分钟之内这个注册码就会被莫名其妙的被移除. ...
- Kubernetes 核心概念
什么是Kubernetes? Kubernetes(k8s)是自动化容器操作的开源平台,这些操作包括部署,调度和节点集群间扩展.如果你曾经用过Docker容器技术部署容器,那么可以将Docker看成K ...
- JUnit单元测试入门
什么是单元测试 写了个类,要给别人用,会不会有bug?怎么办?测试一下. 用main方法测试好不好?不好! 不能一起运行! 大多数情况下需要人为的观察输出确定是否正确 为什么要进行单元测试 重用测试, ...
- apache 80端口占用问题
今天安装mongodb后发现apache无法启动 命令行 services.msc 打开服务 在服务里启动Apache2a服务,报错误码1 网上查有很多情况都报的1 可以通过命令行下 执行apach ...
- 真机测试以及appstore发布流程
一.添加真机测试流程:http://jingyan.baidu.com/article/48b558e33b96a27f38c09aa4.html 二.app发布流程:http://jingyan.b ...
- localStorage 知识点
先补充下localStorage 知识点:JS对象读取形式:localStorage.name添加/修改localStorage.name = "xuanyuan"其中" ...
- 使用POI转换word doc文件
目录 1 转换为Html文件 2 转换为Xml文件 3 转换为Text文件 在POI中还存在有针对于word doc文件进行格式转换的功能.我们可以将word的内容 ...
- poi对excel的基本读写操作
最近简单的弄了下poi对excel的应用,为方便自己以后的使用就把一些基本操作记录下来,其他更复杂的操作可以等以后有需求的时候再来深入了解一番! 写操作: /** * * 层次结构就是workbook ...