XCharts-Team / XCharts

A charting and data visualization library for Unity. Unity数据可视化图表插件。
https://xcharts-team.github.io
MIT License
3.31k stars 570 forks source link

Help with Candlesticks required #313

Closed HajiyevEl closed 7 months ago

HajiyevEl commented 7 months ago

Hi! First of all - thanks for your hard work!

Wanted to ask how can i make candle shadows longer?

Screenshot

![1024px-Candlestick_chart_scheme_01-en svg](https://github.com/XCharts-Team/XCharts/assets/70325881/8113791a-ead8-46ba-8904-0c32a5dc4114) ![Screenshot 2024-04-10 161416](https://github.com/XCharts-Team/XCharts/assets/70325881/c43629ee-d183-4442-9c80-f605d61fb0e3)

As you can see, almost all shadows of candles are missing (except several proper shadows, i marked one of them). Which settings should i change to increase length of shadows, and decrease length of body of candle? Also, it's possible to see that sequence heights of opening and closing of main (real) body of candles is wrong. Close price of current candle is open price of next candle. That means body of current candle should start from same height as where body of previous candle finished. If you pay attention, it could be seen that most candles are just standing side by side without proper height order. How can i fix that?

Screenshot2 (expected behaviour)

![IMG_20240410_232237](https://github.com/XCharts-Team/XCharts/assets/70325881/d7e870ca-7362-4b18-9828-9025738a8425) ![IMG_20240410_232309](https://github.com/XCharts-Team/XCharts/assets/70325881/40651b0e-5645-486e-aa28-85cb3c8a52c3)

monitor1394 commented 7 months ago

Thank you for the feedback.

  1. The length of shadow and body is calculated according to the data. I have checked this and there is no problem.
  2. This is a bug, which is particularly evident in the descending candlestick charts. I will fix it as soon as possible.
monitor1394 commented 7 months ago

I have fixed this issue in the master branch

HajiyevEl commented 7 months ago

Thank you for the feedback.

1. The length of shadow and body is calculated according to the data. I have checked this and there is no problem.

2. This is a bug, which is particularly evident in the descending candlestick charts. I will fix it as soon as possible.
  1. Thank you for checking. I think my case was that when i used Y axis Min-Max Type: Auto - values were too far apart from candlestick's lowest-highest values. That's why shadows were too short to see. I switched to Y axis Min-Max Type: Custom, and setting Y axis Min-Max values myself depending on currently on-screen candlestick's lowest-highest values, it's all working properly now. https://github.com/XCharts-Team/XCharts/issues/314
  2. Thanks!