重构LineChart和BarChart,移除Line和Bar组件,参数统一放到Serie中配置。

This commit is contained in:
monitor1394
2019-08-15 21:44:30 +08:00
parent 52ee1fe788
commit 3e506f9576
32 changed files with 13681 additions and 21508 deletions

View File

@@ -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];
}
}
}
}