VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkBarChartActor Class Reference

create a bar chart from an array More...

#include <vtkBarChartActor.h>

Inheritance diagram for vtkBarChartActor:
[legend]
Collaboration diagram for vtkBarChartActor:
[legend]

Public Types

typedef vtkActor2D Superclass
 
- Public Types inherited from vtkActor2D
typedef vtkProp Superclass
 
- Public Types inherited from vtkProp
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkBarChartActorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void SetInput (vtkDataObject *)
 
virtual vtkDataObjectGetInput ()
 
virtual void SetTitleVisibility (int)
 
virtual int GetTitleVisibility ()
 
virtual void TitleVisibilityOn ()
 
virtual void TitleVisibilityOff ()
 
virtual void SetTitle (const char *)
 
virtual char * GetTitle ()
 
virtual void SetTitleTextProperty (vtkTextProperty *p)
 
virtual vtkTextPropertyGetTitleTextProperty ()
 
virtual void SetLabelVisibility (int)
 
virtual int GetLabelVisibility ()
 
virtual void LabelVisibilityOn ()
 
virtual void LabelVisibilityOff ()
 
virtual void SetLabelTextProperty (vtkTextProperty *p)
 
virtual vtkTextPropertyGetLabelTextProperty ()
 
void SetBarColor (int i, double r, double g, double b)
 
void SetBarColor (int i, const double color[3])
 
doubleGetBarColor (int i)
 
void SetBarLabel (const int i, const char *)
 
const char * GetBarLabel (int i)
 
virtual void SetYTitle (const char *)
 
virtual char * GetYTitle ()
 
virtual void SetLegendVisibility (int)
 
virtual int GetLegendVisibility ()
 
virtual void LegendVisibilityOn ()
 
virtual void LegendVisibilityOff ()
 
virtual vtkLegendBoxActorGetLegendActor ()
 
int RenderOverlay (vtkViewport *)
 
int RenderOpaqueGeometry (vtkViewport *)
 
virtual int RenderTranslucentPolygonalGeometry (vtkViewport *)
 
virtual int HasTranslucentPolygonalGeometry ()
 
void ReleaseGraphicsResources (vtkWindow *)
 
- Public Member Functions inherited from vtkActor2D
void PrintSelf (ostream &os, vtkIndent indent)
 
vtkActor2DNewInstance () const
 
virtual void SetMapper (vtkMapper2D *mapper)
 
virtual vtkMapper2DGetMapper ()
 
virtual void SetLayerNumber (int)
 
virtual int GetLayerNumber ()
 
vtkProperty2DGetProperty ()
 
virtual void SetProperty (vtkProperty2D *)
 
virtual vtkCoordinateGetPositionCoordinate ()
 
virtual void SetPosition (float x[2])
 
virtual void SetPosition (float x, float y)
 
virtual floatGetPosition ()
 
void SetDisplayPosition (int, int)
 
virtual vtkCoordinateGetPosition2Coordinate ()
 
virtual void SetPosition2 (float x[2])
 
virtual void SetPosition2 (float x, float y)
 
virtual floatGetPosition2 ()
 
void SetWidth (double w)
 
double GetWidth ()
 
void SetHeight (double h)
 
double GetHeight ()
 
virtual unsigned long GetMTime ()
 
virtual void GetActors2D (vtkPropCollection *pc)
 
virtual void ShallowCopy (vtkProp *prop)
 
virtual vtkCoordinateGetActualPositionCoordinate (void)
 
virtual vtkCoordinateGetActualPosition2Coordinate (void)
 
- Public Member Functions inherited from vtkProp
vtkPropNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void GetActors (vtkPropCollection *)
 
virtual void GetVolumes (vtkPropCollection *)
 
virtual void SetVisibility (int)
 
virtual int GetVisibility ()
 
virtual void VisibilityOn ()
 
virtual void VisibilityOff ()
 
virtual void SetPickable (int)
 
virtual int GetPickable ()
 
virtual void PickableOn ()
 
virtual void PickableOff ()
 
virtual void Pick ()
 
virtual void SetDragable (int)
 
virtual int GetDragable ()
 
virtual void DragableOn ()
 
virtual void DragableOff ()
 
virtual unsigned long GetRedrawMTime ()
 
virtual void SetUseBounds (bool)
 
virtual bool GetUseBounds ()
 
virtual void UseBoundsOn ()
 
virtual void UseBoundsOff ()
 
virtual doubleGetBounds ()
 
virtual void InitPathTraversal ()
 
virtual vtkAssemblyPathGetNextPath ()
 
virtual int GetNumberOfPaths ()
 
virtual void PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix))
 
virtual vtkMatrix4x4GetMatrix ()
 
virtual vtkInformationGetPropertyKeys ()
 
virtual void SetPropertyKeys (vtkInformation *keys)
 
