mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 03:58:49 +00:00
修复Tooltip在微信小游戏平台上报错的兼容问题 (#326)
This commit is contained in:
@@ -75,6 +75,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2024.07.29) 修复`Tooltip`在微信小游戏平台上报错的兼容问题 (#326)
|
||||||
* (2024.07.27) 调整`Axis`的`AxisName`的默认位置
|
* (2024.07.27) 调整`Axis`的`AxisName`的默认位置
|
||||||
* (2024.07.22) 优化`Pie`的`Label`在`Tooltip`触发时的表现
|
* (2024.07.22) 优化`Pie`的`Label`在`Tooltip`触发时的表现
|
||||||
* (2024.07.21) 修复`Tooltip`在开启`DataZoom`时指示内容不准确的问题
|
* (2024.07.21) 修复`Tooltip`在开启`DataZoom`时指示内容不准确的问题
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace XCharts.Runtime
|
|||||||
private const string NUMERIC_FORMATTER_X = "X";
|
private const string NUMERIC_FORMATTER_X = "X";
|
||||||
private const string NUMERIC_FORMATTER_x = "x";
|
private const string NUMERIC_FORMATTER_x = "x";
|
||||||
private static readonly string s_DefaultAxis = "axis_";
|
private static readonly string s_DefaultAxis = "axis_";
|
||||||
private static CultureInfo ci = new CultureInfo("en-us"); // "en-us", "zh-cn", "ar-iq", "de-de"
|
private static CultureInfo ci = GetDefaultCultureInfo(); // "en-us", "zh-cn", "ar-iq", "de-de"
|
||||||
private static Dictionary<Color, string> s_ColorToStr = new Dictionary<Color, string>(100);
|
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_SerieLabelName = new Dictionary<int, string>(1000);
|
||||||
private static Dictionary<Color, string> s_ColorDotStr = new Dictionary<Color, string>(100);
|
private static Dictionary<Color, string> s_ColorDotStr = new Dictionary<Color, string>(100);
|
||||||
@@ -24,6 +24,18 @@ namespace XCharts.Runtime
|
|||||||
private static Dictionary<int, Dictionary<string, string>> s_PrecisionToStr = new Dictionary<int, Dictionary<string, string>>();
|
private static Dictionary<int, Dictionary<string, string>> s_PrecisionToStr = new Dictionary<int, Dictionary<string, string>>();
|
||||||
private static Dictionary<string, Dictionary<int, string>> s_StringIntDict = new Dictionary<string, Dictionary<int, string>>();
|
private static Dictionary<string, Dictionary<int, string>> s_StringIntDict = new Dictionary<string, Dictionary<int, string>>();
|
||||||
|
|
||||||
|
private static CultureInfo GetDefaultCultureInfo()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return new CultureInfo("en-us");
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return CultureInfo.InvariantCulture;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static string FloatToStr(double value, string numericFormatter = "F", int precision = 0)
|
public static string FloatToStr(double value, string numericFormatter = "F", int precision = 0)
|
||||||
{
|
{
|
||||||
if (precision > 0 && numericFormatter.Length == 1)
|
if (precision > 0 && numericFormatter.Length == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user