SoDiagram2D

InventorModule
genre Diagram
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoDiagram2D
definition SoDiagram2D.def
see also StylePalette, ConcatenateCurves
keywords Draw, curve, display, line, area, error, bar, extensions

Purpose

The module SoDiagram2D draws curves as a diagram.

Also, this appearance of the diagram, like the style and the labeling of the axes can be adjusted by this module.

The module can furthermore render a legend and can restrict the zooming of a diagram.

Usage

Just attach this module to a SoRenderArea or any other viewer.

There is a number of extension modules for the SoDiagram2D module to add interaction (zooming, measuring, etc.) or different types of background.

Add the extensions in front of this module.

Windows

Default Panel

../../../Modules/Inventor/SoDiagram2D/mhelp/Images/Screenshots/SoDiagram2D._default.png

Input Fields

inStylePalette

name: inStylePalette, type: StylePalette(MLBase)

inCurveList

name: inCurveList, type: CurveDataBaseList/CurveList/CurveData(MLBase)
For accessing this object via scripting see the Scripting Reference: MLCurveListWrapper.

Output Fields

self

name: self, type: SoNode, deprecated name: outNode

Parameter Fields

Field Index

Anti Alias: Bool Curve Line Style Highlighted: Integer Marker Type: Enum
Area Opacity: Float Curve Line Style Not Highlighted: Integer Max (maxX): Double
Auto border (autoBorderH): Bool Curve Line Width Highlighted: Float Max (maxY): Double
Auto border (autoBorderV): Bool Curve Line Width Not Highlighted: Float Max. Zoom Factor: Double
Auto range (autoRangeX): Bool Curves to be Highlighted: String Min (minX): Double
Auto range (autoRangeY): Bool Draw Axis (drawAxisX): Bool Min (minY): Double
Axis Color: Color Draw Axis (drawAxisY): Bool Min. Zoom Factor: Double
Axis Rotation: Enum Draw Children Extensions: Bool Placement: Enum
Axis tick minimum distance: Integer Draw Legend: Bool Scale (scaleX): Double
Border (borderH): Integer Font Size (titleFontHeight): Integer Scale (scaleY): Double
Border (borderV): Integer Font Size (legendFontHeight): Integer Should draw highlighted curves on top: Bool
Change area opacity (changeAreaOpacityForHighlightedCurves): Bool Font Size (axisTitleFontHeightX): Integer Show (drawDiagramTitle): Bool
Change area opacity (changeAreaOpacityForNotHighlightedCurves): Bool Font Size (axisTitleFontHeightY): Integer Show (drawAxisTitleX): Bool
Change line width (changeLineWidthForHighlightedCurves): Bool Font Size (axisLabelFontHeightX): Integer Show (drawAxisTitleY): Bool
Change line width (changeLineWidthForNotHighlightedCurves): Bool Font Size (axisLabelFontHeightY): Integer Show grid: Bool
Change opacity (changeLineOpacityForHighlightedCurves): Bool Forward Events To Children Extensions: Bool stylePaletteMode: Enum
Change opacity (changeLineOpacityForNotHighlightedCurves): Bool Grid Color: Color Ticks (drawTicksX): Bool
Change style index (changeLineStyleForHighlightedCurves): Bool Labels (drawLabelsX): Bool Ticks (drawTicksY): Bool
Change style index (changeLineStyleForNotHighlightedCurves): Bool Labels (drawLabelsY): Bool Title (diagramTitleString): String
Curve Area Opacity Highlighted: Float Limit: Bool Title (axisTitleStringX): String
Curve Area Opacity Not Highlighted: Float Line Opacity: Float Title (axisTitleStringY): String
Curve Color: Color Line Style: Enum Use Zoom Restrictions: Bool
Curve Line Opacity Highlighted: Float Line Width: Integer zoomAnimationEase: Float
Curve Line Opacity Not Highlighted: Float Marker Size: Integer zoomAnimationEpsilon: Float

Visible Fields

Min (minX)

name: minX, type: Double, default: 0

Sets the minimum range in x-direction.

Is set automatically if Auto range is checked.

Max (maxX)

name: maxX, type: Double, default: 1

