Nevron .NET Vision Documentation
Porting from Q2 2007 to Q3 2007

This topic describes the differences in the programming model between Nevron Chart for .NET Q2 2007 and Nevron Chart for .NET Q3 2007.

The AxisValueSnapMode enum is removed. Instead all properties previously accepting a value of this enum now expect an object instance derived from the NAxisValueSnapper class. The following table lists how the values of the enum translate to these classes:


Enum Value Representing Class Description
AxisValueSnapMode.None Null. You should assign null to the property accepting NAxisValueSnapperClass. Snapping is disabled.
AxisValueSnapMode.Ruler NAxisRulerClampSnapper Values are clamped to the ruler begin and end values.
AxisValueSnapMode.MajorTicks NAxisMajorTickSnapper Values are snapped to axis major ticks.
AxisValueSnapMode.MinorTicks NAxisMinorTickSnapper Values are snapped to axis minor ticks.
AxisValueSnapMode.RulerMinMax NAxisRulerMinMaxSnapper Values are snapped to the ruler min and max values.

The change is required due to the introduction of the numeric and date/time value snapping modes which also take additional arguments (origin and step). For more information please read the topic Axis Value Snapping.

This change applies to the objects of type NAxisCursor and NRangeSelection.

The following code snippets shows how to correctly translate code from previous versions:

Axis Cursor
C#
Copy Code
axisCursor.AxisValueSnapMode = AxisValueSnapMode.MajorTicks;
Visual Basic
Copy Code
axisCursor.AxisValueSnapMode = AxisValueSnapMode.MajorTicks

translates to:

C#
Copy Code
axisCursor.ValueSnapper = new NAxisMajorTickSnapper();
Visual Basic
Copy Code
axisCursor.ValueSnapper = New NAxisMajorTickSnapper() 
Range selection
C#
Copy Code
rangeSelection.VerticalAxisValueSnapMode = AxisValueSnapMode.MajorTicks;
rangeSelection.HorizontalAxisValueSnapMode = AxisValueSnapMode.MajorTicks;
Visual Basic
Copy Code
rangeSelection.VerticalAxisValueSnapMode = AxisValueSnapMode.MajorTicks
rangeSelection.HorizontalAxisValueSnapMode = AxisValueSnapMode.MajorTicks
Translates to:
C#
Copy Code
rangeSelection.VerticalValueSnapper = new NAxisMajorTickSnapper();
rangeSelection.HorizontalValueSnapper = new NAxisMajorTickSnapper(); 
VB
Copy Code
rangeSelection.VerticalValueSnapper = New NAxisMajorTickSnapper
rangeSelection.HorizontalValueSnapper = New NAxisMajorTickSnapper

 

 


©2017. Nevron Software LLC.

Send Feedback