ParaView
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkXYChartRepresentation Class Reference

vtkXYChartRepresentation is representation that is used to add vtkPlot subclasses to a vtkChartXY instance e.g. More...

#include <vtkXYChartRepresentation.h>

Inheritance diagram for vtkXYChartRepresentation:
Inheritance graph
[legend]
Collaboration diagram for vtkXYChartRepresentation:
Collaboration graph
[legend]

Classes

class  vtkInternals
 

Public Types

typedef vtkChartRepresentation Superclass
 
- Public Types inherited from vtkChartRepresentation
typedef vtkPVDataRepresentation Superclass
 
- Public Types inherited from vtkPVDataRepresentation
typedef vtkDataRepresentation Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void SetVisibility (bool visible)
 Set visibility of the representation. More...
 
void SetChartTypeToLine ()
 
void SetChartTypeToPoints ()
 
void SetChartTypeToBar ()
 
void SetChartTypeToStacked ()
 
void SetChartTypeToBag ()
 
void SetChartTypeToFunctionalBag ()
 
void SetChartTypeToArea ()
 
vtkChartXY * GetChart ()
 Returns the vtkChartXY instance from the view to which this representation is added. More...
 
void ClearSeriesVisibilities ()
 
void ClearLineThicknesses ()
 
void ClearLineStyles ()
 
void ClearColors ()
 
void ClearAxisCorners ()
 
void ClearMarkerStyles ()
 
void ClearLabels ()
 
virtual void SetSelectionColor (double, double, double)
 
virtual void SetSelectionColor (double [3])
 
virtual double * GetSelectionColor ()
 
virtual void GetSelectionColor (double &, double &, double &)
 
virtual void GetSelectionColor (double [3])
 
virtual bool Export (vtkCSVExporter *exporter)
 Called by vtkPVContextView::Export() to export the representation's data to a CSV file. More...
 
virtual void SetChartType (int)
 Get/Set the chart type, defaults to line chart. More...
 
virtual int GetChartType ()
 Get/Set the chart type, defaults to line chart. More...
 
virtual void SetXAxisSeriesName (const char *)
 Set the series to use as the X-axis. More...
 
virtual char * GetXAxisSeriesName ()
 Set the series to use as the X-axis. More...
 
virtual void SetUseIndexForXAxis (bool)
 Set whether the index should be used for the x axis. More...
 
virtual bool GetUseIndexForXAxis ()
 Set whether the index should be used for the x axis. More...
 
void SetSeriesVisibility (const char *seriesname, bool visible)
 Set/Clear the properties for Y series/columns. More...
 
void SetLineThickness (const char *name, int value)
 Set/Clear the properties for Y series/columns. More...
 
void SetLineStyle (const char *name, int value)
 Set/Clear the properties for Y series/columns. More...
 
void SetColor (const char *name, double r, double g, double b)
 Set/Clear the properties for Y series/columns. More...
 
void SetAxisCorner (const char *name, int corner)
 Set/Clear the properties for Y series/columns. More...
 
void SetMarkerStyle (const char *name, int style)
 Set/Clear the properties for Y series/columns. More...
 
void SetLabel (const char *name, const char *label)
 Set/Clear the properties for Y series/columns. More...
 
void SetUseColorMapping (const char *name, bool useColorMapping)
 Set/Clear the properties for Y series/columns. More...
 
void SetLookupTable (const char *name, vtkScalarsToColors *lut)
 Set/Clear the properties for Y series/columns. More...
 
const char * GetLabel (const char *name) const
 Set/Clear the properties for Y series/columns. More...
 
virtual void SetSeriesLabelPrefix (const char *)
 Get/Set the series label prefix. More...
 
virtual char * GetSeriesLabelPrefix ()
 Get/Set the series label prefix. More...
 
- Public Member Functions inherited from vtkChartRepresentation
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetSelectionRepresentation (vtkChartSelectionRepresentation *)
 These must only be set during initialization before adding the representation to any views or calling Update(). More...
 
