ParaView
vtkXYChartRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkXYChartRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkXYChartRepresentation_h
32 #define vtkXYChartRepresentation_h
33 
34 #include "vtkChartRepresentation.h"
35 
36 class vtkChartXY;
37 class vtkScalarsToColors;
38 
39 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkXYChartRepresentation : public vtkChartRepresentation
40 {
41 public:
42  static vtkXYChartRepresentation* New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
50  virtual void SetVisibility(bool visible);
51 
53 
59  vtkSetMacro(ChartType, int);
60  vtkGetMacro(ChartType, int);
62 
63  void SetChartTypeToLine();
64  void SetChartTypeToPoints();
65  void SetChartTypeToBar();
66  void SetChartTypeToStacked();
67  void SetChartTypeToBag();
68  void SetChartTypeToFunctionalBag();
69  void SetChartTypeToArea();
70 
76  vtkChartXY* GetChart();
77 
79 
82  vtkSetStringMacro(XAxisSeriesName);
83  vtkGetStringMacro(XAxisSeriesName);
85 
87 
91  vtkSetMacro(UseIndexForXAxis, bool);
92  vtkGetMacro(UseIndexForXAxis, bool);
94 
96 
99  void SetSeriesVisibility(const char* seriesname, bool visible);
100  void SetLineThickness(const char* name, int value);
101  void SetLineStyle(const char* name, int value);
102  void SetColor(const char* name, double r, double g, double b);
103  void SetAxisCorner(const char* name, int corner);
104  void SetMarkerStyle(const char* name, int style);
105  void SetLabel(const char* name, const char* label);
106  void SetUseColorMapping(const char* name, bool useColorMapping);
107  void SetLookupTable(const char* name, vtkScalarsToColors* lut);
108  const char* GetLabel(const char* name) const;
110 
111  void ClearSeriesVisibilities();
112  void ClearLineThicknesses();
113  void ClearLineStyles();
114  void ClearColors();
115  void ClearAxisCorners();
116  void ClearMarkerStyles();
117  void ClearLabels();
118 
119  vtkSetVector3Macro(SelectionColor, double);
120  vtkGetVector3Macro(SelectionColor, double);
121 
123 
126  vtkSetStringMacro(SeriesLabelPrefix);
127  vtkGetStringMacro(SeriesLabelPrefix);
129 
135  virtual bool Export(vtkCSVExporter* exporter);
136 
137 protected:
140 
144  virtual bool RemoveFromView(vtkView* view);
145 
146  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
147 
148  virtual void PrepareForRendering();
149 
151  friend class vtkInternals;
153 
154 private:
155  vtkXYChartRepresentation(const vtkXYChartRepresentation&) VTK_DELETE_FUNCTION;
156  void operator=(const vtkXYChartRepresentation&) VTK_DELETE_FUNCTION;
157 
158  int ChartType;
159  char* XAxisSeriesName;
160  bool UseIndexForXAxis;
161  bool PlotDataHasChanged;
162  double SelectionColor[3];
163  char* SeriesLabelPrefix;
164 };
165 
166 #endif
static vtkChartRepresentation * New()
virtual void PrepareForRendering()
This method is called before actual render if this->MTime was modified since the last time this metho...
vtkXYChartRepresentation is representation that is used to add vtkPlot subclasses to a vtkChartXY ins...
virtual bool Export(vtkCSVExporter *vtkNotUsed(exporter))
Called by vtkPVContextView::Export() to export the representation's data to a CSV file...
virtual void SetVisibility(bool visible)
Set visibility of the representation.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses should override this to connect inputs to the internal pipeline as necessary.
vtkChartRepresentation is the base representation for charting representations.
exporter used by certain views to export data as a CSV file.
void PrintSelf(ostream &os, vtkIndent indent)
virtual bool RemoveFromView(vtkView *view)
Removes the representation to the view.