This is a migrated thread and some comments may be shown as answers.

Label Position Candlestick Charts

3 Answers 137 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Alex Witkowski
Top achievements
Rank 1
Alex Witkowski asked on 24 Sep 2009, 02:42 PM
Hi there,
i have a Candlestick Chart with some Items and want to add a label to absolut minimum an absolut maximum.
I tryed with item labels and postitions (like RadChart1.Series[2].Items[j].Label.Appearance.Position) but there where no changes visible.
Can you please help me, if some code is needed just write a short comment.

Thanks

Best regards
Alexander Witkowski

3 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 24 Sep 2009, 04:36 PM
Try these two lines to see if you can't get the labels to align the way you want them to:

 
RadChart1.Series[0].Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside; 
 
RadChart1.Series[0].Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.BottomRight;  

Telerik.Charting.Style.AlignedPositions will give you a lot of options when you hit the ".", yay intellisense :D
0
Alex Witkowski
Top achievements
Rank 1
answered on 25 Sep 2009, 09:49 AM
Hi,
as written in Post: 2Charts 1 Image the shown solution doesn't make any changes to the label position.

aspx-Code
<telerik:RadChart ID="RadChart1" runat="server" DefaultType="CandleStick" Height="200px" Width="230px" onclick="RadChart1_Click"
            <Series> ... 
               <telerik:ChartSeries Visible="true" Name="Series 2" Type="Line" YAxisType="Secondary"
                    <Appearance Corners="Rectangle, Rectangle, Rectangle, Rectangle, 3" LineSeriesAppearance-Width="1"
                        <FillStyle FillType="Solid" MainColor="Black" /> 
                        <LabelAppearance Visible="True" LabelLocation="Outside"  
                            Position-AlignedPosition="Bottom" Position-Auto="False" Position-X="0"  
                            Position-Y="20" /> 
                        <LineSeriesAppearance Width="1"></LineSeriesAppearance> 
                    </Appearance> 
               </telerik:ChartSeries> 
            </Series> 
            <PlotArea> 
                <EmptySeriesMessage> 
                    <Appearance Dimensions-Margins="1px, 1px, 1px, 1px" Dimensions-Paddings="1px, 1px, 1px, 1px"
                    </Appearance> 
                    <TextBlock> 
                        <Appearance Dimensions-Margins="1px, 1px, 1px, 1px" Dimensions-Paddings="1px, 1px, 1px, 1px"
                        </Appearance> 
                    </TextBlock> 
                    <Marker> 
                        <Appearance Dimensions-Margins="1px, 1px, 1px, 1px"
                        </Appearance> 
                    </Marker> 
                </EmptySeriesMessage> 
                <XAxis> 
                    <Appearance> 
                        <MajorGridLines Visible="False" /> 
                        <TextAppearance TextProperties-Font="Verdana, 6pt"
                        </TextAppearance> 
                    </Appearance> 
                </XAxis> 
                <YAxis IsZeroBased="False" Visible="False"
                </YAxis> 
                <YAxis2 IsZeroBased="False"
                    <Appearance> 
                        <MinorGridLines Visible="False" /> 
                        <TextAppearance TextProperties-Font="Verdana, 6pt"
                        </TextAppearance> 
                    </Appearance> 
                </YAxis2> 
                <Appearance Dimensions-Margins="1px, 1px, 1px, 1px" Dimensions-AutoSize="False" Dimensions-Height="170px" 
                    Dimensions-Width="185px" Position-Auto="False" Position-X="4" Position-Y="5" 
                    Position-AlignedPosition="TopLeft"
                    <FillStyle FillType="Image" MainColor="Transparent" SecondColor="Transparent"
                        <FillSettings BackgroundImage="logo.png" 
                            ImageDrawMode="Align"
                        </FillSettings> 
                    </FillStyle> 
                </Appearance> 
            </PlotArea> 
            <Appearance ImageQuality="Default"
                <Border Visible="False" Color="White" /> 
            </Appearance> 
            <ChartTitle Visible="False"
            </ChartTitle> 
            <Legend Visible="False"
                <Appearance Visible="False"
                </Appearance> 
            </Legend> 
        </telerik:RadChart> 
... 
 
 

Thanks for support

Best regrades
Alexander Witkowski


0
Giuseppe
Telerik team
answered on 30 Sep 2009, 08:33 AM
Hi Alex Witkowski,

Generally you can change the label position like this (or Position-AlignedPosition="Top" to place the labels above), however, the control does not provide support for displaying multiple labels for a single series item and it will not be possible to achieve the desired effect:

<telerik:RadChart ID="RadChart1" runat="server"
    <Series> 
        <telerik:ChartSeries Type="CandleStick"
            <Appearance> 
                <LabelAppearance LabelLocation="Outside" Position-AlignedPosition="Bottom" /> 
            </Appearance> 
            <Items> 
                <telerik:ChartSeriesItem YValue="21" YValue2="30" YValue3="40" YValue4="10" /> 
                <telerik:ChartSeriesItem YValue="30" YValue2="10" YValue3="50" YValue4="5" /> 
                <telerik:ChartSeriesItem YValue="10" YValue2="20" YValue3="20" YValue4="10" /> 
            </Items> 
        </telerik:ChartSeries> 
    </Series> 
</telerik:RadChart> 



Greetings,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Chart (Obsolete)
Asked by
Alex Witkowski
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Alex Witkowski
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or