Pie chart Spyder labels lenth control


https://www.nevron.com/Forum/Topic6516.aspx
Print Topic | Close Window

By Amendra Kodituwakku - 12 Years Ago

Hi,

Is it possible to control the length of the Data label pointers in a Pie chart with Spider labels. I tried changing the following - under data labels, Arrow length and Pointer length, didn't seem to change anything. I have uploaded a sample.

AK

By Nevron Support - 12 Years Ago

Hi Amendra,

You can modify the pie connector length though code:

using System;
using System.Drawing;
using Nevron.GraphicsCore;
using Nevron.Chart;
using Nevron.ReportingServices;

namespace MyNamespace
{
 /// <summary>
 /// Sample class
 /// </summary>
 public class MyClass
 {
  /// <summary>
  /// Main entry point
  /// </summary>
  /// <param name="context"></param>
  public static void RSMain(NRSChartCodeContext context)
  {
   if (context.Document.Charts.Count == 0)
    return;
    
   NChart chart = context.Document.Charts[0];
   
   NPieSeries pieSeries = chart.Series[0] as NPieSeries;
   
   if (pieSeries != null)
   {
    pieSeries.ConnectorLength = new NLength(10);
   }
  }
 }
}

Hope this helps - let us know if you meet any problems...