vtkXYChartRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkXYChartRepresentation_h
20 #define vtkXYChartRepresentation_h
21 
22 #include "vtkChartRepresentation.h"
23 #include "vtkParaViewDeprecation.h" // for deprecation
24 
25 class vtkChartXY;
26 class vtkScalarsToColors;
27 
29 {
30 public:
31  static vtkXYChartRepresentation* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
39  void SetVisibility(bool visible) override;
40 
42 
48  vtkSetMacro(ChartType, int);
49  vtkGetMacro(ChartType, int);
51 
52  void SetChartTypeToLine();
53  void SetChartTypeToPoints();
54  void SetChartTypeToBar();
55  void SetChartTypeToStacked();
56  void SetChartTypeToBag();
57  void SetChartTypeToFunctionalBag();
58  void SetChartTypeToArea();
59 
65  vtkChartXY* GetChart();
66 
68 
71  vtkSetStringMacro(XAxisSeriesName);
72  vtkGetStringMacro(XAxisSeriesName);
74 
76 
80  vtkSetMacro(UseIndexForXAxis, bool);
81  vtkGetMacro(UseIndexForXAxis, bool);
83 
85 
90  void SetSortDataByXAxis(bool val);
91  vtkGetMacro(SortDataByXAxis, bool);
93 
95 
101  vtkSetMacro(SwapXYAxes, bool);
102  vtkGetMacro(SwapXYAxes, 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 SetOpacity(const char* seriesname, double opacity);
114  void SetAxisCorner(const char* name, int corner);
115  void SetMarkerStyle(const char* name, int style);
116  void SetMarkerSize(const char* name, double value);
117  void SetLabel(const char* name, const char* label);
118  void SetUseColorMapping(const char* name, bool useColorMapping);
119  void SetLookupTable(const char* name, vtkScalarsToColors* lut);
120  const char* GetLabel(const char* name) const;
122 
123  void ClearSeriesVisibilities();
124  void ClearLineThicknesses();
125  void ClearLineStyles();
126  void ClearColors();
127  void ClearOpacities();
128  void ClearAxisCorners();
129  void ClearMarkerSizes();
130  void ClearMarkerStyles();
131  void ClearLabels();
132 
133  vtkSetVector3Macro(SelectionColor, double);
134  vtkGetVector3Macro(SelectionColor, double);
135 
137 
140  vtkSetStringMacro(SeriesLabelPrefix);
141  vtkGetStringMacro(SeriesLabelPrefix);
143 
145 
150  bool Export(vtkAbstractChartExporter* exporter) override;
152 
153 protected:
155  ~vtkXYChartRepresentation() override;
156 
160  bool RemoveFromView(vtkView* view) override;
161 
163  vtkInformation* outInfo) override;
164 
166 
168 
169  void PrepareForRendering() override;
170 
172  friend class vtkInternals;
174 
175  class SortTableFilter;
176 
177 private:
179  void operator=(const vtkXYChartRepresentation&) = delete;
180 
181  int ChartType;
182  char* XAxisSeriesName;
183  bool UseIndexForXAxis;
184  bool SortDataByXAxis;
185  bool SwapXYAxes;
186  bool PlotDataHasChanged;
187  double SelectionColor[3];
188  char* SeriesLabelPrefix;
189 };
190 
191 #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...
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...
virtual bool Export(vtkAbstractChartExporter *vtkNotUsed(exporter))
Called by vtkPVContextView::Export() to export the representation&#39;s data to a CSV file...
vtkChartRepresentation is the base representation for charting representations.
int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo) override
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
void PrintSelf(ostream &os, vtkIndent indent) override
exporter used by certain views to export data into a file or stream.
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.