How can we control ChartSeriesLabelConnectorsSettings length

8 posts, 0 answers
  1. Kz
    Kz avatar
    32 posts
    Member since:
    Oct 2012

    Posted 14 Mar 2016 Link to this post

    Hi,

     

    How can we control smar labels connector length i.e ChartSeriesLabelConnectorsSettings  class does not give any control to connector length. I am looking for some logic so that we can control the connector length.

     

    Thankyou,

    ~Sri

  2. Peshito
    Admin
    Peshito avatar
    524 posts

    Posted 16 Mar 2016 Link to this post

    Hello,

    Have you tried using the MinLengthThreshold. It gets or sets the min length threshold. If a label connector is shorter than this threshold, the label connector is not drawn.

    Hope this helps.

    Regards,
    Peshito
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. Kz
    Kz avatar
    32 posts
    Member since:
    Oct 2012

    Posted 16 Mar 2016 in reply to Peshito Link to this post

    MinLengthThreshold gets or sets min length. I want to control on max length.Connector is  kind of length 20. I want to make it 10 only.
  4. Peshito
    Admin
    Peshito avatar
    524 posts

    Posted 18 Mar 2016 Link to this post

    Hello,

    In that case you could try using the Margin property of the ChartSeriesLabelDefinition. If this is not suitable enough another approach would be to use your own labels' Strategy. Please see our Pie Smart Labels demo sample for more information.

    Regards,
    Peshito
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  5. Kz
    Kz avatar
    32 posts
    Member since:
    Oct 2012

    Posted 13 Dec 2016 in reply to Peshito Link to this post

    I am not sure what your trying to tell with ChartSeriesLabelDefinition margin property.I tried negative margin but  its not working.

    Can you please give me sample example showing how can customize label connector length with label Strategy?

    We have been issue with it since long time.Its really need for us.

  6. Kz
    Kz avatar
    32 posts
    Member since:
    Oct 2012

    Posted 13 Dec 2016 in reply to Peshito Link to this post

    A sample example will really help us to understand. Pie Smart Labels  is confusing.
  7. Peshito
    Admin
    Peshito avatar
    524 posts

    Posted 16 Dec 2016 Link to this post

    Hi,

    The sample code below produces a pie series chart with label connectors. The Margin property of the ChartSeriesLabelDefinition is with "-10,0,0,0" value so the connector is 10 pixels long.
    <telerik:RadPieChart Palette="Windows8">
                <telerik:PieSeries ShowLabels="True" RadiusFactor="0.6">
                    <telerik:PieSeries.DataPoints>
                        <telerik:PieDataPoint Value="43.46" Label="France: 43.46%"/>
                        <telerik:PieDataPoint Value="27.53" Label="Germany: 27.53%" />
                        <telerik:PieDataPoint Value="15.11" Label="Belgium: 15.11%" />
                        <telerik:PieDataPoint Value="10.35" Label="Holland: 10.35%" />
                        <telerik:PieDataPoint Value="3.55" Label="Luxembourg: 3.55%" />
                    </telerik:PieSeries.DataPoints>
     
                    <telerik:PieSeries.LabelDefinitions>
                        <telerik:ChartSeriesLabelDefinition Margin="-10,0,0,0" />
                    </telerik:PieSeries.LabelDefinitions>
     
                    <telerik:PieSeries.LabelConnectorsSettings>
                        <telerik:ChartSeriesLabelConnectorsSettings />
                    </telerik:PieSeries.LabelConnectorsSettings>
                </telerik:PieSeries>
            </telerik:RadPieChart
    If this is not what you meant, please share some more information about the issue on your side. For instance, the sample code you have for defining the chart or a sample runnable project will help.

    Regards,
    Peshito
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Kz
    Kz avatar
    32 posts
    Member since:
    Oct 2012

    Posted 16 Dec 2016 in reply to Peshito Link to this post

    But its not same RadCartesianChart ScatterPointSeries  .

    We tried MinLengthThreshold but we need MaxLengthThreshold i.e we dont want our connector to be drawn after certain length.

    Lets say max length of connector is 5.

Back to Top