Sets the maximum range in x-direction.

Is set automatically if Auto range is checked.

Min (minY)

name: minY, type: Double, default: 0

Sets the minimum range in y-direction.

Is set automatically if Auto range is checked.

Max (maxY)

name: maxY, type: Double, default: 1

Sets the maximum range in y-direction.

Is set automatically if Auto range is checked.

Scale (scaleX)

name: scaleX, type: Double, default: 1

Sets a scale factor for the x-axis.

Scale (scaleY)

name: scaleY, type: Double, default: 1

Sets a scale factor for the y-axis.

Auto range (autoRangeX)

name: autoRangeX, type: Bool, default: TRUE

If checked, the range for the x-axis is computed and set automatically.

Auto range (autoRangeY)

name: autoRangeY, type: Bool, default: TRUE

If checked, the range for the y-axis is computed and set automatically.

Axis Color

name: axisColor, type: Color, default: 1 1 1

Sets the color of the axes.

Axis Rotation

name: axisRotation, type: Enum, default: AXIS_ROTATION_LEFT_BOTTOM

Defines how the axes are rotated.

Values:

Title Name Deprecated Name
Left Bottom AXIS_ROTATION_LEFT_BOTTOM LeftBottom
Right Bottom AXIS_ROTATION_RIGHT_BOTTOM RightBottom
Left Top AXIS_ROTATION_LEFT_TOP LeftTop
Right Top AXIS_ROTATION_RIGHT_TOP RightTop
Bottom Left AXIS_ROTATION_BOTTOM_LEFT BottomLeft
Bottom Right AXIS_ROTATION_BOTTOM_RIGHT BottomRight
Top Left AXIS_ROTATION_TOP_LEFT TopLeft
Top Right AXIS_ROTATION_TOP_RIGHT TopRight

Font Size (titleFontHeight)

name: titleFontHeight, type: Integer, default: 14

Sets the font height of the title string.

Show (drawDiagramTitle)

name: drawDiagramTitle, type: Bool, default: FALSE

If checked, a title string is rendered above the diagram.

Title (diagramTitleString)

name: diagramTitleString, type: String

Sets a string to be rendered above the diagram.

Is only rendered if Show is checked.

Show grid

name: drawGrid, type: Bool, default: FALSE

If checked, a grid is rendered in the background of the diagram.

Grid Color

name: gridColor, type: Color, default: 0.349999994039536 0.349999994039536 0.349999994039536

Sets the color of the grid that can be rendered in the background of the diagram.

Draw Legend

name: drawLegend, type: Bool, default: FALSE

If checked, a legend is rendered.

Placement

name: legendPlacement, type: Enum, default: LEGEND_UPPER_RIGHT

Defines the placement of the optional legend.

Values:

Title Name
Upper Right LEGEND_UPPER_RIGHT
Lower Right LEGEND_LOWER_RIGHT
Lower Left LEGEND_LOWER_LEFT
Upper Left LEGEND_UPPER_LEFT

Font Size (legendFontHeight)

name: legendFontHeight, type: Integer, default: 12

Sets the font size of the optional legend.

Limit

name: autoLimitLegendFontHeight, type: Bool, default: FALSE

If checked, the height of the legend cannot exceed the height of the diagram by limiting the font size. The font size cannot be smaller that 4 pixels, though.

Use Zoom Restrictions

name: useZoomRestrictions, type: Bool, default: FALSE

If checked, the module restricts interactive zooming.

The diagram can be zoomed by using the extensions SoDiagram2DAxisZoom and/or SoDiagram2DZoom.

Min. Zoom Factor

name: minZoomFactor, type: Double, default: 0.1

Sets the minimum zoom factor.

Max. Zoom Factor

name: maxZoomFactor, type: Double, default: 10

Sets the maximum zoom factor.

Draw Children Extensions

name: drawChildrenExtensions, type: Bool, default: TRUE

If checked, extension modules are regarded while rendering the diagram.

Forward Events To Children Extensions

name: forwardEventsToChildrenExtensions, type: Bool, default: TRUE

If checked, events are forwarded to extensions in the scene.

Change opacity (changeLineOpacityForHighlightedCurves)

name: changeLineOpacityForHighlightedCurves, type: Bool, default: FALSE

If checked, the opacity of highlighted curves is changed.

Curve Line Opacity Highlighted

name: curveLineOpacityHighlighted, type: Float, default: 1

Sets the opacity of highlighted curves.

Change area opacity (changeAreaOpacityForHighlightedCurves)

name: changeAreaOpacityForHighlightedCurves, type: Bool, default: FALSE

Set if area opacity of highlighted curves should be changed.

Curve Area Opacity Highlighted

name: curveAreaOpacityHighlighted, type: Float, default: 1

Sets area opacity of highlighted curves.

Change opacity (changeLineOpacityForNotHighlightedCurves)

name: changeLineOpacityForNotHighlightedCurves, type: Bool, default: FALSE

If checked, the opacity of non-highlighted curves is changed.

Curve Line Opacity Not Highlighted

name: curveLineOpacityNotHighlighted, type: Float, default: 0.30000001

Sets the opacity of non-highlighted curves.

Change area opacity (changeAreaOpacityForNotHighlightedCurves)

name: changeAreaOpacityForNotHighlightedCurves, type: Bool, default: FALSE

Set if area opacity of not highlighted curves should be changed.

Curve Area Opacity Not Highlighted

name: curveAreaOpacityNotHighlighted, type: Float, default: 0.30000001

Sets area opacity of not highlighted curves.

Change style index (changeLineStyleForHighlightedCurves)

name: changeLineStyleForHighlightedCurves, type: Bool, default: FALSE

If checked, the line style is changed of highlighted curves.

Curve Line Style Highlighted

name: curveLineStyleHighlighted, type: Integer, default: 1

Sets the line style of highlighted curves.

Change style index (changeLineStyleForNotHighlightedCurves)

name: changeLineStyleForNotHighlightedCurves, type: Bool, default: FALSE

If checked, the line style of non-highlighted curves is changed.

Curve Line Style Not Highlighted

name: curveLineStyleNotHighlighted, type: Integer, default: 1

Sets the line style of non-highlighted curves.

Change line width (changeLineWidthForHighlightedCurves)

name: changeLineWidthForHighlightedCurves, type: Bool, default: FALSE

If checked, the line width of highlighted curves is changed.

Curve Line Width Highlighted

name: curveLineWidthHighlighted, type: Float, default: 1

Sets the line width of highlighted curves.

Change line width (changeLineWidthForNotHighlightedCurves)

name: changeLineWidthForNotHighlightedCurves, type: Bool, default: FALSE

If checked, the line width of non-highlighted curves is changed.

Curve Line Width Not Highlighted

name: curveLineWidthNotHighlighted, type: Float, default: 1

Sets the line width of non-highlighted curves.

Curves to be Highlighted

name: curveIndexHighlighted, type: String

Sets the ids of the curves to be set as highlighted.

Should draw highlighted curves on top

name: reorderHighlightedCurves, type: Bool, default: FALSE

If checked, highlighted curves are drawn after non-highlighted curves.

Border (borderH)

name: borderH, type: Integer, default: 0

Sets a horizontal border in pixel.

Border (borderV)

name: borderV, type: Integer, default: 0

Sets a vertical border in pixel.

Auto border (autoBorderH)

name: autoBorderH, type: Bool, default: TRUE

If checked, the horizontal border size is computed and set automatically.

Auto border (autoBorderV)

name: autoBorderV, type: Bool, default: TRUE

If checked, the vertical border size is computed and set automatically.

Draw Axis (drawAxisX)

name: drawAxisX, type: Bool, default: TRUE

If checked, the x-axis is rendered.

Draw Axis (drawAxisY)

name: drawAxisY, type: Bool, default: TRUE

If checked, the y-axis is rendered.

Ticks (drawTicksX)

name: drawTicksX, type: Bool, default: TRUE

If checked, ticks are rendered along the x-axis.

Ticks (drawTicksY)

name: drawTicksY, type: Bool, default: TRUE

If checked, ticks are rendered along the y-axis.

Labels (drawLabelsX)

name: drawLabelsX, type: Bool, default: TRUE

If checked, labels are rendered along the x-axis.

