25 #include "vtkChartsCoreModule.h"
34 VTK_ABI_NAMESPACE_BEGIN
43 class vtkChartXYPrivate;
48 VTK_ABI_NAMESPACE_BEGIN
152 int GetPlotCorner(
vtkPlot* plot);
157 void SetPlotCorner(
vtkPlot* plot,
int corner);
216 void RemovePlotSelections();
222 vtkSetMacro(DrawAxesAtOrigin,
bool);
223 vtkGetMacro(DrawAxesAtOrigin,
bool);
224 vtkBooleanMacro(DrawAxesAtOrigin,
bool);
232 vtkSetMacro(AutoAxes,
bool);
233 vtkGetMacro(AutoAxes,
bool);
234 vtkBooleanMacro(AutoAxes,
bool);
241 vtkSetMacro(HiddenAxisBorder,
int);
242 vtkGetMacro(HiddenAxisBorder,
int);
251 vtkSetMacro(ForceAxesToBounds,
bool);
252 vtkGetMacro(ForceAxesToBounds,
bool);
253 vtkBooleanMacro(ForceAxesToBounds,
bool);
263 vtkSetMacro(IgnoreNanInBounds,
bool);
264 vtkGetMacro(IgnoreNanInBounds,
bool);
265 vtkBooleanMacro(IgnoreNanInBounds,
bool);
276 vtkSetMacro(BarWidthFraction,
float);
277 vtkGetMacro(BarWidthFraction,
float);
287 vtkSetMacro(ZoomWithMouseWheel,
bool);
288 vtkGetMacro(ZoomWithMouseWheel,
bool);
289 vtkBooleanMacro(ZoomWithMouseWheel,
bool);
298 void SetAxisZoom(
int index,
bool v);
299 bool GetAxisZoom(
int index);
308 vtkSetMacro(AdjustLowerBoundForLogPlot,
bool);
309 vtkGetMacro(AdjustLowerBoundForLogPlot,
bool);
310 vtkBooleanMacro(AdjustLowerBoundForLogPlot,
bool);
319 vtkSetMacro(DragPointAlongX,
bool);
320 vtkGetMacro(DragPointAlongX,
bool);
321 vtkBooleanMacro(DragPointAlongX,
bool);
330 vtkSetMacro(DragPointAlongY,
bool);
331 vtkGetMacro(DragPointAlongY,
bool);
332 vtkBooleanMacro(DragPointAlongY,
bool);
381 typedef std::map<unsigned int, vtkSmartPointer<vtkIdTypeArray>>
MapIndexToIds;
387 static void MakeSelection(
vtkAnnotationLink* link,
const MapIndexToIds& selection);
392 const std::vector<vtkContextTransform*>& GetTransforms()
const;
430 static void BuildSelection(
431 int selectionMode, MapIndexToIds& selection,
const MapIndexToIds& oldSelection);
442 ~vtkChartXY() override;
447 void RecalculatePlotTransforms();
453 void RecalculatePlotBounds();
467 virtual
int GetLegendBorder(
vtkContext2D* painter,
int axisPosition);
473 virtual
void SetLegendPosition(const
vtkRectf& rect);
488 bool PlotTransformValid;
509 bool DrawSelectionPolygon;
514 bool DrawNearestPoint;
521 bool DrawAxesAtOrigin;
531 int HiddenAxisBorder;
537 float BarWidthFraction;
544 bool ForceAxesToBounds;
552 bool IgnoreNanInBounds;
558 bool ZoomWithMouseWheel;
570 bool AdjustLowerBoundForLogPlot;
575 bool DragPointAlongX;
576 bool DragPointAlongY;
579 vtkChartXY(const vtkChartXY&) = delete;
580 void operator=(const vtkChartXY&) = delete;
582 vtkChartXYPrivate* ChartPrivate;
593 void CalculateBarPlots();
608 bool RemovePlotFromCorners(
vtkPlot* plot);
616 void ReleasePlotSelections();
621 void TransformBoxOrPolygon(
bool polygonMode,
vtkTransform2D* transform,
641 VTK_ABI_NAMESPACE_END
642 #endif // vtkChartXY_h
Wrapper around std::string to keep symbols short.
data structure to represent key events.
virtual void SetShowLegend(bool visible)
Set/get whether the chart should draw a legend.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event Return true if the item holds the event, false if the event can be propagated...
virtual vtkIdType GetNumberOfAxes()
Get the number of axes in the current chart.
bool Paint(vtkContext2D *painter) override=0
Paint event for the chart, called whenever the chart needs to be drawn.
virtual void RecalculateBounds()
Request that the chart recalculates the range of its axes.
dynamic, self-adjusting array of vtkIdType
Hold a reference to a vtkObjectBase instance.
virtual void ClearPlots()
Remove all plots from the chart.
Class for drawing 2D primitives to a graphical context.
#define VTK_DEPRECATED_IN_9_6_0(reason)
Factory class for drawing 2D charts.
virtual bool RemovePlot(vtkIdType index)
Remove the plot at the specified index, returns true if successful, false if the index was invalid...
virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta)
Mouse wheel event, positive delta indicates forward movement of the wheel.
takes care of drawing 2D axes
data structure to represent mouse events.
vtkVector2i ScreenPosition
virtual void SetAxis(int axisIndex, vtkAxis *)
Set the axis specified by axisIndex.
virtual vtkChartLegend * GetLegend()
Get the legend for the chart, if available.
a simple class to control print indentation
std::map< unsigned int, vtkSmartPointer< vtkIdTypeArray > > MapIndexToIds
Some derived classes for the different vectors commonly used.
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event.
virtual vtkIdType GetNumberOfPlots()
Get the number of plots the chart contains.
Abstract class for 2D plots.
virtual bool KeyPressEvent(const vtkContextKeyEvent &key)
Key press event.
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
Mouse enter event.
Factory class for drawing XY charts.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Small struct used by InvokeEvent to send some information about the point that was clicked on...
Composite dataset that organizes datasets into blocks.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
takes care of drawing the plot grid
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
virtual vtkPlot * GetPlot(vtkIdType index)
Get the plot at the specified index, returns null if the index is invalid.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void SetSelectionMethod(int method)
Set the selection method, which controls how selections are handled by the chart. ...
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
Mouse leave event.
virtual vtkPlot * AddPlot(int type)
Add a plot to the chart, defaults to using the name of the y column.
virtual vtkAxis * GetAxis(int axisIndex)
Get the axis specified by axisIndex.
An algorithm for linking annotations among objects.