virtual bool HasKeys (vtkInformation *requiredKeys)
 
virtual int RenderVolumetricGeometry (vtkViewport *)
 
virtual bool RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual bool RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual bool RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual bool RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual double GetEstimatedRenderTime (vtkViewport *)
 
virtual double GetEstimatedRenderTime ()
 
virtual void SetEstimatedRenderTime (double t)
 
virtual void RestoreEstimatedRenderTime ()
 
virtual void AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp))
 
virtual void SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v))
 
virtual double GetAllocatedRenderTime ()
 
void SetRenderTimeMultiplier (double t)
 
virtual double GetRenderTimeMultiplier ()
 
virtual void BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path)
 
virtual bool GetSupportsSelection ()
 
virtual int GetNumberOfConsumers ()
 
void AddConsumer (vtkObject *c)
 
void RemoveConsumer (vtkObject *c)
 
vtkObjectGetConsumer (int i)
 
int IsConsumer (vtkObject *c)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkBarChartActorSafeDownCast (vtkObjectBase *o)
 
static vtkBarChartActorNew ()
 
- Static Public Member Functions inherited from vtkActor2D
static int IsTypeOf (const char *type)
 
static vtkActor2DSafeDownCast (vtkObjectBase *o)
 
static vtkActor2DNew ()
 
- Static Public Member Functions inherited from vtkProp
static int IsTypeOf (const char *type)
 
static vtkPropSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKeyGeneralTextureUnit ()
 
static vtkInformationDoubleVectorKeyGeneralTextureTransform ()
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkBarChartActor ()
 
 ~vtkBarChartActor ()
 
- Protected Member Functions inherited from vtkActor2D
 vtkActor2D ()
 
 ~vtkActor2D ()
 
- Protected Member Functions inherited from vtkProp
 vtkProp ()
 
 ~vtkProp ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Protected Attributes inherited from vtkActor2D
vtkMapper2DMapper
 
int LayerNumber
 
vtkProperty2DProperty
 
vtkCoordinatePositionCoordinate
 
vtkCoordinatePosition2Coordinate
 
- Protected Attributes inherited from vtkProp
int Visibility
 
int Pickable
 
int Dragable
 
bool UseBounds
 
double AllocatedRenderTime
 
double EstimatedRenderTime
 
double SavedEstimatedRenderTime
 
double RenderTimeMultiplier
 
int NumberOfConsumers
 
vtkObject ** Consumers
 
vtkAssemblyPathsPaths
 
vtkInformationPropertyKeys
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

create a bar chart from an array

vtkBarChartActor generates a bar chart from an array of numbers defined in field data (a vtkDataObject). To use this class, you must specify an input data object. You'll probably also want to specify the position of the plot be setting the Position and Position2 instance variables, which define a rectangle in which the plot lies. There are also many other instance variables that control the look of the plot includes its title and legend.

Set the text property/attributes of the title and the labels through the vtkTextProperty objects associated with these components.

See also
vtkParallelCoordinatesActor vtkXYPlotActor vtkSpiderPlotActor vtkPieChartActor
Tests:
vtkBarChartActor (Tests)

Definition at line 52 of file vtkBarChartActor.h.

Member Typedef Documentation

◆ Superclass

Standard methods for type information and printing.

Definition at line 57 of file vtkBarChartActor.h.

Constructor & Destructor Documentation

◆ vtkBarChartActor()

vtkBarChartActor::vtkBarChartActor ( )
protected

◆ ~vtkBarChartActor()

vtkBarChartActor::~vtkBarChartActor ( )
protected

Member Function Documentation

◆ IsTypeOf()

static int vtkBarChartActor::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkBarChartActor::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

◆ SafeDownCast()

static vtkBarChartActor* vtkBarChartActor::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkBarChartActor::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkActor2D.

◆ NewInstance()

vtkBarChartActor* vtkBarChartActor::NewInstance ( ) const

◆ PrintSelf()

void vtkBarChartActor::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

◆ New()

static vtkBarChartActor* vtkBarChartActor::New ( )
static

Instantiate this class.

◆ SetInput()

virtual void vtkBarChartActor::SetInput ( vtkDataObject )
virtual

Set the input to the bar chart actor.

◆ GetInput()

virtual vtkDataObject* vtkBarChartActor::GetInput ( )
virtual

Get the input data object to this actor.

◆ SetTitleVisibility()

virtual void vtkBarChartActor::SetTitleVisibility ( int  )
virtual

Enable/Disable the display of a plot title.

◆ GetTitleVisibility()

virtual int vtkBarChartActor::GetTitleVisibility ( )
virtual

◆ TitleVisibilityOn()

virtual void vtkBarChartActor::TitleVisibilityOn ( )
virtual

◆ TitleVisibilityOff()

