* UILineChart: 显示点的颜色支持自定义
This commit is contained in:
parent
39a8472c85
commit
cd56ac542e
Binary file not shown.
Binary file not shown.
@ -48,7 +48,6 @@ namespace Sunny.UI.Demo
|
||||
series.Symbol = UILinePointSymbol.Star;
|
||||
series.SymbolSize = 4;
|
||||
series.SymbolLineWidth = 2;
|
||||
series.SymbolColor = Color.Red;
|
||||
series.Smooth = true;
|
||||
series.ShowLine = !cbPoints.Checked;
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
* 2021-06-18: V3.0.4 显示鼠标点格式更新
|
||||
* 2021-07-22: V3.0.5 可自定义背景色,增加实时数据的Demo
|
||||
* 2021-08-23: V3.0.6 增加可只显示点的模式
|
||||
* 2021-10-02: V3.0.8 支持数据包括Nan
|
||||
******************************************************************************/
|
||||
|
||||
using System;
|
||||
@ -450,7 +451,7 @@ namespace Sunny.UI
|
||||
foreach (var series in Option.Series.Values)
|
||||
{
|
||||
Color color = series.Color;
|
||||
if (!series.CustomColor) color = ChartStyle.GetColor(idx);
|
||||
if (series.SymbolColor.IsValid()) color = series.SymbolColor;
|
||||
|
||||
if (series.Symbol != UILinePointSymbol.None)
|
||||
{
|
||||
|
@ -280,7 +280,7 @@ namespace Sunny.UI
|
||||
|
||||
public int SymbolLineWidth { get; set; } = 1;
|
||||
|
||||
public Color SymbolColor { get; set; }
|
||||
public Color SymbolColor { get; set; } = Color.Empty;
|
||||
|
||||
public bool CustomColor { get; set; }
|
||||
|
||||
@ -355,6 +355,8 @@ namespace Sunny.UI
|
||||
public void Clear()
|
||||
{
|
||||
ContainsNan = false;
|
||||
SymbolColor = Color.Empty;
|
||||
|
||||
XData.Clear();
|
||||
YData.Clear();
|
||||
ClearPoints();
|
||||
|
Loading…
x
Reference in New Issue
Block a user