RadHtmlChart - can i tell labels to appear on series line

4 posts, 1 answers
  1. Doug
    Doug avatar
    68 posts
    Member since:
    Aug 2014

    Posted 28 Apr 2015 Link to this post

    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.
  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 30 Apr 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug
    Doug avatar
    68 posts
    Member since:
    Aug 2014

    Posted 30 Apr 2015 in reply to Danail Vasilev Link to this post

    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.

  5. Answer
    Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 05 May 2015 Link to this post

    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.

     
Back to Top