PoPieChart Class Reference
[PieChart]

MeshViz Abstract class for pie chart representation. More...

#include <MeshViz/graph/PoPieChart.h>

Inheritance diagram for PoPieChart:
PoGraphMaster PoBase SoBaseKit SoNode SoGetView SoFieldContainer SoBase SoRefCounter SoTypedObject PoPieChart2D PoPieChart3D

List of all members.

Classes

struct  PieChartAttr

Public Types

enum  IntAnnotPosition {
  RADIAL_INT_POS,
  HOR_INT_POS
}
enum  ExtAnnotPosition {
  RADIAL_EXT_POS,
  HOR_EXT_POS,
  HOR_ALIGNED_EXT_POS,
  VERT_ALIGNED_EXT_POS,
  SQUARE_ALIGNED_EXT_POS
}
enum  Alignment {
  LEFT_ALIGN,
  CENTER_ALIGN,
  RIGHT_ALIGN,
  INWARDS_ALIGN,
  OUTWARDS_ALIGN
}
enum  PercentStatus {
  ABSOLUTE,
  PERCENTAGE
}

Public Member Functions

virtual SoType getTypeId () const
virtual const SoNodekitCataloggetNodekitCatalog () const
void setMiscTextAttr (PbMiscTextAttr *textAttr)
const PbMiscTextAttrgetMiscTextAttr () const
void setFormat (PbNumericDisplayFormat *format)
const PbNumericDisplayFormatgetFormat () const
SbBool getPickedSliceNumber (const SoPath *path, int &sliceNumber) const
void setSliceToTranslate (int sliceNumber, float translateValue)
float getSliceToTranslate (int sliceNumber) const

Static Public Member Functions

static SoType getClassTypeId ()
static const SoNodekitCataloggetClassNodekitCatalog ()

Public Attributes

SoSFFloat radius
SoMFString sliceText
SoMFFloat sliceValue
SoMFColor sliceColor
SoSFEnum intAnnotPosition
SoSFEnum intAnnotAlignment
SoSFBool intAnnotTextVisibility
SoSFBool intAnnotValueVisibility
SoSFBool intAnnotPercentVisibility
SoSFBool intAnnotAddStringVisibility
SoSFString intAnnotAddString
SoSFString intAnnotTextFontName
SoSFFloat intAnnotTextFontSize
SoSFString intAnnotValueFontName
SoSFFloat intAnnotValueFontSize
SoSFString intAnnotPercentFontName
SoSFFloat intAnnotPercentFontSize
SoSFFloat intAnnotDistance
SoSFEnum extAnnotPosition
SoSFEnum extAnnotAlignment
SoSFBool extAnnotTextVisibility
SoSFBool extAnnotValueVisibility
SoSFBool extAnnotPercentVisibility
SoSFBool extAnnotAddStringVisibility
SoSFString extAnnotAddString
SoSFString extAnnotTextFontName
SoSFFloat extAnnotTextFontSize
SoSFString extAnnotValueFontName
SoSFFloat extAnnotValueFontSize
SoSFString extAnnotPercentFontName
SoSFFloat extAnnotPercentFontSize
SoSFFloat extAnnotDistance1
SoSFFloat extAnnotDistance2
SoSFFloat extAnnotDistance3
SoSFBool arrowVisibility
SoSFFloat arrowHeight
SoSFFloat arrowWidth
SoSFBool sliceGroupActive
SoSFFloat sliceGroupMinValue
SoSFEnum sliceGroupFlagMin
SoSFString sliceGroupString
SoMFShort sliceToTranslateNumber
SoMFFloat sliceToTranslateValue
SoSFFloat sliceAngleStep

Detailed Description

MeshViz Abstract class for pie chart representation.

Abstract class for all pie chart representations. This class handles all pie chart attributes. A pie chart represents the relative size of one datum in relation to a set of data. Each datum is given by a numerical value which is expressed as a percentage of the sum of the values of the entire set of data. This percentage is used to calculate the angle of the slice representing the datum. All slices together make up a pie chart.

The slices of which the value is small can be regroup in a same slice. This slice is called the grouping slice.

There are 2 types of pie chart annotations. Internal annotations and external annotations. Futhermore annotations can be framed by a box. All annotations are draw with the Z-Buffer desactivated, that is, they are always visible.

