mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
增加Chart的useUtc参数设置显示时间是否用UTC时间
This commit is contained in:
@@ -116,7 +116,7 @@ namespace XCharts.Runtime
|
||||
/// <param name="dataZoom"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetLabelName(Axis axis, float coordinateWidth, int index, double minValue, double maxValue,
|
||||
DataZoom dataZoom, bool forcePercent, int sortIndex = -1)
|
||||
DataZoom dataZoom, bool forcePercent, bool useUtc, int sortIndex = -1)
|
||||
{
|
||||
int split = GetSplitNumber(axis, coordinateWidth, dataZoom);
|
||||
if (sortIndex == -1) sortIndex = index;
|
||||
@@ -161,7 +161,7 @@ namespace XCharts.Runtime
|
||||
return string.Empty;
|
||||
|
||||
var value = axis.GetLabelValue(index);
|
||||
return axis.axisLabel.GetFormatterDateTime(sortIndex, axis.context.labelValueList.Count, value, minValue, maxValue);
|
||||
return axis.axisLabel.GetFormatterDateTime(sortIndex, axis.context.labelValueList.Count, value, minValue, maxValue, !useUtc);
|
||||
}
|
||||
var showData = axis.GetDataList(dataZoom);
|
||||
int dataCount = showData.Count;
|
||||
|
||||
Reference in New Issue
Block a user