mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
修复LineChart的刻度位置在alignWithLabel为true时可能异常的问题
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.11.21) Fixed an issue where the scale position of `LineChart` could be abnormal if `alignWithLabel` was `true`
|
||||
* (2020.11.21) Fixed `Unity5` compatibility error reporting problem
|
||||
* (2020.11.13) Improved `RadarChart` `Indicator` support for `\n` line feed
|
||||
* (2020.11.12) Fixed `LineChart` reporting errors when the type was `Smooth` when the data was too secure #100
|
||||
* (2020.10.22) Improve the support of `VisualMap` for `Piecewise` in `HeatmapChart`
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.11.21) 修复`LineChart`的刻度位置在`alignWithLabel`为`true`时可能异常的问题
|
||||
* (2020.11.21) 修复`Unity5`兼容报错的问题
|
||||
* (2020.11.13) 完善`RadarChart`的`Indicator`对`\n`换行的支持
|
||||
* (2020.11.12) 修复`LineChart`当类型为`Smooth`时数据过密情况下报错的问题 #100
|
||||
* (2020.10.22) 完善`HeatmapChart`中`VisualMap`对`Piecewise`的支持
|
||||
|
||||
@@ -214,7 +214,11 @@ namespace XCharts
|
||||
var count = axis.boundaryGap ? axis.data.Count : axis.data.Count - 1;
|
||||
if (count <= 0) return 0;
|
||||
var each = coordinateWidth / count;
|
||||
if (index >= num - 1) return coordinateWidth - each * tick * (index - 1);
|
||||
if (index >= num - 1)
|
||||
{
|
||||
if (axis.axisTick.alignWithLabel) return each * tick;
|
||||
else return coordinateWidth - each * tick * (index - 1);
|
||||
}
|
||||
else return each * tick;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user