From da305e3b7a85eb511d982d93f2782bf5079ec7b7 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Fri, 12 Mar 2021 07:16:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=9A=E6=9D=A1k=E7=BA=BF?= =?UTF-8?q?=E5=9B=BE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Internal/CoordinateChart_DrawCandlestick.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Runtime/Internal/CoordinateChart_DrawCandlestick.cs b/Runtime/Internal/CoordinateChart_DrawCandlestick.cs index b00afe68..b66cc30a 100644 --- a/Runtime/Internal/CoordinateChart_DrawCandlestick.cs +++ b/Runtime/Internal/CoordinateChart_DrawCandlestick.cs @@ -23,11 +23,9 @@ namespace XCharts var grid = GetSerieGridOrDefault(serie); float categoryWidth = AxisHelper.GetDataWidth(xAxis, grid.runtimeWidth, showData.Count, dataZoom); float barGap = GetBarGap(); - float totalBarWidth = GetBarTotalWidth(categoryWidth, barGap); float barWidth = serie.GetBarWidth(categoryWidth); - float offset = (categoryWidth - totalBarWidth) / 2; + float space = (categoryWidth - barWidth) / 2; float barGapWidth = barWidth + barWidth * barGap; - float space = serie.barGap == -1 ? offset : offset + GetBarIndex(serie) * barGapWidth; int maxCount = serie.maxShow > 0 ? (serie.maxShow > showData.Count ? showData.Count : serie.maxShow) : showData.Count;