修复Candlestick的涨停颜色不对的问题 (#362)

This commit is contained in:
monitor1394
2026-05-16 22:33:40 +08:00
parent 5f66391428
commit 39514f82b3
3 changed files with 3 additions and 2 deletions

View File

@@ -81,6 +81,7 @@ slug: /changelog
## master
* (2026.05.16) 修复`Candlestick`的涨停颜色不对的问题 (#362)
* (2026.03.29) 修复`Legend``Background`区域在`Horizonal`模式下不对的问题
* (2026.03.25) 增加`Chart``Json`导出导入
* (2026.03.10) 增加`Sankey`的线条tooltip触发显示

View File

@@ -217,7 +217,7 @@ namespace XCharts.Runtime
var close = serieData.GetCurrData(startDataIndex + 1, dataAddDuration, dataChangeDuration, yAxis.inverse, yMinValue, yMaxValue, unscaledTime);
var lowest = serieData.GetCurrData(startDataIndex + 2, dataAddDuration, dataChangeDuration, yAxis.inverse, yMinValue, yMaxValue, unscaledTime);
var heighest = serieData.GetCurrData(startDataIndex + 3, dataAddDuration, dataChangeDuration, yAxis.inverse, yMinValue, yMaxValue, unscaledTime);
var isRise = yAxis.inverse ? close < open : close > open;
var isRise = yAxis.inverse ? close <= open : close >= open;
var borderWidth = open == 0 ? 0f :
(itemStyle.borderWidth == 0 ? theme.serie.candlestickBorderWidth :
itemStyle.borderWidth);

View File

@@ -151,7 +151,7 @@ namespace XCharts.Runtime
var close = serieData.GetCurrData(startDataIndex + 1, dataAddDuration, dataChangeDuration, yAxis.inverse, yMinValue, yMaxValue, unscaledTime);
var lowest = serieData.GetCurrData(startDataIndex + 2, dataAddDuration, dataChangeDuration, yAxis.inverse, yMinValue, yMaxValue, unscaledTime);
var heighest = serieData.GetCurrData(startDataIndex + 3, dataAddDuration, dataChangeDuration, yAxis.inverse, yMinValue, yMaxValue, unscaledTime);
var isRise = yAxis.inverse ? close<open : close> open;
var isRise = yAxis.inverse ? close <= open : close >= open;
var borderWidth = open == 0 ? 0f :
(itemStyle.borderWidth == 0 ? theme.serie.candlestickBorderWidth :
itemStyle.borderWidth);