Hi Lou,
There is no axis range changed event - we can easliy add one however it will be fired at paint time, as the chart gets calculated. You can work around this by recalculating the chart and simulating this event. For example:
using System;
using System.Windows.Forms;
using Nevron.Chart;
using Nevron.GraphicsCore;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
NAxis axis = chart.Axis(StandardAxis.PrimaryY);
// get old axis range
NRange1DD range = axis.Scale.RulerRange;
NBarSeries bar = new NBarSeries();
Random rand = new Random();
bar.Values.Add(rand.Next(100));
bar.Values.Add(rand.Next(100));
chart.Series.Add(bar);
nChartControl1.Document.Calculate();
nChartControl1.Document.RecalcLayout(nChartControl1.View.Context);
if (!axis.Scale.RulerRange.Equals(range))
{
// range has changed
MessageBox.Show("Range Changed");
}
nChartControl1.Refresh();
}
}
}
Hope this helps - let us know if you meet any problems.
Best Regards,
Nevron Support Team