We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Bull/Bear Fill Color - issue

Hello, I was working with my candle charts and noticed that they have a problem with filling the bear candles properly. Here You can see two images - the left one is a candle chart from a data provider. As You can see - there are many bear candles. The right one is the one that my app throws. And only one of the candles received a bear fill color - what's more - it was a bull candle...this is the code in xaml behind the chart that sets the properties:                            The static palette color is specified in hex. Any ideas why it happens this way?Regards, Michał

9 Replies

MS Michal Staszewski March 28, 2017 10:21 PM UTC

ok, when editing the thread it somehow lost the graphics & code. Here it goes again:

Hello, 

I was working with my candle charts and noticed that they have a problem with filling the bear candles properly. Here You can see two images - the left one is a candle chart from a data provider. As You can see - there are many bear candles. The right one is the one that my app throws. And only one of the candles received a bear fill color - what's more - it was a bull candle...


this is the code in xaml behind the chart that sets the properties:

                            <chart:CandleSeries ItemsSource="{Binding Quotes}"
                                                XBindingPath="date"
                                                Open="open"
                                                High="high"
                                                Low="low"
                                                Close="close"
                                                BullFillColor="White"
                                                BearFillColor="{x:Static statics:Palette.V_001}"
                                                StrokeColor="{x:Static statics:Palette.V_001}"
                                                StrokeWidth="1"/>


The static palette color is specified in hex. Any ideas why it happens this way?

Regards, Michał


MS Michal Staszewski March 30, 2017 08:55 AM UTC

up /\


SP Saravana Pandian Murugan Syncfusion Team March 30, 2017 04:15 PM UTC

Hi Michal,

In SfChart,

Fill/Hollow Candles: When current close is greater than current open, then the candle will be filled. Otherwise it will be hollow.

Color of the Fill/Hollow Candles: When the current close is greater than the previous close, then BullFillColor will apply. Otherwise BearFillColor.

If you want all your candles to be filled, then you can set EnableSolidCandles property of CandleSeries to true. In this case, BullFillColor will apply when the current close is greater than the current open.

Could you please check whether the CandleSeries rendered depends on the above cases for the required data.

Please let us know if you have any queries.

Regards,
Saravana Pandian M.



MS Michal Staszewski replied to Saravana Pandian Murugan March 31, 2017 12:43 PM UTC

Hi Michal,

In SfChart,

Fill/Hollow Candles: When current close is greater than current open, then the candle will be filled. Otherwise it will be hollow.

Color of the Fill/Hollow Candles: When the current close is greater than the previous close, then BullFillColor will apply. Otherwise BearFillColor.

If you want all your candles to be filled, then you can set EnableSolidCandles property of CandleSeries to true. In this case, BullFillColor will apply when the current close is greater than the current open.

Could you please check whether the CandleSeries rendered depends on the above cases for the required data.

Please let us know if you have any queries.

Regards,
Saravana Pandian M.


EnableSolidCandles did the trick.

Thanks a lot.

Still I'm not sure what could possibly be a good business use of candle chart with SolidCandles disabled ;) 


Regards, Michał


PS Parthiban Sundaram Syncfusion Team April 3, 2017 07:32 PM UTC

Hi Michal,

Thanks for the update.

We are sorry to inform you that we are unable to understand this requirement. We kinldy request you to provide more details which will be helpful for providing further assistance on this.

Regards,
Parthiban S



MS Michal Staszewski replied to Parthiban Sundaram April 3, 2017 07:49 PM UTC

Hi Michal,

Thanks for the update.

We are sorry to inform you that we are unable to understand this requirement. We kinldy request you to provide more details which will be helpful for providing further assistance on this.

Regards,
Parthiban S


Did You mean to answer that in my other thread?


SP Saravana Pandian Murugan Syncfusion Team April 6, 2017 03:47 AM UTC

Hi Michal,

You can refer the below link for the behavior of the Candle sticks.

Link: https://stockcharts.com/articles/mailbag/2014/05/whats-the-difference-between-solid-and-filled-candlesticks.html

In our previous update, we have wrongly updated that behavior of Fill/Hollow Candles. The right behaviour is when current close is greater than current open, then the candle will be hollow. Otherwise it will be filled.

Please let us know if your query is different or you need more information on this.

Regards,
Saravana Pandian M.


MS Michal Staszewski replied to Saravana Pandian Murugan April 6, 2017 06:19 PM UTC

Hi Michal,

You can refer the below link for the behavior of the Candle sticks.

Link: https://stockcharts.com/articles/mailbag/2014/05/whats-the-difference-between-solid-and-filled-candlesticks.html

In our previous update, we have wrongly updated that behavior of Fill/Hollow Candles. The right behaviour is when current close is greater than current open, then the candle will be hollow. Otherwise it will be filled.

Please let us know if your query is different or you need more information on this.

Regards,
Saravana Pandian M.

My query was completely satisfied with Enable Solid Candles :)

although I don't like the way android emulator (bottom chart) displays your candle charts... I hope that this is just a fault of emulator & on actual devices they'll look as good as on iOS (top one)?




SP Saravana Pandian Murugan Syncfusion Team April 7, 2017 01:09 PM UTC

Hi Michal,

Thanks for the update.

Yes. It will work fine in actual devices without any issues. Please let us know if you have any concerns.

Regards,
Saravana Pandian M.


Loader.
Live Chat Icon For mobile
Up arrow icon