36#include "vtkChartsCoreModule.h"
47class vtkChartXYPrivate;
201 vtkGetMacro(DrawAxesAtOrigin,
bool);
211 vtkGetMacro(AutoAxes,
bool);
220 vtkGetMacro(HiddenAxisBorder,
int);
230 vtkGetMacro(ForceAxesToBounds,
bool);
243 vtkGetMacro(BarWidthFraction,
float);
254 vtkGetMacro(ZoomWithMouseWheel,
bool);
265 vtkGetMacro(AdjustLowerBoundForLogPlot,
bool);
443 void operator=(
const vtkChartXY &) VTK_DELETE_FUNCTION;
445 vtkChartXYPrivate *ChartPrivate;
450 void CalculateBarPlots();
458 int invokeEvent = -1);
467 bool RemovePlotFromCorners(
vtkPlot *plot);
474 void TransformBoxOrPolygon(
bool polygonMode,
vtkTransform2D *transform,
takes care of drawing 2D axes
Factory class for drawing XY charts.
virtual vtkPlot * AddPlot(int type)
Add a plot to the chart, defaults to using the name of the y column.
virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta)
Mouse wheel event, positive delta indicates forward movement of the wheel.
bool DrawNearestPoint
Should we draw the location of the nearest point on the plot?
virtual void RecalculateBounds()
Request that the chart recalculates the range of its axes.
virtual vtkIdType StackPlotUnder(vtkPlot *plot, vtkPlot *above)
Lowers the plot under the above plot.
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
Mouse leave event.
bool DrawBox
Should the box be drawn (could be selection, zoom etc).
vtkSmartPointer< vtkChartLegend > Legend
The legend for the chart.
vtkContextPolygon SelectionPolygon
The polygon created as the mouse is dragged around the screen when in polygonal selection mode.
virtual void SetTooltipInfo(const vtkContextMouseEvent &, const vtkVector2d &, vtkIdType, vtkPlot *, vtkIdType segmentIndex=-1)
Set the information passed to the tooltip.
void RecalculatePlotTransforms()
Recalculate the necessary transforms.
virtual void ClearPlots()
Remove all plots from the chart.
virtual int GetLegendBorder(vtkContext2D *painter, int axisPosition)
Layout for the legend if it is visible.
virtual vtkIdType GetPlotIndex(vtkPlot *)
Get the index of the specified plot, returns -1 if the plot does not belong to the chart.
virtual bool RemovePlot(vtkIdType index)
Remove the plot at the specified index, returns true if successful, false if the index was invalid.
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
Mouse enter event.
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event.
vtkIdType RaisePlot(vtkPlot *plot)
Raises the plot to the top of the plot's stack.
bool DrawAxesAtOrigin
Keep the axes drawn at the origin? This will attempt to keep the axes drawn at the origin,...
virtual bool Paint(vtkContext2D *painter)
Paint event for the chart, called whenever the chart needs to be drawn.
virtual vtkPlot * GetPlot(vtkIdType index)
Get the plot at the specified index, returns null if the index is invalid.
virtual bool KeyPressEvent(const vtkContextKeyEvent &key)
Key press event.
static vtkChartXY * New()
Creates a 2D Chart object.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
bool LayoutChanged
Indicate if the layout has changed in some way that would require layout code to be called.
bool AutoAxes
Should axes be turned on and off automatically - defaults to on.
bool AdjustLowerBoundForLogPlot
Property to adjust the minimum of a logarithmic axis to be greater than 0, regardless of the minimum ...
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event.
virtual bool UpdateLayout(vtkContext2D *painter)
Update the layout of the chart, this may require the vtkContext2D in order to get font metrics etc.
bool PlotTransformValid
Does the plot area transform need to be recalculated?
float BarWidthFraction
The fraction of the interval taken up along the x axis by any bars that are drawn on the chart.
virtual vtkIdType StackPlotAbove(vtkPlot *plot, vtkPlot *under)
Raises the plot above the under plot.
virtual void SetShowLegend(bool visible)
Set whether the chart should draw a legend.
virtual vtkAxis * GetAxis(int axisIndex)
Get the axis specified by axisIndex.
virtual vtkTooltipItem * GetTooltip()
Get the vtkTooltipItem object that will be displayed by the chart.
bool ZoomWithMouseWheel
Property to enable zooming the chart with the mouse wheel.
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
virtual vtkIdType GetNumberOfAxes()
Get the number of axes in the current chart.
virtual vtkChartLegend * GetLegend()
Get the vtkChartLegend object that will be displayed by the chart.
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
int GetPlotCorner(vtkPlot *plot)
Figure out which quadrant the plot is in.
bool DrawSelectionPolygon
Should the selection polygon be drawn.
vtkRectf MouseBox
The box created as the mouse is dragged around the screen.
void SetPlotCorner(vtkPlot *plot, int corner)
Figure out which quadrant the plot is in.
virtual void SetLegendPosition(const vtkRectf &rect)
Called after the edges of the chart are decided, set the position of the legend, depends upon its ali...
virtual void SetTooltip(vtkTooltipItem *tooltip)
Set the vtkTooltipItem object that will be displayed by the chart.
vtkSmartPointer< vtkTooltipItem > Tooltip
The tooltip item for the chart - can be used to display extra information.
vtkIdType LowerPlot(vtkPlot *plot)
Lowers the plot to the bottom of the plot's stack.
virtual void SetSelectionMethod(int method)
Set the selection method, which controls how selections are handled by the chart.
virtual vtkIdType GetNumberOfPlots()
Get the number of plots the chart contains.
int HiddenAxisBorder
Size of the border when an axis is hidden.
virtual vtkIdType AddPlot(vtkPlot *plot)
Adds a plot to the chart.
bool ForceAxesToBounds
Property to force the axes to have their Minimum and Maximum properties inside the plot boundaries.
void RecalculatePlotBounds()
Calculate the optimal zoom level such that all of the points to be plotted will fit into the plot are...
Factory class for drawing 2D charts.
Class for drawing 2D primitives to a graphical context.
data structure to represent key events.
data structure to represent mouse events.
a simple class to control print indentation
takes care of drawing the plot grid
Abstract class for 2D plots.
Wrapper around std::string to keep symbols short.
Some derived classes for the different vectors commonly used.
Small struct used by InvokeEvent to send some information about the point that was clicked on.
vtkVector2i ScreenPosition
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.