mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 23:10:06 +00:00
Fixed bug where AxisLabel displayed incorrectly with DataRoom (#138)
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
## Latest
|
||||
|
||||
* (2021.04.28) Fixed bug where `AxisLabel` displayed incorrectly with `DataRoom` (#138)
|
||||
* (2021.04.26) Fixed dynamically creating chart at runtime would be abnormal #137
|
||||
* (2021.04.26) Added support for `Barchart` to draw gradient borders
|
||||
* (2021.04.23) Added support for custom charts
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
## Latest
|
||||
|
||||
* (2021.04.28) 修复`DataZoom`下`AxisLabel`显示不准确的问题 #138
|
||||
* (2021.04.26) 修复运行时动态创建图表会异常的问题 #137
|
||||
* (2021.04.26) 增加`BarChart`绘制渐变边框的支持
|
||||
* (2021.04.23) 增加自定义图表支持
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace XCharts
|
||||
int splitNum = GetSplitNumber(axis, coordinateWidth, dataZoom);
|
||||
if (axis.IsCategory())
|
||||
{
|
||||
var data = axis.GetDataList();
|
||||
var data = axis.GetDataList(dataZoom);
|
||||
int tick = Mathf.RoundToInt(data.Count * 1f / splitNum);
|
||||
if (axis.boundaryGap)
|
||||
return Mathf.CeilToInt(data.Count * 1.0f / tick) + 1;
|
||||
@@ -246,7 +246,7 @@ namespace XCharts
|
||||
}
|
||||
else
|
||||
{
|
||||
var data = axis.GetDataList();
|
||||
var data = axis.GetDataList(dataZoom);
|
||||
if (axis.IsCategory() && data.Count > 0)
|
||||
{
|
||||
int tick = Mathf.RoundToInt(data.Count * 1f / splitNum);
|
||||
@@ -270,7 +270,7 @@ namespace XCharts
|
||||
|
||||
public static float GetEachWidth(Axis axis, float coordinateWidth, DataZoom dataZoom = null)
|
||||
{
|
||||
var data = axis.GetDataList();
|
||||
var data = axis.GetDataList(dataZoom);
|
||||
if (data.Count > 0)
|
||||
{
|
||||
var count = axis.boundaryGap ? data.Count : data.Count - 1;
|
||||
|
||||
Reference in New Issue
Block a user