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 
40 {
41 public:
42  static vtkXYChartRepresentation* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
50  void SetVisibility(bool visible) override;
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 
101  void SetSortDataByXAxis(bool val);
102  vtkGetMacro(SortDataByXAxis, bool);
104 
106 
109  void SetSeriesVisibility(const char* seriesname, bool visible);
110  void SetLineThickness(const char* name, double value);
111  void SetLineStyle(const char* name, int value);
112  void SetColor(const char* name, double r, double g, double b);
113  void SetAxisCorner(const char* name, int corner);
114  void SetMarkerStyle(const char* name, int style);
115  void SetMarkerSize(const char* name, double value);
116  void SetLabel(const char* name, const char* label);
117  void SetUseColorMapping(const char* name, bool useColorMapping);
118  void SetLookupTable(const char* name, vtkScalarsToColors* lut);
119  const char* GetLabel(const char* name) const;
121 
122  void ClearSeriesVisibilities();
123  void ClearLineThicknesses();
124  void ClearLineStyles();
125  void ClearColors();
126  void ClearAxisCorners();
127  void ClearMarkerSizes();
128  void ClearMarkerStyles();
129  void ClearLabels();
130 
131  vtkSetVector3Macro(SelectionColor, double);
132  vtkGetVector3Macro(SelectionColor, double);
133 
135 
138  vtkSetStringMacro(SeriesLabelPrefix);
139  vtkGetStringMacro(SeriesLabelPrefix);
141 
147  bool Export(vtkCSVExporter* exporter) override;
148 
149 protected:
151  ~vtkXYChartRepresentation() override;
152 
156  bool RemoveFromView(vtkView* view) override;
157 
159  vtkInformation* outInfo) override;
160 
162 
164 
165  void PrepareForRendering() override;
166 
168  friend class vtkInternals;
170 
171  class SortTableFilter;
172 
173 private:
175  void operator=(const vtkXYChartRepresentation&) = delete;
176 
177  int ChartType;
178  char* XAxisSeriesName;
179  bool UseIndexForXAxis;
180  bool SortDataByXAxis;
181  bool PlotDataHasChanged;
182  double SelectionColor[3];
183  char* SeriesLabelPrefix;
184 };
185 
186 #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...
#define VTKREMOTINGVIEWS_EXPORT
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...
void SetVisibility(bool visible) override
Set visibility of the representation.
virtual vtkSmartPointer< vtkDataObject > TransformTable(vtkSmartPointer< vtkDataObject > table)
Method to be overridden to apply an operation of the table after it is gathered to the first rank for...
vtkChartRepresentation is the base representation for charting representations.
exporter used by certain views to export data as CSV.
int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo) override
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
void PrintSelf(ostream &os, vtkIndent indent) override
bool RemoveFromView(vtkView *view) override
Removes the representation to the view.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses should override this to connect inputs to the internal pipeline as necessary.