mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-30 05:08:48 +00:00
[optimize][axis] optimize minor split line of time axis
This commit is contained in:
@@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2022.08.09) 优化`Axis`的`Time`时间轴的次分割线
|
||||||
* (2022.08.09) 增加`AreaStyle`的`innerFill`参数支持填充凸多边形
|
* (2022.08.09) 增加`AreaStyle`的`innerFill`参数支持填充凸多边形
|
||||||
* (2022.08.08) 优化`Serie`的数据项索引维护,增加检测和修复功能,修复相关问题
|
* (2022.08.08) 优化`Serie`的数据项索引维护,增加检测和修复功能,修复相关问题
|
||||||
* (2022.07.29) 修复`Unity`版本兼容:在某些版本导入后图表创建异常的问题
|
* (2022.07.29) 修复`Unity`版本兼容:在某些版本导入后图表创建异常的问题
|
||||||
|
|||||||
@@ -562,6 +562,12 @@ namespace XCharts
|
|||||||
if (AxisHelper.NeedShowSplit(axis))
|
if (AxisHelper.NeedShowSplit(axis))
|
||||||
{
|
{
|
||||||
var size = AxisHelper.GetScaleNumber(axis, axisLength, dataZoom);
|
var size = AxisHelper.GetScaleNumber(axis, axisLength, dataZoom);
|
||||||
|
if (axis.IsTime())
|
||||||
|
{
|
||||||
|
size += 1;
|
||||||
|
if (!ChartHelper.IsEquals(axis.GetLastLabelValue(), axis.context.maxValue))
|
||||||
|
size += 1;
|
||||||
|
}
|
||||||
var tickWidth = axis.axisTick.GetWidth(theme.tickWidth);
|
var tickWidth = axis.axisTick.GetWidth(theme.tickWidth);
|
||||||
var tickColor = axis.axisTick.GetColor(theme.tickColor);
|
var tickColor = axis.axisTick.GetColor(theme.tickColor);
|
||||||
var current = orient == Orient.Horizonal ? startX : startY;
|
var current = orient == Orient.Horizonal ? startX : startY;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace XCharts.Runtime
|
namespace XCharts.Runtime
|
||||||
{
|
{
|
||||||
@@ -160,7 +161,7 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
private static void AddTickTimestamp(List<double> list, int startTimestamp, int maxTimestamp, int tickSecond)
|
private static void AddTickTimestamp(List<double> list, int startTimestamp, int maxTimestamp, int tickSecond)
|
||||||
{
|
{
|
||||||
while (startTimestamp < maxTimestamp)
|
while (startTimestamp <= maxTimestamp)
|
||||||
{
|
{
|
||||||
list.Add(startTimestamp);
|
list.Add(startTimestamp);
|
||||||
startTimestamp += tickSecond;
|
startTimestamp += tickSecond;
|
||||||
|
|||||||
Reference in New Issue
Block a user