Hi Christopher,
You can inject this code to achieve your color coding requirements (paste it in the Code - Code Editor page):
using System;
using System.Drawing;
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)
{
if (context.Document.Charts.Count == 0)
return;
// get the first chart in the document
NChart chart = context.Document.Charts[0];
if (chart.Series.Count == 0)
return;
// get the first series in the chart
NSeries series = chart.Series[0] as NSeries;
if (series == null)
return;
// colorize it
int count = series.Values.Count;
double total = 0;
for (int i = 0; i < count; i++)
{
if (i < 3)
{
series.FillStyles[i] = new NColorFillStyle(Color.Yellow);
}
else if (i < 6)
{
series.FillStyles[i] = new NColorFillStyle(Color.Red);
}
else if (i < 9)
{
series.FillStyles[i] = new NColorFillStyle(Color.Green);
}
else
{
// do nothing to use default colors, otherwise simply set another filling
}
}
}
}
}
Hope this helps - questions or comments - please feel free...
Best Regards,
Nevron Support Team