mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 07:20:08 +00:00
增加Tooltip的formatter对{.}、{c:0}、{c1:1}的支持
This commit is contained in:
@@ -22,11 +22,10 @@ namespace XCharts
|
||||
private static Dictionary<float, string> s_ValueToEStr = new Dictionary<float, string>(1000);
|
||||
private static Dictionary<int, string> s_IntToStr = new Dictionary<int, string>(1000);
|
||||
private static Dictionary<int, string> s_IntToFn = new Dictionary<int, string>(20);
|
||||
private static Dictionary<Color, string> s_ColorToStr = new Dictionary<Color, string>(1000);
|
||||
private static Dictionary<Color, string> s_ColorToStr = new Dictionary<Color, string>(100);
|
||||
private static Dictionary<int, string> s_SerieLabelName = new Dictionary<int, string>(1000);
|
||||
private static Dictionary<int, string> s_AxisLabelName = new Dictionary<int, string>(1000);
|
||||
|
||||
|
||||
private static Dictionary<Color, string> s_ColorDotStr = new Dictionary<Color, string>(100);
|
||||
|
||||
public static string FloatToStr(float value, int f = 0, bool forceE = false)
|
||||
{
|
||||
@@ -88,6 +87,15 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
public static string ColorToDotStr(Color color)
|
||||
{
|
||||
if (!s_ColorDotStr.ContainsKey(color))
|
||||
{
|
||||
s_ColorDotStr[color] = "<color=#" + ColorToStr(color) + ">● </color>";
|
||||
}
|
||||
return s_ColorDotStr[color];
|
||||
}
|
||||
|
||||
internal static string GetSerieLabelName(string prefix, int i, int j)
|
||||
{
|
||||
int key = i * 10000000 + j;
|
||||
|
||||
Reference in New Issue
Block a user