virtual void vtkBarChartActor::TitleVisibilityOff ( )
virtual

◆ SetTitle()

virtual void vtkBarChartActor::SetTitle ( const char *  )
virtual

Set/Get the title of the bar chart.

◆ GetTitle()

virtual char* vtkBarChartActor::GetTitle ( )
virtual

◆ SetTitleTextProperty()

virtual void vtkBarChartActor::SetTitleTextProperty ( vtkTextProperty p)
virtual

Set/Get the title text property. The property controls the appearance of the plot title.

◆ GetTitleTextProperty()

virtual vtkTextProperty* vtkBarChartActor::GetTitleTextProperty ( )
virtual

◆ SetLabelVisibility()

virtual void vtkBarChartActor::SetLabelVisibility ( int  )
virtual

Enable/Disable the display of bar labels.

◆ GetLabelVisibility()

virtual int vtkBarChartActor::GetLabelVisibility ( )
virtual

◆ LabelVisibilityOn()

virtual void vtkBarChartActor::LabelVisibilityOn ( )
virtual

◆ LabelVisibilityOff()

virtual void vtkBarChartActor::LabelVisibilityOff ( )
virtual

◆ SetLabelTextProperty()

virtual void vtkBarChartActor::SetLabelTextProperty ( vtkTextProperty p)
virtual

Set/Get the labels text property. This controls the appearance of all bar bar labels.

◆ GetLabelTextProperty()

virtual vtkTextProperty* vtkBarChartActor::GetLabelTextProperty ( )
virtual

◆ SetBarColor() [1/2]

void vtkBarChartActor::SetBarColor ( int  i,
double  r,
double  g,
double  b 
)

Specify colors for each bar. If not specified, they are automatically generated.

◆ SetBarColor() [2/2]

void vtkBarChartActor::SetBarColor ( int  i,
const double  color[3] 
)
inline

Definition at line 110 of file vtkBarChartActor.h.

◆ GetBarColor()

double* vtkBarChartActor::GetBarColor ( int  i)

◆ SetBarLabel()

void vtkBarChartActor::SetBarLabel ( const int  i,
const char *   
)

Specify the names of each bar. If not specified, then an integer number is automatically generated.

◆ GetBarLabel()

const char* vtkBarChartActor::GetBarLabel ( int  i)

◆ SetYTitle()

virtual void vtkBarChartActor::SetYTitle ( const char *  )
virtual

Specify the title of the y-axis.

◆ GetYTitle()

virtual char* vtkBarChartActor::GetYTitle ( )
virtual

◆ SetLegendVisibility()

virtual void vtkBarChartActor::SetLegendVisibility ( int  )
virtual

Enable/Disable the creation of a legend. If on, the legend labels will be created automatically unless the per plot legend symbol has been set.

◆ GetLegendVisibility()

virtual int vtkBarChartActor::GetLegendVisibility ( )
virtual

◆ LegendVisibilityOn()

virtual void vtkBarChartActor::LegendVisibilityOn ( )
virtual

◆ LegendVisibilityOff()

virtual void vtkBarChartActor::LegendVisibilityOff ( )
virtual

◆ GetLegendActor()

virtual vtkLegendBoxActor* vtkBarChartActor::GetLegendActor ( )
virtual

Retrieve handles to the legend box. This is useful if you would like to manually control the legend appearance.

◆ RenderOverlay()

int vtkBarChartActor::RenderOverlay ( vtkViewport )
virtual

Draw the bar plot.

Reimplemented from vtkActor2D.

◆ RenderOpaqueGeometry()

int vtkBarChartActor::RenderOpaqueGeometry ( vtkViewport )
virtual

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS All concrete subclasses must be able to render themselves. There are four key render methods in vtk and they correspond to four different points in the rendering cycle. Any given prop may implement one or more of these methods. The first method is intended for rendering all opaque geometry. The second method is intended for rendering all translucent polygonal geometry. The third one is intended for rendering all translucent volumetric geometry. Most of the volume rendering mappers draw their results during this third method. The last method is to render any 2D annotation or overlays. Each of these methods return an integer value indicating whether or not this render method was applied to this data.

Reimplemented from vtkActor2D.

◆ RenderTranslucentPolygonalGeometry()

virtual int vtkBarChartActor::RenderTranslucentPolygonalGeometry ( vtkViewport )
inlinevirtual

Reimplemented from vtkActor2D.

Definition at line 147 of file vtkBarChartActor.h.

◆ HasTranslucentPolygonalGeometry()

virtual int vtkBarChartActor::HasTranslucentPolygonalGeometry ( )
virtual

Does this prop have some translucent polygonal geometry?

Reimplemented from vtkActor2D.

◆ ReleaseGraphicsResources()

void vtkBarChartActor::ReleaseGraphicsResources ( vtkWindow )
virtual

Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkActor2D.


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