mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
增加桑基图相关支持
This commit is contained in:
@@ -31,6 +31,7 @@ namespace XCharts.Runtime
|
||||
public virtual void OnBeginDrag(PointerEventData eventData) { }
|
||||
public virtual void OnEndDrag(PointerEventData eventData) { }
|
||||
public virtual void OnScroll(PointerEventData eventData) { }
|
||||
public virtual void OnDataUpdate() { }
|
||||
public virtual void RefreshLabelNextFrame() { }
|
||||
public virtual void RefreshLabelInternal() { }
|
||||
public virtual void ForceUpdateSerieContext() { }
|
||||
@@ -38,7 +39,8 @@ namespace XCharts.Runtime
|
||||
public virtual void UpdateTooltipSerieParams(int dataIndex, bool showCategory,
|
||||
string category, string marker,
|
||||
string itemFormatter, string numericFormatter, string ignoreDataDefaultContent,
|
||||
ref List<SerieParams> paramList, ref string title) { }
|
||||
ref List<SerieParams> paramList, ref string title)
|
||||
{ }
|
||||
public virtual void OnLegendButtonClick(int index, string legendName, bool show) { }
|
||||
public virtual void OnLegendButtonEnter(int index, string legendName) { }
|
||||
public virtual void OnLegendButtonExit(int index, string legendName) { }
|
||||
@@ -76,7 +78,7 @@ namespace XCharts.Runtime
|
||||
|
||||
internal override void SetSerie(Serie serie)
|
||||
{
|
||||
this.serie = (T) serie;
|
||||
this.serie = (T)serie;
|
||||
this.serie.context.param.serieType = typeof(T);
|
||||
m_NeedInitComponent = true;
|
||||
AnimationStyleHelper.UpdateSerieAnimation(serie);
|
||||
@@ -107,6 +109,7 @@ namespace XCharts.Runtime
|
||||
}
|
||||
if (serie.dataDirty)
|
||||
{
|
||||
OnDataUpdate();
|
||||
SeriesHelper.UpdateSerieNameList(chart, ref chart.m_LegendRealShowName);
|
||||
chart.OnSerieDataUpdate(serie.index);
|
||||
serie.OnDataUpdate();
|
||||
@@ -387,7 +390,7 @@ namespace XCharts.Runtime
|
||||
return;
|
||||
}
|
||||
InitRoot();
|
||||
var dataAutoColor = (Color) chart.GetLegendRealShowNameColor(serie.legendName);
|
||||
var dataAutoColor = (Color)chart.GetLegendRealShowNameColor(serie.legendName);
|
||||
m_EndLabel = ChartHelper.AddChartLabel(s_SerieEndLabelObjectName, m_SerieRoot.transform, serie.endLabel,
|
||||
chart.theme.common, "", dataAutoColor, TextAnchor.MiddleLeft);
|
||||
m_EndLabel.SetActive(serie.endLabel.show);
|
||||
@@ -599,7 +602,7 @@ namespace XCharts.Runtime
|
||||
var colorIndex = serie.colorByData ? serieData.index : serie.index;
|
||||
Color32 color, toColor;
|
||||
SerieHelper.GetItemColor(out color, out toColor, serie, serieData, chart.theme, colorIndex, SerieState.Normal, false);
|
||||
return (Color) color;
|
||||
return (Color)color;
|
||||
}
|
||||
|
||||
protected void UpdateCoordSerieParams(ref List<SerieParams> paramList, ref string title,
|
||||
|
||||
Reference in New Issue
Block a user