Hi Kevin,
We were not able to replicate the problem - we tested with the following code:
using Nevron.Chart;
using Nevron.Chart.WinForm;
using Nevron.GraphicsCore;
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
class MyPaintCallback : INPaintCallback
{
public MyPaintCallback(NChartControl chartControl)
{
m_ChartControl = chartControl;
}
public void OnAfterPaint(NPanel panel, NPanelPaintEventArgs eventArgs)
{
throw new NotImplementedException();
}
public void OnBeforePaint(NPanel panel, NPanelPaintEventArgs eventArgs)
{
bool requiresRecalculate = true;
foreach (NSeries series in m_ChartControl.Charts[0].Series)
{
NPointSeries pointSeries = series as NPointSeries;
if (pointSeries != null)
{
pointSeries.Size = new NLength(4, NGraphicsUnit.Pixel);
}
}
if (requiresRecalculate)
{
m_ChartControl.document.Calculate();
m_ChartControl.RecalcLayout();
}
}
NChartControl m_ChartControl;
}
private void Form1_Load(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
chart.DockMode = PanelDockMode.Fill;
NPointSeries point = new NPointSeries();
chart.Series.Add(point);
Random rand = new Random();
for (int i = 0; i < 20; i++)
{
point.Values.Add(rand.Next(100));
}
chart.PaintCallback = new MyPaintCallback(nChartControl1);
nChartControl1.ImageExporter.SaveToFile("c:\\temp\\check.bmp", new NBitmapImageFormat());
}
}
}
And both the chart on the form and the exported image looked correct.
Best Regards,
Nevron Support Team