mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 01:40:06 +00:00
3.0 - bar chart
This commit is contained in:
@@ -788,9 +788,9 @@ namespace XCharts
|
||||
Debug.LogError("Serie no Handler:" + serie.GetType());
|
||||
return;
|
||||
}
|
||||
var attrubte = serie.GetType().GetAttribute<SerieHandlerAttribute>();
|
||||
var handler = (SerieHandler)Activator.CreateInstance(attrubte.handler);
|
||||
handler.attribute = attrubte;
|
||||
var attribute = serie.GetType().GetAttribute<SerieHandlerAttribute>();
|
||||
var handler = (SerieHandler)Activator.CreateInstance(attribute.handler);
|
||||
handler.attribute = attribute;
|
||||
handler.chart = this;
|
||||
handler.SetSerie(serie);
|
||||
serie.handler = handler;
|
||||
|
||||
@@ -73,16 +73,5 @@ namespace XCharts
|
||||
if (handler != null)
|
||||
handler.RefreshLabelNextFrame();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected virtual void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnValidate()
|
||||
{
|
||||
SetAllDirty();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -653,8 +653,9 @@ namespace XCharts
|
||||
count++;
|
||||
intvalue = (int)(max * Mathf.Pow(10, count));
|
||||
}
|
||||
if (max > 0) return 1 / Mathf.Pow(10, count - 1);
|
||||
else return -1 / Mathf.Pow(10, count);
|
||||
var pow = Mathf.Pow(10, count);
|
||||
if (max > 0) return (int)((max * pow + 1)) / pow;
|
||||
else return (int)((max * pow - 1)) / pow;
|
||||
}
|
||||
if (ceilRate == 0)
|
||||
{
|
||||
@@ -694,8 +695,9 @@ namespace XCharts
|
||||
count++;
|
||||
intvalue = (int)(min * Mathf.Pow(10, count));
|
||||
}
|
||||
if (min > 0) return 1 / Mathf.Pow(10, count);
|
||||
else return -1 / Mathf.Pow(10, count - 1);
|
||||
var pow = Mathf.Pow(10, count);
|
||||
if (min > 0) return (int)((min * pow + 1)) / pow;
|
||||
else return (int)((min * pow - 1)) / pow;
|
||||
}
|
||||
if (ceilRate == 0)
|
||||
{
|
||||
@@ -797,7 +799,7 @@ namespace XCharts
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static Vector3 RotateRound(Vector3 position, Vector3 center, Vector3 axis, float angle)
|
||||
{
|
||||
|
||||
@@ -153,6 +153,7 @@ namespace XCharts
|
||||
public static bool AddCustomTheme(Theme theme)
|
||||
{
|
||||
if (theme == null) return false;
|
||||
if (Instance == null || Instance.m_CustomThemes == null) return false;
|
||||
if (!Instance.m_CustomThemes.Contains(theme))
|
||||
{
|
||||
Instance.m_CustomThemes.Add(theme);
|
||||
|
||||
Reference in New Issue
Block a user