I tried out your code and I got an error:
"NChart Rendering Failed. Exception was: Exception has been thrown by the target of an invocation"
I changed the code to change the fillstyle of ALL floatbars and the code ran without error, however it also didnt work. Can you tell me where i might be going wrong?? All my bars stayed the same colours from the custom palette.
using System;
using System.Drawing;
using Nevron.GraphicsCore;
using Nevron.Chart;
using Nevron.ReportingServices;
namespace MyNamespace
{
/// <summary>
/// Sample class
/// </summary>
public class MyClass
{
public static void RSMain(NRSChartCodeContext context)
{
if (context.Document.Charts.Count == 0)
return;
NChart chart = context.Document.Charts[0];
for (int i = 0; i < chart.Series.Count; i++)
{
NFloatBarSeries floatBar = chart.Series[i] as NFloatBarSeries;
if (floatBar == null)
continue;
floatBar.FillStyles[i] = new NColorFillStyle(Color.Red);
}
}
}
}