mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-29 20:58:47 +00:00
修复Tooltip在只有一个数据时可能异常的问题
This commit is contained in:
@@ -66,6 +66,7 @@ slug: /changelog
|
||||
|
||||
## master
|
||||
|
||||
* (2023.04.14) 修复`Tooltip`在只有一个数据时可能异常的问题
|
||||
* (2023.04.14) 增加`BaseChart`的`TriggerTooltip()`接口尝试触发`ToolTip`
|
||||
* (2023.04.12) 优化`RadarCood`设置`startAngle`时文本也跟随调整位置
|
||||
* (2023.04.12) 增加`Radar`对通配符`{b}`的支持
|
||||
|
||||
@@ -355,7 +355,7 @@ namespace XCharts.Runtime
|
||||
{
|
||||
var serieData = data[i];
|
||||
currValue = serieData.GetData(dimension);
|
||||
if (i == 0)
|
||||
if (i == 0 && i + 1 < dataCount)
|
||||
{
|
||||
nextValue = data[i + 1].GetData(dimension);
|
||||
if (axisValue <= currValue + (nextValue - currValue) / 2)
|
||||
@@ -372,7 +372,7 @@ namespace XCharts.Runtime
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (i + 1 < dataCount)
|
||||
{
|
||||
nextValue = data[i + 1].GetData(dimension);
|
||||
if (axisValue > (currValue - (currValue - lastValue) / 2) && axisValue <= currValue + (nextValue - currValue) / 2)
|
||||
|
||||
Reference in New Issue
Block a user