Profile Picture

NullReferrenceException in NViewToModel2DTransformation Constructor

Posted By Raul Kist 13 Years Ago

NullReferrenceException in NViewToModel2DTransformation Constructor

Author
Message
Raul Kist
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 6, Visits: 1
Hi,

it's the first time I'm writing here and I'm having some trouble with coordinates transformations.

When trying to create an NViewToModel2DTransformation object, using the following code

var horizId = chartControl.Charts[0].Axis(StandardAxis.PrimaryX).Id;
var vertId = chartControl.Charts[0].Axis(StandardAxis.PrimaryY).Id;
this.viewToModel2DTransformation = new NViewToModel2DTransformation(chartControl.View.Context, chartControl.Charts[0], horizId, vertId);

I'm getting an unhandled NullReferrenceException.

I'm not sure if it is a bug of mine (yes, all variables are instantiated) or Nevron's.
There is no documentation (other than the description) on this class.

Best regards,
Kist

Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Kist,

You need to use the AxisId property:

var horizId = chartControl.Charts[0].Axis(StandardAxis.PrimaryX).AxisId;
var vertId = chartControl.Charts[0].Axis(StandardAxis.PrimaryY).AxisId;

hope this helps - let us know if you meet any problems.



Best Regards,
Nevron Support Team



Raul Kist
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 6, Visits: 1
Damn!
Now I feel stupid!

XD

Worked fine!

Thanks a lot!



Similar Topics


Reading This Topic