This is a migrated thread and some comments may be shown as answers.
OhlcSeries Style
1 Answer 29 Views
This is a migrated thread and some comments may be shown as answers.
BENOIT CHEVALIER
Top achievements
Rank 1
BENOIT CHEVALIER asked on 12 Apr 2012, 01:19 PM
Hi,

I'm trying to change the color of the OhlcSeries lines, which works fine most of the time. However, I've found that if the Open, High, Low and Close values are all the same (for example trade was suspended and therefore the values didn't move), instead of showing just a line, nothing is displayed. If I don't override the UpStroke and DownStroke Color then the line does display. Example images showing this.

What could I be doing wrong here?

My style:
<Style TargetType="chartView:OhlcSeries">
            <Setter Property="DefaultVisualStyle">
                <Setter.Value>
                    <Style TargetType="chartView:OhlcStick">
                        <Setter Property="StrokeThickness" Value="2" />
                        <Setter Property="UpStroke" Value="White" />
                        <Setter Property="DownStroke" Value="White" />
                    </Style>
                </Setter.Value>
            </Setter>
        </Style>

1 Answer, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 17 Apr 2012, 02:37 PM
Hello Benoit,

I see from your images and code snippet that you set the Ohlc series style correctly. However you should add MinHeight for the Ohlc stick in the style (by default it is 1). Here's how the Style should look like:

<Style TargetType="telerik:OhlcSeries" x:Key="ohlcStyle">
            <Setter Property="DefaultVisualStyle">
                <Setter.Value>
                    <Style TargetType="telerik:OhlcStick">
                        <Setter Property="MinHeight" Value="1"/>
                        <Setter Property="StrokeThickness" Value="2" />
                        <Setter Property="UpStroke" Value="White" />
                        <Setter Property="DownStroke" Value="White" />
                    </Style>
                </Setter.Value>
            </Setter>
        </Style>


All the best,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Asked by
BENOIT CHEVALIER
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or