There are 5 groups of fields attributes

)

All pie chart texts depend on the current miscellaneous text attributes which define the font name, line length and so on. If the method setMiscTextAttr(textAttr) is called, the current miscellaneous text attributes is "textAttr". Otherwise the current miscellaneous text attributes are specified in the current inherited state (cf property node PoMiscTextAttr).

All pie chart numerical values depend on the current numerical display format. If the method setFormat(format) is called, the current numerical display format is "format". Otherwise the current numerical display format is specified in the current inherited state (cf property node PoNumericDisplayFormat).


Member Enumeration Documentation

Type of annotation alignment.

Enumerator:
LEFT_ALIGN 

Annotations are aligned on the left of the annotation box.

CENTER_ALIGN 

Annotations are aligned on the center of the annotation box.

RIGHT_ALIGN 

Annotations are aligned on the right of the annotation box.

INWARDS_ALIGN 

Annotations are aligned inward the pie chart.

OUTWARDS_ALIGN 

Annotations are aligned outward the pie chart.

Type of external annotation position.

Enumerator:
RADIAL_EXT_POS 

Exterior annotations are radial to the slices.

HOR_EXT_POS 

Exterior annotations are horizontal.

HOR_ALIGNED_EXT_POS 

Exterior annotations are horizontally aligned.

VERT_ALIGNED_EXT_POS 

Exterior annotations are vertically aligned.

SQUARE_ALIGNED_EXT_POS 

Exterior annotations are aligned on a square.

Type of internal annotation position.

Enumerator:
RADIAL_INT_POS 

Interior annotations are radial to the slices.

HOR_INT_POS 

Interior annotations are horizontal.

Type of threshold for the grouping slice.

Enumerator:
ABSOLUTE 
PERCENTAGE 

Member Function Documentation

static const SoNodekitCatalog* PoPieChart::getClassNodekitCatalog (  )  [static]

Returns the SoNodekitCatalog for this class.

Reimplemented from PoGraphMaster.

Reimplemented in PoPieChart2D, and PoPieChart3D.

static SoType PoPieChart::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from PoGraphMaster.

Reimplemented in PoPieChart2D, and PoPieChart3D.

const PbNumericDisplayFormat* PoPieChart::getFormat (  )  const

Gets a reference to a PbNumericDisplayFormat object for the numerical display format of values of the pie chart.

const PbMiscTextAttr* PoPieChart::getMiscTextAttr (  )  const

Gets a reference to a PbMiscTextAttr for miscellaneous text attributes.

virtual const SoNodekitCatalog* PoPieChart::getNodekitCatalog (  )  const [virtual]

Returns the SoNodekitCatalog for this instance.

Reimplemented from PoGraphMaster.

Reimplemented in PoPieChart2D, and PoPieChart3D.

SbBool PoPieChart::getPickedSliceNumber ( const SoPath path,
int &  sliceNumber 
) const

Allow the user to retreive the slice number (sliceNumber argument) which has been picked from a picked path (path argument) (cf SoSelection node for more information about picking).

Returns:
FALSE, if the picked path does not correspond to a slice of the pie chart (sliceNumber is not significative),
TRUE otherwise.
float PoPieChart::getSliceToTranslate ( int  sliceNumber  )  const

Gets the current translation of a slice.

Returns 0 if sliceNumber slice does not exist or sliceNumber slice is not translated, the translation value otherwise.

virtual SoType PoPieChart::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from PoGraphMaster.

Reimplemented in PoPieChart2D, and PoPieChart3D.

void PoPieChart::setFormat ( PbNumericDisplayFormat format  ) 

Sets a reference to a PbNumericDisplayFormat object for the numerical display format of values of the pie chart.

If this method is not called (or called passing NULL as argument), this is the numerical display format defined in the current inherited state (defined with the property node PoNumericDisplayFormat) which is used.

void PoPieChart::setMiscTextAttr ( PbMiscTextAttr textAttr  ) 

Sets a reference to a PbMiscTextAttr for miscellaneous text attributes.

If this method is not called (or called passing NULL as argument), this is the miscellaneous text attributes defined in the current inherited state (defined with the property node PoMiscTextAttr) which are used.

void PoPieChart::setSliceToTranslate ( int  sliceNumber,
float  translateValue 
)

Convenience methods to set the fields sliceToTranslateNumber and sliceToTranslateValue.

As regards setSliceToTranslate() method, if sliceNumber == sliceToTranslateNumber[i] (i=0 to sliceToTranslateNumber.getNum() - 1), sliceToTranslateNumber[i] = translationValue, else sliceToTranslateNumber[sliceToTranslateNumber.getNum()] = translationValue.


Member Data Documentation

Height of the arrow.

Visibility of the arrow.

Width of the arrow.

String concatened with exterior values.

Specify the visibility of a string concatenated with the exterior values (if they are visible).

Exterior annotation alignment.

Distance from the pie chart center to the end of the arrow.

If this value is less or equal to 0, the distance is fixed to 21/20 of the radius.

Distance from the end of the arrow to the middle of the arrow.

If this value is less or equal to 0, the distance is fixed to 1/10 of the radius.

Distance from the middle of the arrow to the start of the arrow.

If this value is less or equal to 0, the distance is fixed to 1/5 of the radius.

Exterior percentage font name.

If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.

Font size of exterior percentages.

If this value is less or equal to 0, the font size is fixed at 0.025. This value is a percentage of the current domain (cf PoBase description).

Exterior percent visibility (percent are computed from sliceValue field).

Exterior annotation position.

Exterior text (texts of sliceText field) font name.

If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.

Font size of exterior texts (texts of sliceText field).

If this value is less or equal to 0, the font size is fixed at 0.025. This value is a percentage of the current domain (cf PoBase description).

Exterior text visibility (texts of sliceText field).

Exterior value (values of sliceValue field) font name.

If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.

Font size of exterior values (values of sliceValue field).

If this value is less or equal to 0, the font size is fixed at 0.025. This value is a percentage of the current domain (cf PoBase description).

Exterior value visibility (values of sliceValue field).

String concatened with interior values.

Specify the visibility of a string concatenated with the interior values (if they are visible).

Interior annotation alignment.

Distance from the pie chart center to the interior annotation box center.

If this value is less or equal to 0, the distance is fixed to 2/3 of the radius.

Interior percentage font name.

If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.

Font size of interior percentages.

If this value is less or equal to 0, the font size is fixed at 0.025. This value is a percentage of the current domain (cf PoBase description).

Interior percent visibility (percent are computed from sliceValue field).

Interior annotation position.

Interior text (texts of sliceText field) font name.

If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.

Font size of interior texts (texts of sliceText field).

If this value is less or equal to 0, the font size is fixed at 0.025. This value is a percentage of the current domain (cf PoBase description).

Interior text visibility (texts of sliceText field).

Interior value (values of sliceValue field) font name.

If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.

Font size of interior values (values of sliceValue field).

If this value is less or equal to 0, the font size is fixed at 0.025. This value is a percentage of the current domain (cf PoBase description).

Interior value visibility (values of sliceValue field).

Radius of the pie chart.

Slice are approximated by a polygon, that is a sequence of straight line segments.

sliceAngleStep is the angle formed by two consecutive points of the polygon relative to the center of the slice.

Color associated to each slice of the pie chart.

If sliceColor.getNum() < sliceText.getNum(), then the interpretation of sliceColor is cyclical.

Activate or Deactivate the regrouping of small values.

Indicate if the value sliceGroupMinValue is interpreted as percentage (PERCENTAGE) or not (ABSOLUTE).

Use enum PercentStatus.

Threshold underneath the slice are regrouped.

String for the regrouping slice.

Text associated to each slice of the pie chart.

Take care that sliceText.getNum() is equal to sliceValue.getNum(), otherwise the number of slices of the pie chart is the minimun of sliceText.getNum() and sliceValue.getNum().

Numbers (slice numbers begin at 0) of the slices to translate.

sliceToTranslateNumber[i] is the number of the i-th slice to translate. If sliceToTranslateNumber[i] is less than zero, it corresponds to the slice of regrouping small values.

Translation values along the bisectors of the slices.

sliceToTranslateValue[i] is the translate value along the bisector of the i-th slice.

Value associated to each slice of the pie chart.

Take care that sliceText.getNum() is equal to sliceValue.getNum(), otherwise the number of slices of the pie chart is the minimun of sliceText.getNum() and sliceValue.getNum().


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/