mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
[optimize][axis] optimize minor split line of time axis
This commit is contained in:
@@ -562,6 +562,12 @@ namespace XCharts
|
||||
if (AxisHelper.NeedShowSplit(axis))
|
||||
{
|
||||
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 tickColor = axis.axisTick.GetColor(theme.tickColor);
|
||||
var current = orient == Orient.Horizonal ? startX : startY;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
@@ -160,7 +161,7 @@ namespace XCharts.Runtime
|
||||
|
||||
private static void AddTickTimestamp(List<double> list, int startTimestamp, int maxTimestamp, int tickSecond)
|
||||
{
|
||||
while (startTimestamp < maxTimestamp)
|
||||
while (startTimestamp <= maxTimestamp)
|
||||
{
|
||||
list.Add(startTimestamp);
|
||||
startTimestamp += tickSecond;
|
||||
|
||||
Reference in New Issue
Block a user