VTK  9.4.20250409
vtkChartParallelCoordinates.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
34#ifndef vtkChartParallelCoordinates_h
35#define vtkChartParallelCoordinates_h
36
37#include "vtkChart.h"
38#include "vtkChartsCoreModule.h" // For export macro
39#include "vtkNew.h" // For vtkNew
40#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
41
42VTK_ABI_NAMESPACE_BEGIN
43class vtkIdTypeArray;
44class vtkStdString;
45class vtkStringArray;
47
48class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkChartParallelCoordinates : public vtkChart
49{
50public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
58
64 void Update() override;
65
69 bool Paint(vtkContext2D* painter) override;
70
74 bool PaintRect(vtkContext2D* painter, int axis, float min, float max);
75
79 void SetColumnVisibility(const vtkStdString& name, bool visible);
80
85 void SetColumnVisibilityAll(bool visible);
86
91
96
100 virtual void SetVisibleColumns(vtkStringArray* visColumns);
101
105 vtkPlot* GetPlot(vtkIdType index) override;
106
111
115 void SetShowLegend(bool visible) override;
116
122
126 vtkAxis* GetAxis(int axisIndex) override;
127
132
137 void RecalculateBounds() override;
138
144
148 bool Hit(const vtkContextMouseEvent& mouse) override;
149
153 bool MouseEnterEvent(const vtkContextMouseEvent& mouse) override;
154
158 bool MouseMoveEvent(const vtkContextMouseEvent& mouse) override;
159
163 bool MouseLeaveEvent(const vtkContextMouseEvent& mouse) override;
164
168 bool MouseButtonPressEvent(const vtkContextMouseEvent& mouse) override;
169
174
178 bool MouseWheelEvent(const vtkContextMouseEvent& mouse, int delta) override;
179
185
186protected:
189
191
194 struct Private;
195 Private* Storage;
197
202
204
209
214
219
221 void ResetAxeSelection(int axe);
225 void SwapAxes(int a1, int a2);
226
227private:
229 void operator=(const vtkChartParallelCoordinates&) = delete;
230};
231
232VTK_ABI_NAMESPACE_END
233#endif // vtkChartParallelCoordinates_h
takes care of drawing 2D axes
Definition vtkAxis.h:171
draw the chart legend
Factory class for drawing 2D charts.
bool MouseMoveEvent(const vtkContextMouseEvent &mouse) override
Mouse move event.
vtkNew< vtkStringArray > VisibleColumns
Strongly owned internal data for the column visibility.
vtkAxis * GetAxis(int axisIndex) override
Get the axis specified by axisIndex.
virtual void SetVisibleColumns(vtkStringArray *visColumns)
Set the list of visible columns, and the order in which they will be displayed.
void UpdateCurrentAxisSelection(int axisId)
Update the selection of an axis based on the current selectionMode we have previously set.
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
vtkIdType GetNumberOfAxes() override
Get the number of axes in the current chart.
bool GetColumnVisibility(const vtkStdString &name)
Get the visibility of the specified column.
bool Hit(const vtkContextMouseEvent &mouse) override
Return true if the supplied x, y coordinate is inside the item.
void ResetAxeSelection(int axe)
vtkPlot * GetPlot(vtkIdType index) override
Get the plot at the specified index, returns null if the index is invalid.
void RecalculateBounds() override
Request that the chart recalculates the range of its axes.
void UpdateGeometry(vtkContext2D *painter)
virtual vtkStringArray * GetVisibleColumns()
Get a list of the columns, and the order in which they are displayed.
void SetColumnVisibility(const vtkStdString &name, bool visible)
Set the visibility of the specified column.
vtkChartLegend * GetLegend() override
Get the legend for the chart, if available.
bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta) override
Mouse wheel event, positive delta indicates forward movement of the wheel.
void SetColumnVisibilityAll(bool visible)
Set the visibility of all columns (true will make them all visible, false will remove all visible col...
bool MouseEnterEvent(const vtkContextMouseEvent &mouse) override
Mouse enter event.
static vtkChartParallelCoordinates * New()
Creates a parallel coordinates chart.
vtkIdTypeArray * Selection
Selected indices for the table the plot is rendering.
vtkIdType GetNumberOfPlots() override
Get the number of plots the chart contains.
bool Paint(vtkContext2D *painter) override
Paint event for the chart, called whenever the chart needs to be drawn.
vtkChartLegend * Legend
The legend for the chart.
void SetShowLegend(bool visible) override
Set whether the chart should draw a legend.
bool MouseLeaveEvent(const vtkContextMouseEvent &mouse) override
Mouse leave event.
bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse) override
Mouse button release event.
bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse) override
Mouse button down event.
virtual void SetPlot(vtkPlotParallelCoordinates *plot)
Set plot to use for the chart.
bool PaintRect(vtkContext2D *painter, int axis, float min, float max)
Draw a rect on a specific axis.
void Update() override
Perform any updates to the item that may be necessary before rendering.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkChartParallelCoordinates() override
void SwapAxes(int a1, int a2)
Factory class for drawing 2D charts.
Definition vtkChart.h:151
Class for drawing 2D primitives to a graphical context.
data structure to represent mouse events.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:167
Class for drawing a parallel coordinate plot given columns from a vtkTable.
Abstract class for 2D plots.
Definition vtkPlot.h:153
Wrapper around std::string to keep symbols short.
a vtkAbstractArray subclass for strings
record modification and/or execution time
int vtkIdType
Definition vtkType.h:332
#define VTK_MARSHALAUTO
#define max(a, b)