Profile Picture

Pie slices

Posted By Julia Shah 13 Years Ago
Author
Message
Julia Shah
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 1, Visits: 1

Hi,

How can I make my pie chart's slices to show separately (cut out) from one another, like here for example? http://forum.nevron.com/download.aspx?id=352&MessageID=4716

Thanks!



Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 12 hours ago
Posts: 3,054, Visits: 4,009

Hi Julia,

You'll have to use some custom code. The following code snippet shows how to apply detachments to all pie slices it can be modified to apply detachment to individual slices as well:


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)
  {
   NPieChart pieChart = context.Document.Charts[0] as NPieChart;
   
   if (pieChart == null)
    return;
    
   for (int i = 0; i < pieChart.Series.Count; i++)
   {
    NPieSeries pieSeries = (NPieSeries)pieChart.Series[i];
    for (int j = 0; j < pieSeries.Values.Count; j++)
    {
     pieSeries.Detachments.Add(2);
    }
   }
  }
 }
}



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic