mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-17 14:00:12 +00:00
重构LineChart和BarChart,移除Line和Bar组件,参数统一放到Serie中配置。
This commit is contained in:
@@ -8,6 +8,7 @@ namespace XCharts
|
||||
private static Dictionary<float, string> s_ValueToF1Str = new Dictionary<float, string>(1000);
|
||||
private static Dictionary<float, string> s_ValueToF2Str = new Dictionary<float, string>(1000);
|
||||
private static Dictionary<float, string> s_ValueToStr = new Dictionary<float, string>(1000);
|
||||
private static Dictionary<int, string> s_IntToStr = new Dictionary<int, string>(1000);
|
||||
|
||||
public static string FloatToStr(float value, int f = 0)
|
||||
{
|
||||
@@ -27,5 +28,18 @@ namespace XCharts
|
||||
return valueDic[value];
|
||||
}
|
||||
}
|
||||
|
||||
public static string IntToStr(int value)
|
||||
{
|
||||
if (s_IntToStr.ContainsKey(value))
|
||||
{
|
||||
return s_IntToStr[value];
|
||||
}
|
||||
else
|
||||
{
|
||||
s_IntToStr[value] = value.ToString();
|
||||
return s_IntToStr[value];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user