mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
修复Tooltip在对数轴时指示不准确的问题
This commit is contained in:
@@ -194,6 +194,7 @@ namespace XCharts.Runtime
|
||||
CheckRefreshChart();
|
||||
Internal_CheckAnimation();
|
||||
foreach (var handler in m_SerieHandlers) handler.BeforeUpdate();
|
||||
foreach (var handler in m_ComponentHandlers) handler.BeforceSerieUpdate();
|
||||
foreach (var handler in m_SerieHandlers) handler.Update();
|
||||
foreach (var handler in m_ComponentHandlers) handler.Update();
|
||||
foreach (var handler in m_SerieHandlers) handler.AfterUpdate();
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace XCharts.Runtime
|
||||
public virtual void InitComponent() { }
|
||||
public virtual void RemoveComponent() { }
|
||||
public virtual void CheckComponent(StringBuilder sb) { }
|
||||
public virtual void BeforceSerieUpdate() { }
|
||||
public virtual void Update() { }
|
||||
public virtual void DrawBase(VertexHelper vh) { }
|
||||
public virtual void DrawUpper(VertexHelper vh) { }
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace XCharts.Runtime
|
||||
|
||||
private static Dictionary<double, Dictionary<string, string>> s_NumberToStr = new Dictionary<double, Dictionary<string, string>>();
|
||||
private static Dictionary<int, Dictionary<string, string>> s_PrecisionToStr = new Dictionary<int, Dictionary<string, string>>();
|
||||
private static Dictionary<string, Dictionary<int, string>> s_StringIntDict = new Dictionary<string, Dictionary<int, string>>();
|
||||
|
||||
public static string FloatToStr(double value, string numericFormatter = "F", int precision = 0)
|
||||
{
|
||||
@@ -113,6 +114,19 @@ namespace XCharts.Runtime
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetString(string prefix, int suffix)
|
||||
{
|
||||
if (!s_StringIntDict.ContainsKey(prefix))
|
||||
{
|
||||
s_StringIntDict[prefix] = new Dictionary<int, string>();
|
||||
}
|
||||
if (!s_StringIntDict[prefix].ContainsKey(suffix))
|
||||
{
|
||||
s_StringIntDict[prefix][suffix] = prefix + suffix;
|
||||
}
|
||||
return s_StringIntDict[prefix][suffix];
|
||||
}
|
||||
|
||||
internal static string GetComponentObjectName(MainComponent component)
|
||||
{
|
||||
Dictionary<int, string> dict;
|
||||
|
||||
@@ -438,7 +438,8 @@ namespace XCharts.Runtime
|
||||
label.color = (!labelStyle.background.autoColor || autoColor == Color.clear) ?
|
||||
labelStyle.background.color : autoColor;
|
||||
label.sprite = labelStyle.background.sprite;
|
||||
label.type = labelStyle.background.type;
|
||||
if(label.type != labelStyle.background.type)
|
||||
label.type = labelStyle.background.type;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user