增加HeatmapChart热力图

This commit is contained in:
monitor1394
2019-10-14 07:45:56 +08:00
parent c54c8e60d2
commit d7933eb06e
41 changed files with 182730 additions and 60532 deletions

View File

@@ -9,6 +9,7 @@ namespace XCharts
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);
private static Dictionary<Color, string> s_ColorToStr = new Dictionary<Color, string>(1000);
public static string FloatToStr(float value, int f = 0)
{
@@ -42,5 +43,18 @@ namespace XCharts
return s_IntToStr[value];
}
}
public static string ColorToStr(Color color)
{
if (s_ColorToStr.ContainsKey(color))
{
return s_ColorToStr[color];
}
else
{
s_ColorToStr[color] = ColorUtility.ToHtmlStringRGBA(color);
return s_ColorToStr[color];
}
}
}
}