常用属性
一、PlotModel 模型
public PlotModel()
{this.Axes = new ElementCollection(this); this.Series = new ElementCollection(this); this.Annotations = new ElementCollection(this); this.Legends = new ElementCollection(this); this.PlotType = PlotType.XY; this.PlotMargins = new OxyThickness(double.NaN); this.Padding = new OxyThickness(8); this.Background = OxyColors.Undefined; this.PlotAreaBackground = OxyColors.Undefined; this.TextColor = OxyColors.Black; this.TitleColor = OxyColors.Automatic; this.SubtitleColor = OxyColors.Automatic; this.DefaultFont = "Segoe UI"; this.DefaultFontSize = 12; this.TitleToolTip = null; this.TitleFont = null; this.TitleFontSize = 18; this.TitleFontWeight = FontWeights.Bold; this.SubtitleFont = null; this.SubtitleFontSize = 14; this.SubtitleFontWeight = FontWeights.Normal; this.TitlePadding = 6; this.ClipTitle = true; this.TitleClippingLength = 0.9; this.PlotAreaBorderColor = OxyColors.Black; this.PlotAreaBorderThickness = new OxyThickness(1); this.EdgeRenderingMode = EdgeRenderingMode.Automatic; this.AssignColorsToInvisibleSeries = true; this.IsLegendVisible = true; this.DefaultColors = new List {OxyColor.FromRgb(0x4E, 0x9A, 0x06),OxyColor.FromRgb(0xC8, 0x8D, 0x00),OxyColor.FromRgb(0xCC, 0x00, 0x00),OxyColor.FromRgb(0x20, 0x4A, 0x87),OxyColors.Red,OxyColors.Orange,OxyColors.Yellow,OxyColors.Green,OxyColors.Blue,OxyColors.Indigo,OxyColors.Violet};this.AxisTierDistance = 4.0;
}
***其他属性****
RenderingDecorator
Subtitle
Title
TitleHorizontalAlignment ***只读属性****
ActualPlotMargins
PlotView
PlotBounds
Width
Height
PlotAndAxisArea
PlotArea
TitleArea
DefaultAngleAxis
DefaultMagnitudeAxis
DefaultXAxis
DefaultYAxis
DefaultColorAxis
二、Axis 坐标轴
protected Axis()
{this.Position = AxisPosition.Left; this.PositionTier = 0; this.IsAxisVisible = true; this.Layer = AxisLayer.BelowSeries; this.ViewMaximum = double.NaN; this.ViewMinimum = double.NaN; this.AbsoluteMaximum = double.MaxValue; this.AbsoluteMinimum = double.MinValue; this.Minimum = double.NaN; this.Maximum = double.NaN; this.MinorStep = double.NaN; this.MajorStep = double.NaN; this.MinimumMinorStep = 0; this.MinimumMajorStep = 0; this.MinimumPadding = 0.01; this.MaximumPadding = 0.01; this.MinimumRange = 0; this.MaximumRange = double.PositiveInfinity; this.MinimumDataMargin = 0; this.MaximumDataMargin = 0; this.MinimumMargin = 0; this.MaximumMargin = 0; this.TickStyle = TickStyle.Outside; this.TicklineColor = OxyColors.Black; this.MinorTicklineColor = OxyColors.Automatic; this.AxislineStyle = LineStyle.None; this.AxislineColor = OxyColors.Black; this.AxislineThickness = 1.0; this.MajorGridlineStyle = LineStyle.None; this.MajorGridlineColor = OxyColor.FromArgb(0x40, 0, 0, 0); this.MajorGridlineThickness = 1; this.MinorGridlineStyle = LineStyle.None; this.MinorGridlineColor = OxyColor.FromArgb(0x20, 0, 0, 0x00); this.MinorGridlineThickness = 1; this.ExtraGridlineStyle = LineStyle.Solid; this.ExtraGridlineColor = OxyColors.Black; this.ExtraGridlineThickness = 1; this.MinorTickSize = 4; this.MajorTickSize = 7; this.StartPosition = 0; this.EndPosition = 1; this.TitlePosition = 0.5; this.TitleFormatString = "{0} [{1}]"; this.TitleClippingLength = 0.9; this.TitleColor = OxyColors.Automatic; this.TitleFontSize = double.NaN; this.TitleFontWeight = FontWeights.Normal; this.ClipTitle = true; this.Angle = 0; this.IsZoomEnabled = true; this.IsPanEnabled = true; this.FilterMinValue = double.MinValue; this.FilterMaxValue = double.MaxValue; this.FilterFunction = null; this.IntervalLength = 60; this.AxisDistance = 0; this.AxisTitleDistance = 4; this.AxisTickToLabelDistance = 4; this.DataMaximum = double.NaN; this.DataMinimum = double.NaN;
}
CropGridlines
ExtraGridlines
Key
LabelFormatter
PositionAtZeroCrossing
StringFormat
Title
TitleFont
Unit
UseSuperExponentialFormat
ActualMajorStep
ActualMaximum
ActualMinimum
ClipMaximum
ClipMinimum
ActualMinorStep
ActualStringFormat
ActualTitle
IsReversed
Offset
Scale
ScreenMax
ScreenMin
DesiredMargin
三、Series 曲线
Background IsVisible Title LegendKey SeriesGroupName RenderInLegend TrackerFormatString TrackerKey
四、Annotation 注解
Layer XAxis XAxisKey YAxis YAxisKey ClipByXAxis ClipByYAxis
五、LegendBase 图例
Key
IsLegendVisible
LegendOrientation
LegendPadding
LegendSymbolLength
LegendSymbolMargin
LegendSymbolPlacement
LegendTitle
LegendTitleColor
LegendTitleFont
LegendTitleFontSize
LegendTitleFontWeight
LegendArea
LegendSize
LegendBackground
LegendBorder
LegendBorderThickness
LegendColumnSpacing
LegendFont
LegendFontSize
LegendTextColor
LegendFontWeight
LegendItemAlignment
LegendItemOrder
LegendItemSpacing
LegendLineSpacing
LegendMargin
LegendMaxWidth
LegendMaxHeight
LegendPlacement
LegendPosition
AllowUseFullExtent
ShowInvisibleSeries
常用操作说明
操作 | 功能 |
---|
鼠标控件区域滚动 | 同时缩放X轴和Y轴内容 |
鼠标X轴标尺上滚动 | 缩放X轴方向内容 |
鼠标Y轴标尺上滚动 | 缩放Y轴方向内容 |
Ctrl+双击鼠标右键 | 曲线图内容自适应显示 |
Ctrl+鼠标右键画框 | 放大选定区域 |
双击鼠标中键 | 曲线图内容自适应显示 |
鼠标中键画框 | 放大选定区域 |