I came up with the following code for a Line Chart to solve the problem. However it does not seem to work, is there an obvious mistake on this?
using System;
using System.Drawing;
using System.Windows.Forms;
using Nevron.GraphicsCore;
using Nevron.Chart;
using Nevron.ReportingServices;
namespace MyNamespace
{
///
/// Sample class
/// public class MyClass
{
///
/// Main entry point
/// ///
public static void RSMain(NRSChartCodeContext context)
{
NChart chart = context.Document.Charts[0];
for (int i = 0; i < chart.Series.Count; i++)
{
NSeriesBase series = chart.Series[i];
NLineSeries lineSeries = chart.Series[i] as NLineSeries;
if (series.Name.Contains("AGRALIX MONO")) {
lineSeries.FillStyle = new NColorFillStyle(Color.Red);
}
if (series.Name.Contains("CARDEX")) {
lineSeries.FillStyle = new NColorFillStyle(Color.Pink);
}
}
}
}
}