ChartDirector 7.1 (C++ Edition)

MeterPointer.setShapeAndOffset


Usage

void setShapeAndOffset(int pointerType, double startOffset = NoValue, double endOffset = NoValue, double widthRatio = NoValue);

Description

Sets the shape of new style angular meter pointers.



New style pointers are designed to have configurable starting and ending points, as well as configurable width. In this documentation, the ending point refers to the "tip" of the pointer, while the starting point is the "base" of the pointer.

By default, the starting and ending points are at -0.15 and 0.95. It means the distance between the starting point and the center is 15% of the scale radius. The negative sign means that relative to the center, the starting point is at the opposite direction to the value the pointer is supposed to point to. Similarly, the distance between the ending point and the center is 95% of the scale radius, which means the ending point should be quite close to the outer rim of the meter scale.

In the above figure, the red pointer pointing at 25 and the green pointer are default new style triangular and line pointers. The blue and yellow pointers are new style triangular pointers, but with increased width, and with the starting and ending points at the same side relative to the center. The two red pointers at 72 and 94 are also new style triangular pointers, but with the starting points further away from the center than the ending points so that they point towards the center. The starting point positions are greater than 1 to put them outside the scale radius.

Arguments

ArgumentDefaultDescription
pointerType(Mandatory)Should be TriangularPointer2 for new style triangular pointer, and LinePointer2 for new style line pointer.
startOffsetNoValueThe radius the pointer starts at, expressed as a ratio to the scale radius. NoValue means the radius is automatically determined.
endOffsetNoValuehe radius the pointer ends at, expressed as a ratio to the scale radius. NoValue means the radius is automatically determined.
widthRatioNoValueThe width of the pointer relative to the default width. NoValue means the width is automatically determined.

Return Value

None