Configure chart properties through code for Multiple Chart Area charts


Configure chart properties through code for Multiple Chart Area charts...
Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Brian,

The following code shows how to iterate trough all charts and series in a chart document:


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)
  {
   for (int i = 0; i < context.Document.Charts.Count; i++)
   {
    NChart chart = context.Document.Charts[i];
    
    // do something with chart
    
    for (int j = 0; j < chart.Series.Count; j++)
    {
     NSeries series = (NSeries)chart.Series[j];
     
     // do something with series
    }
   }
  }
 }
}

Hope this helps - let us know if you require something more specific...



Best Regards,
Nevron Support Team


Brian Dalwood
Brian Dalwood
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)
Group: Forum Members
Posts: 6, Visits: 15
Hi,

I have a chart that includes 7 chart areas (each configured as an area chart with 5 data series in each).
I want to be able to configure each of the area charts properties (i.e. No axis labels, data series colours etc.) through code so that I can easily make bulk changes to any property across all charts.

Can you please provide some sample code to get me started accessing the properties of each "Chart Area" chart.

Thanks
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search