Labels (drawLabelsY)

name: drawLabelsY, type: Bool, default: TRUE

If checked, labels are rendered along the y-axis.

Show (drawAxisTitleX)

name: drawAxisTitleX, type: Bool, default: FALSE

If checked, a title string is rendered for the x-axis.

Show (drawAxisTitleY)

name: drawAxisTitleY, type: Bool, default: FALSE

If checked, a title string is rendered for the y-axis.

Title (axisTitleStringX)

name: axisTitleStringX, type: String, default: X [dn]

Sets a title string for the x-axis.

Title (axisTitleStringY)

name: axisTitleStringY, type: String, default: Y [dn]

Sets a title string for the y-axis.

Font Size (axisTitleFontHeightX)

name: axisTitleFontHeightX, type: Integer, default: 12

Sets the font size of the title for the x-axis.

Font Size (axisTitleFontHeightY)

name: axisTitleFontHeightY, type: Integer, default: 12

Sets the font size of the title for the y-axis.

Font Size (axisLabelFontHeightX)

name: axisLabelFontHeightX, type: Integer, default: 12

Sets the font size for the labels for the x-axis.

Font Size (axisLabelFontHeightY)

name: axisLabelFontHeightY, type: Integer, default: 12

Sets the font size for the labels for the y-axis.

Axis tick minimum distance

name: tickMinDistance, type: Integer, default: 30, minimum: 10

Use this to force a minimum distance between axis ticks.

Curve Color

name: curveColor, type: Color, default: 1 1 1

Sets the color of the rendered curves.

The colors set in the optionally attached StylePalette overwrite this color.

Line Style

name: lineStyle, type: Enum, default: LINE_STYLE_SOLID

Sets the line style for the rendered curves.

The line styles set in the optionally attached StylePalette overwrite this line style.

Values:

Title Name Deprecated Name
None LINE_STYLE_NONE None
Solid LINE_STYLE_SOLID Solid
Dashed LINE_STYLE_DASHED Dashed
Dotted LINE_STYLE_DOTTED Dotted

Marker Type

name: markerType, type: Enum, default: MARKER_TYPE_NONE

Sets the marker type for the rendered curves.

The marker types set in the optionally attached StylePalette overwrite this marker type.

Values:

Title Name Deprecated Name
None MARKER_TYPE_NONE None
Dot MARKER_TYPE_DOT Dot
Asterisk MARKER_TYPE_ASTERISK Asterisk
Circle MARKER_TYPE_CIRCLE Circle
Square MARKER_TYPE_SQUARE Square
Triangle MARKER_TYPE_TRIANGLE Triangle
Plus MARKER_TYPE_PLUS Plus
Cross MARKER_TYPE_CROSS Cross

Marker Size

name: markerSize, type: Integer, default: 10

Sets the marker size of the rendered curves.

The marker sizes set in the optionally attached StylePalette overwrite this marker size.

Line Width

name: lineWidth, type: Integer, default: 1

Sets the line width of the rendered curves.

The line widths set in the optionally attached StylePalette overwrite this line width.

Anti Alias

name: antiAlias, type: Bool, default: TRUE

If checked, the curves are rendered using anti-aliasing.

The anti-alias settings set in the optionally attached StylePalette overwrite this anti-alias setting.

Area Opacity

name: areaOpacity, type: Float, default: 0.5, minimum: 0, maximum: 1

Sets the opacity for areas rendered below the curves.

Line Opacity

name: lineOpacity, type: Float, default: 1, minimum: 0, maximum: 1

Sets the line opacity of the rendered curves.

Hidden Fields

zoomAnimationEase

name: zoomAnimationEase, type: Float, default: 0.5

zoomAnimationEpsilon

name: zoomAnimationEpsilon, type: Float, default: 0.0099999998

stylePaletteMode

name: stylePaletteMode, type: Enum, default: STYLE_PALETTE_INDEX

Sets mode of how styles from a StylePalette are assigned to curves.

Values:

Title Name Description
Index STYLE_PALETTE_INDEX Match curve style value to style index.
Name STYLE_PALETTE_NAME Match curve title value to a style name. Take the first style that matches.