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

How can we control ChartSeriesLabelConnectorsSettings length

7 Answers 15 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kz
Top achievements
Rank 1
Kz asked on 15 Mar 2016, 12:18 AM

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

7 Answers, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 16 Mar 2016, 09:19 AM
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.
0
Kz
Top achievements
Rank 1
answered on 16 Mar 2016, 11:18 PM
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.
0
Peshito
Telerik team
answered on 18 Mar 2016, 01:43 PM
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.
0
Kz
Top achievements
Rank 1
answered on 14 Dec 2016, 01:12 AM

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.

0
Kz
Top achievements
Rank 1
answered on 14 Dec 2016, 01:26 AM
A sample example will really help us to understand. Pie Smart Labels  is confusing.
0
Peshito
Telerik team
answered on 16 Dec 2016, 09:32 AM
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.
0
Kz
Top achievements
Rank 1
answered on 16 Dec 2016, 05:13 PM

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.

Tags
Chart
Asked by
Kz
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Kz
Top achievements
Rank 1
Share this question
or