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 
98  void SetSeriesVisibility(const char* seriesname, bool visible);
99  void SetLineThickness(const char* name, double value);
100  void SetLineStyle(const char* name, int value);
101  void SetColor(const char* name, double r, double g, double b);
102  void SetOpacity(const char* seriesname, double opacity);
103  void SetAxisCorner(const char* name, int corner);
104  void SetMarkerStyle(const char* name, int style);
105  void SetMarkerSize(const char* name, double value);
106  void SetLabel(const char* name, const char* label);
107  void SetUseColorMapping(const char* name, bool useColorMapping);
108  void SetLookupTable(const char* name, vtkScalarsToColors* lut);
109  const char* GetLabel(const char* name) const;
111 
112  void ClearSeriesVisibilities();
113  void ClearLineThicknesses();
114  void ClearLineStyles();
115  void ClearColors();
116  void ClearOpacities();
117  void ClearAxisCorners();
118  void ClearMarkerSizes();
119  void ClearMarkerStyles();
120  void ClearLabels();
121 
122  vtkSetVector3Macro(SelectionColor, double);
123  vtkGetVector3Macro(SelectionColor, double);
124 
126 
129  vtkSetStringMacro(SeriesLabelPrefix);
130  vtkGetStringMacro(SeriesLabelPrefix);
132 
134 
139  bool Export(vtkAbstractChartExporter* exporter) override;
141 
142 protected:
144  ~vtkXYChartRepresentation() override;
145 
149  bool RemoveFromView(vtkView* view) override;
150 
152  vtkInformation* outInfo) override;
153 
155 
157 
158  void PrepareForRendering() override;
159 
161  friend class vtkInternals;
163 
164  class SortTableFilter;
165 
166 private:
168  void operator=(const vtkXYChartRepresentation&) = delete;
169 
170  int ChartType;
171  char* XAxisSeriesName;
172  bool UseIndexForXAxis;
173  bool SortDataByXAxis;
174  bool PlotDataHasChanged;
175  double SelectionColor[3];
176  char* SeriesLabelPrefix;
177 };
178 
179 #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.