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

RadHtmlChart - can i tell labels to appear on series line

3 Answers 196 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 28 Apr 2015, 08:47 PM
RadHtmlChart - can I tell the labels to be centered on the series line and the line does a gap right there with no line or marker behind the number.
this is an option in excel when doing a chart.

3 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 30 Apr 2015, 10:38 AM
Hello Doug,

You can hide the markers and offset the labels with a particular margin. For example:

     <telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="600px" Height="400px">
    <PlotArea>
        <Series>
            <telerik:LineSeries Name="Product 1">
                <MarkersAppearance Visible="false" />
                <LabelsAppearance>
                    <TextStyle Margin="0 0 -18 0" />
                </LabelsAppearance>
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="15000" />
                    <telerik:CategorySeriesItem Y="23000" />
                    <telerik:CategorySeriesItem Y="10000" />
                </SeriesItems>
            </telerik:LineSeries>
        </Series>
        <XAxis>
            <Items>
                <telerik:AxisItem LabelText="1" />
                <telerik:AxisItem LabelText="2" />
                <telerik:AxisItem LabelText="3" />
            </Items>
        </XAxis>
    </PlotArea>
    <ChartTitle Text="Product sales for 2011">
    </ChartTitle>
    <Legend>
        <Appearance Position="Bottom" />
    </Legend>
</telerik:RadHtmlChart>



Regards,
Danail Vasilev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Doug
Top achievements
Rank 1
answered on 30 Apr 2015, 01:24 PM
right, I had gotten that part. the part I couldn't see if there was anyway to do was to have a visual gap in series line where the text is located.

0
Accepted
Danail Vasilev
Telerik team
answered on 05 May 2015, 06:41 AM
Hi Doug,

You can try to set a larger size for the markers with a white backgroundcolor:

<MarkersAppearance Size="30" BackgroundColor="White" BorderColor="Transparent" />
<LabelsAppearance>
    <TextStyle Margin="0 0 -28 0" />
</LabelsAppearance>

Regards,
Danail Vasilev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
General Discussions
Asked by
Doug
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Doug
Top achievements
Rank 1
Share this question
or