Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDSplineLayerMBS class.

CDSplineLayerMBS.setMonotonicity(m as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the monotonicity constraint when computing the spline curve.

Monotonicity means a sequence is increasing or decreasing in one direction. For example, the sequence 1, 2, 3, 4 is monotonically increasing, while the sequence 1, 3, 2, 5, 4 is not monotonic.

A standard spline curve can overshoot or undershoot if the underlying points have "sharp corners". That means without any constrain, even if the data points are monotonic, the spline curve joining the points is not necessarily monotonic. It can overshoot and then "fall back".

In many charts, it may be desirable to constraint the spline curve to flow in a certain direction. For example, in a time based chart, it may be desirable to constraint the curve always flow from left to right.

ChartDirector supports the following monotonic modes.

ConstantValueDescription
MonotonicNone0The spline curve is not constraint to flow in any direction. This results in the smoothest spline curve.
MonotonicX1The spline curve is constraint to not overshooting or undershooting in the x-axis direction. This means if the data points are monotonic in the x-axis direction, the spline curve will also be monotonic in the x-axis direction.
MonotonicY2The spline curve is constraint to not overshooting or undershooting in the y-axis direction. This means if the data points are monotonic in the y-axis direction, the spline curve will also be monotonic in the y-axis direction.
MonotonicXY3The spline curve is constraint to not overshooting or undershooting in both the x-axis and the y-axis directions. This means if the data points are monotonic in the x-axis direction, the spline curve will also be monotonic in the x-axis direction. If the data points are monotonic in the y-axis direction, the spline curve will also be monotonic in the y-axis direction.
MonotonicAuto4Automatically choose between MonotonicX, MonotonicY or MonotonicXY, depending on whether the data points are monotonic in the x-axis direction, or y-axis direction, or both.

Arguments:
ArgumentDefaultDescription
monotonicMode(Mandatory)The monotonic constraint of the spline curve. Must be be one of the constants in the above table. If this method is never called for a spline layer, the default is MonotonicAuto.

CDSplineLayerMBS.setTension(tension as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the tension to use when computing the spline curve.

The tension parameter should be between -1 and 1. A positive tension will make the spline tighter. The spline curve will become straight line segments when tension is 1. A negative tension will make the spline looser.
ArgumentDefaultDescription
tension(Mandatory)The tension of the spline, which should be between -1 and 1.

The items on this page are in the following plugins: MBS ChartDirector Plugin.


The biggest plugin in space...