mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
[refactor][optimize] item color
This commit is contained in:
@@ -110,6 +110,14 @@ namespace XCharts.Runtime
|
||||
set { if (PropertyUtil.SetColor(ref m_BackgroundColor, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 数据项背景宽度。
|
||||
/// </summary>
|
||||
public float backgroundWidth
|
||||
{
|
||||
get { return m_BackgroundWidth; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_BackgroundWidth, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 中心区域颜色。
|
||||
/// </summary>
|
||||
public Color32 centerColor
|
||||
@@ -126,14 +134,6 @@ namespace XCharts.Runtime
|
||||
set { if (PropertyUtil.SetStruct(ref m_CenterGap, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 数据项背景宽度。
|
||||
/// </summary>
|
||||
public float backgroundWidth
|
||||
{
|
||||
get { return m_BackgroundWidth; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_BackgroundWidth, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 边框的颜色。
|
||||
/// </summary>
|
||||
public Color32 borderColor
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace XCharts.Runtime
|
||||
private ChartLabel m_Label;
|
||||
private List<float> m_FpsList = new List<float>();
|
||||
|
||||
public bool showAllChartObject { get { return m_ShowAllChartObject; } }
|
||||
public bool showAllChartObject { get { return m_ShowAllChartObject; } set { m_ShowAllChartObject = value; } }
|
||||
public bool foldSeries { get { return m_FoldSeries; } set { m_FoldSeries = value; } }
|
||||
public float fps { get; private set; }
|
||||
public float avgFps { get; private set; }
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace XCharts.Runtime
|
||||
|
||||
UpdateRuntimeData(markArea);
|
||||
|
||||
var colorIndex = chart.GetLegendRealShowNameIndex(serie.serieName);
|
||||
var colorIndex = chart.GetLegendRealShowNameIndex(serie.legendName);
|
||||
var serieColor = SerieHelper.GetLineColor(serie, null, chart.theme, colorIndex, false);
|
||||
var areaColor = markArea.itemStyle.GetColor(serieColor);
|
||||
UGL.DrawRectangle(vh, markArea.runtimeRect, areaColor, areaColor);
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace XCharts.Runtime
|
||||
var serie = chart.GetSerie(markLine.serieIndex);
|
||||
if (!serie.show || !markLine.show) return;
|
||||
ResetTempMarkLineGroupData(markLine);
|
||||
var serieColor = (Color)chart.theme.GetColor(chart.GetLegendRealShowNameIndex(serie.serieName));
|
||||
var serieColor = (Color) chart.GetItemColor(serie);
|
||||
if (m_TempGroupData.Count > 0)
|
||||
{
|
||||
foreach (var kv in m_TempGroupData)
|
||||
|
||||
Reference in New Issue
Block a user