virtual void MarkModified ()
 This needs to be called on all instances of vtkGeometryRepresentation when the input is modified. More...
 
void SetCompositeDataSetIndex (unsigned int)
 
void AddCompositeDataSetIndex (unsigned int)
 
void ResetCompositeDataSetIndices ()
 
virtual unsigned int Initialize (unsigned int minIdAvailable, unsigned int maxIdAvailable)
 Override because of internal selection representations that need to be initialized as well. More...
 
virtual int ProcessViewRequest (vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
 vtkAlgorithm::ProcessRequest() equivalent for rendering passes. More...
 
virtual vtkStdString GetDefaultSeriesLabel (const vtkStdString &tableName, const vtkStdString &columnName)
 Method to provide the default name given the name of a table and a column in that table. More...
 
virtual bool MapSelectionToInput (vtkSelection *sel)
 This method is called on the client-side by the vtkPVContextView whenever a new selection is made on all the visible representations in that view. More...
 
virtual bool MapSelectionToView (vtkSelection *sel)
 This is the inverse of MapSelectionToInput(). More...
 
virtual bool Export (vtkCSVExporter *vtkNotUsed(exporter))
 Called by vtkPVContextView::Export() to export the representation's data to a CSV file. More...
 
void SetFieldAssociation (int)
 Set the field association for arrays to use. More...
 
virtual int GetFieldAssociation ()
 Set the field association for arrays to use. More...
 
virtual void SetFlattenTable (int)
 Flatten the table, i.e. More...
 
virtual int GetFlattenTable ()
 Flatten the table, i.e. More...
 
- Public Member Functions inherited from vtkPVDataRepresentation
void PrintSelf (ostream &os, vtkIndent indent)
 
unsigned int GetUniqueIdentifier ()
 Return 0 if the Initialize() method was not called otherwise a unique ID that will be shared across the processes for that same object. More...
 
virtual bool GetVisibility ()
 
virtual vtkDataObject * GetRenderedDataObject (int vtkNotUsed(port))
 Returns the data object that is rendered from the given input port. More...
 
virtual void SetForcedCacheKey (double val)
 Typically a representation decides whether to use cache based on the view's values for UseCache and CacheKey. More...
 
virtual void SetForceUseCache (bool val)
 
bool GetUsingCacheForUpdate ()
 Called by vtkPVDataRepresentationPipeline to see if using cache is valid and will be used for the update. More...
 
virtual bool GetNeedUpdate ()
 
virtual vtkAlgorithmOutput * GetInternalOutputPort ()
 Retrieves an output port for the input data object at the specified port and connection index. More...
 
virtual vtkAlgorithmOutput * GetInternalOutputPort (int port)
 
virtual vtkAlgorithmOutput * GetInternalOutputPort (int port, int conn)
 
vtkView * GetView () const
 Provides access to the view. More...
 
virtual void SetUpdateTime (double time)
 Set the update time. More...
 
virtual double GetUpdateTime ()
 Set the update time. More...
 
virtual bool GetUpdateTimeValid ()
 Set whether the UpdateTime is valid. More...
 
virtual void SetUseCache (bool)
 
virtual void SetCacheKey (double val)
 
virtual double GetCacheKey ()
 Returns whether caching is used and what key to use when caching is enabled. More...
 
virtual bool GetUseCache ()
 Returns whether caching is used and what key to use when caching is enabled. More...
 

Static Public Member Functions

static vtkXYChartRepresentationNew ()
 
static int IsTypeOf (const char *type)
 
static vtkXYChartRepresentationSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkChartRepresentation
static vtkChartRepresentationNew ()
 
static int IsTypeOf (const char *type)
 
static vtkChartRepresentationSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPVDataRepresentation
static int IsTypeOf (const char *type)
 
static vtkPVDataRepresentationSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkXYChartRepresentation ()
 
 ~vtkXYChartRepresentation ()
 
virtual bool RemoveFromView (vtkView *view)
 Overridden to remove all plots from the view. More...
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 Subclasses should override this to connect inputs to the internal pipeline as necessary. More...
 
virtual void PrepareForRendering ()
 This method is called before actual render if this->MTime was modified since the last time this method was called. More...
 
- Protected Member Functions inherited from vtkChartRepresentation
 vtkChartRepresentation ()
 
 ~vtkChartRepresentation ()
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 Fill input port information. More...
 
virtual bool AddToView (vtkView *view)
 Adds the representation to the view. More...
 
virtual bool IsCached (double cache_key)
 Overridden to check with the vtkPVCacheKeeper to see if the key is cached. More...
 
vtkTable * GetLocalOutput ()
 Convenience method to get the first vtkTable from LocalOutput, if any. More...
 
virtual vtkDataObject * TransformInputData (vtkInformationVector **inputVector, vtkDataObject *data)
 Method to be overrided to transform input data to a vtkTable. More...
 
bool GetLocalOutput (MapOfTables &tables)
 Convenience method to get all vtkTable instances with their associated names. More...
 
- Protected Member Functions inherited from vtkPVDataRepresentation
 vtkPVDataRepresentation ()
 
 ~vtkPVDataRepresentation ()
 
virtual vtkExecutive * CreateDefaultExecutive ()
 Create a default executive. More...
 
virtual int RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
virtual int RequestUpdateTime (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 

Protected Attributes

vtkInternalsInternals
 
- Protected Attributes inherited from vtkChartRepresentation
int FieldAssociation
 
vtkPVCacheKeeperCacheKeeper
 
vtkWeakPointer< vtkPVContextViewContextView
 
bool EnableServerSideRendering
 
int FlattenTable
 
vtkSmartPointer< vtkMultiBlockDataSet > LocalOutput
 
std::set< unsigned int > CompositeIndices
 
vtkWeakPointer< vtkChartSelectionRepresentationSelectionRepresentation
 
- Protected Attributes inherited from vtkPVDataRepresentation
double UpdateTime
 
bool UpdateTimeValid
 
unsigned int UniqueIdentifier
 

Friends

class vtkInternals
 

Additional Inherited Members

- Protected Types inherited from vtkChartRepresentation
typedef std::map< std::string, vtkSmartPointer< vtkTable > > MapOfTables
 

Detailed Description

vtkXYChartRepresentation is representation that is used to add vtkPlot subclasses to a vtkChartXY instance e.g.

adding vtkPlotBar to create a bar chart or vtkPlotLine to create a line chart. For every selected series (or column in a vtkTable), this class adds a new vtkPlot to the vtkChartXY. vtkXYChartRepresentation provides a union of APIs for changing the appearance of vtkPlot instances. Developers should only expose the applicable API in the ServerManager XML.

To select which type of vtkPlot instances this class will use, you must set the ChartType. Refer to vtkChartXY::AddPlot() for details on what the type must be.

Definition at line 39 of file vtkXYChartRepresentation.h.

Member Typedef Documentation

◆ Superclass

Definition at line 43 of file vtkXYChartRepresentation.h.

Constructor & Destructor Documentation

◆ vtkXYChartRepresentation()

vtkXYChartRepresentation::vtkXYChartRepresentation ( )
protected

◆ ~vtkXYChartRepresentation()

vtkXYChartRepresentation::~vtkXYChartRepresentation ( )
protected

Member Function Documentation

◆ New()

static vtkXYChartRepresentation* vtkXYChartRepresentation::New ( )
static

◆ GetClassName()

virtual const char* vtkXYChartRepresentation::GetClassName ( )
virtual

◆ IsTypeOf()

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

◆ IsA()

virtual int vtkXYChartRepresentation::IsA ( const char *  type)
virtual

◆ SafeDownCast()

static vtkXYChartRepresentation* vtkXYChartRepresentation::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

void vtkXYChartRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ SetVisibility()

virtual void vtkXYChartRepresentation::SetVisibility ( bool  visible)
virtual

Set visibility of the representation.

Overridden to ensure that internally added vtkPlot instances are updated when hiding the representation.

Reimplemented from vtkChartRepresentation.

◆ SetChartType()

virtual void vtkXYChartRepresentation::SetChartType ( int  )
virtual

Get/Set the chart type, defaults to line chart.

This must be set before this representation is updated. Valid values are vtkChart::LINE, vtkChart::POINTS, vtkChart::BAR, etc. Default is vtkChart::LINE.

◆ GetChartType()

virtual int vtkXYChartRepresentation::GetChartType ( )
virtual

Get/Set the chart type, defaults to line chart.

This must be set before this representation is updated. Valid values are vtkChart::LINE, vtkChart::POINTS, vtkChart::BAR, etc. Default is vtkChart::LINE.

◆ SetChartTypeToLine()

void vtkXYChartRepresentation::SetChartTypeToLine ( )

◆ SetChartTypeToPoints()

void vtkXYChartRepresentation::SetChartTypeToPoints ( )

◆ SetChartTypeToBar()

void vtkXYChartRepresentation::SetChartTypeToBar ( )

◆ SetChartTypeToStacked()

void vtkXYChartRepresentation::SetChartTypeToStacked ( )

◆ SetChartTypeToBag()

void vtkXYChartRepresentation::SetChartTypeToBag ( )

◆ SetChartTypeToFunctionalBag()

void vtkXYChartRepresentation::SetChartTypeToFunctionalBag ( )

◆ SetChartTypeToArea()

void vtkXYChartRepresentation::SetChartTypeToArea ( )

◆ GetChart()

vtkChartXY* vtkXYChartRepresentation::GetChart ( )

Returns the vtkChartXY instance from the view to which this representation is added.

Thus this will return a non-null value only when this representation is added to a view.

◆ SetXAxisSeriesName()

virtual void vtkXYChartRepresentation::SetXAxisSeriesName ( const char *  )
virtual

Set the series to use as the X-axis.

◆ GetXAxisSeriesName()

virtual char* vtkXYChartRepresentation::GetXAxisSeriesName ( )
virtual

Set the series to use as the X-axis.

◆ SetUseIndexForXAxis()

virtual void vtkXYChartRepresentation::SetUseIndexForXAxis ( bool  )
virtual

Set whether the index should be used for the x axis.

When true, XSeriesName is ignored.

◆ GetUseIndexForXAxis()

virtual bool vtkXYChartRepresentation::GetUseIndexForXAxis ( )
virtual

Set whether the index should be used for the x axis.

When true, XSeriesName is ignored.

◆ SetSeriesVisibility()

void vtkXYChartRepresentation::SetSeriesVisibility ( const char *  seriesname,
bool  visible 
)

Set/Clear the properties for Y series/columns.

◆ SetLineThickness()

void vtkXYChartRepresentation::SetLineThickness ( const char *  name,
int  value 
)

Set/Clear the properties for Y series/columns.

◆ SetLineStyle()

void vtkXYChartRepresentation::SetLineStyle ( const char *  name,
int  value 
)

Set/Clear the properties for Y series/columns.

◆ SetColor()

void vtkXYChartRepresentation::SetColor ( const char *  name,
double  r,
double  g,
double  b 
)

Set/Clear the properties for Y series/columns.

◆ SetAxisCorner()

void vtkXYChartRepresentation::SetAxisCorner ( const char *  name,
int  corner 
)

Set/Clear the properties for Y series/columns.

◆ SetMarkerStyle()

void vtkXYChartRepresentation::SetMarkerStyle ( const char *  name,
int  style 
)

Set/Clear the properties for Y series/columns.

◆ SetLabel()

void vtkXYChartRepresentation::SetLabel ( const char *  name,
const char *  label 
)

Set/Clear the properties for Y series/columns.

◆ SetUseColorMapping()

void vtkXYChartRepresentation::SetUseColorMapping ( const char *  name,
bool  useColorMapping 
)

Set/Clear the properties for Y series/columns.

◆ SetLookupTable()

void vtkXYChartRepresentation::SetLookupTable ( const char *  name,
vtkScalarsToColors *  lut 
)

Set/Clear the properties for Y series/columns.

◆ GetLabel()

const char* vtkXYChartRepresentation::GetLabel ( const char *  name) const

Set/Clear the properties for Y series/columns.

◆ ClearSeriesVisibilities()

void vtkXYChartRepresentation::ClearSeriesVisibilities ( )

◆ ClearLineThicknesses()

void vtkXYChartRepresentation::ClearLineThicknesses ( )

◆ ClearLineStyles()

void vtkXYChartRepresentation::ClearLineStyles ( )

◆ ClearColors()

void vtkXYChartRepresentation::ClearColors ( )

◆ ClearAxisCorners()

void vtkXYChartRepresentation::ClearAxisCorners ( )

◆ ClearMarkerStyles()

void vtkXYChartRepresentation::ClearMarkerStyles ( )

◆ ClearLabels()

void vtkXYChartRepresentation::ClearLabels ( )

◆ SetSelectionColor() [1/2]

virtual void vtkXYChartRepresentation::SetSelectionColor ( double  ,
double  ,
double   
)
virtual

◆ SetSelectionColor() [2/2]

virtual void vtkXYChartRepresentation::SetSelectionColor ( double  [3])
virtual

◆ GetSelectionColor() [1/3]

virtual double* vtkXYChartRepresentation::GetSelectionColor ( )
virtual

◆ GetSelectionColor() [2/3]

virtual void vtkXYChartRepresentation::GetSelectionColor ( double &  ,
double &  ,
double &   
)
virtual

◆ GetSelectionColor() [3/3]

virtual void vtkXYChartRepresentation::GetSelectionColor ( double  [3])
virtual

◆ SetSeriesLabelPrefix()

virtual void vtkXYChartRepresentation::SetSeriesLabelPrefix ( const char *  )
virtual

Get/Set the series label prefix.

◆ GetSeriesLabelPrefix()

virtual char* vtkXYChartRepresentation::GetSeriesLabelPrefix ( )
virtual

Get/Set the series label prefix.

◆ Export()

virtual bool vtkXYChartRepresentation::Export ( vtkCSVExporter exporter)
virtual

Called by vtkPVContextView::Export() to export the representation's data to a CSV file.

Return false on failure which will call the exporting process to abort and raise an error. Default implementation simply returns false.

◆ RemoveFromView()

virtual bool vtkXYChartRepresentation::RemoveFromView ( vtkView *  view)
protectedvirtual

Overridden to remove all plots from the view.

Reimplemented from vtkChartRepresentation.

◆ RequestData()

virtual int vtkXYChartRepresentation::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual

Subclasses should override this to connect inputs to the internal pipeline as necessary.

Since most representations are "meta-filters" (i.e. filters containing other filters), you should create shallow copies of your input before connecting to the internal pipeline. The convenience method GetInternalOutputPort will create a cached shallow copy of a specified input for you. The related helper functions GetInternalAnnotationOutputPort, GetInternalSelectionOutputPort should be used to obtain a selection or annotation port whose selections are localized for a particular input data object.

Reimplemented from vtkChartRepresentation.

◆ PrepareForRendering()

virtual void vtkXYChartRepresentation::PrepareForRendering ( )
protectedvirtual

This method is called before actual render if this->MTime was modified since the last time this method was called.

Subclasses should override to update "appearance" related changes that don't affect data. When this method is called, you're assured that this->ContextView is valid. Note that this method will not be called if this->GetVisibility() returns false, this subclasses should also override SetVisibility() to hide "actors" and such.

Reimplemented from vtkChartRepresentation.

Reimplemented in vtkPVHistogramChartRepresentation.

Friends And Related Function Documentation

◆ vtkInternals

friend class vtkInternals
friend

Definition at line 150 of file vtkXYChartRepresentation.h.

Member Data Documentation

◆ Internals

vtkInternals* vtkXYChartRepresentation::Internals
protected

Definition at line 152 of file vtkXYChartRepresentation.h.


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