 |
VTK
9.0.1
|
Go to the documentation of this file.
30 #include "vtkChartsCoreModule.h"
58 vtkSetMacro(LegendVisibility,
bool);
59 vtkGetMacro(LegendVisibility,
bool);
60 vtkBooleanMacro(LegendVisibility,
bool);
119 #ifndef VTK_LEGACY_REMOVE
123 #endif // VTK_LEGACY_REMOVE
125 #ifndef VTK_LEGACY_REMOVE
133 VTK_LEGACY(
virtual vtkIdType GetNearestPoint(
135 #endif // VTK_LEGACY_REMOVE
151 virtual void SetColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
152 virtual void SetColor(
double r,
double g,
double b);
255 vtkGetMacro(UseIndexForXSeries,
bool);
263 vtkSetMacro(UseIndexForXSeries,
bool);
296 vtkSetMacro(Selectable,
bool);
297 vtkGetMacro(Selectable,
bool);
298 vtkBooleanMacro(Selectable,
bool);
343 virtual void GetBounds(
double bounds[4]) { bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0; }
373 return this->GetBounds(bounds);
398 static bool ClampPos(
double pos[2],
double bounds[4]);
419 const double inX,
const double inY,
double& outX,
double& outY);
421 const double inX,
const double inY,
double& outX,
double& outY);
515 #ifndef VTK_LEGACY_REMOVE
520 bool LegacyRecursionFlag =
false;
521 #endif // VTK_LEGACY_REMOVE
525 void operator=(
const vtkPlot&) =
delete;
provides a brush that fills shapes drawn by vtkContext2D.
vtkSmartPointer< vtkStringArray > AutoLabels
Holds Labels when they're auto-created.
virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex)
Generate and return the tooltip label string for this plot The segmentIndex parameter is ignored,...
virtual int GetTooltipPrecision()
void SetSelectionPen(vtkPen *pen)
Set/get the vtkBrush object that controls how this plot fills selected shapes.
virtual void TransformScreenToData(const double inX, const double inY, double &outX, double &outY)
vtkStdString TooltipLabelFormat
A printf-style string to build custom tooltip labels from.
vtkSmartPointer< vtkStringArray > IndexedLabels
Holds Labels when they're auto-created.
void SetInputData(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn)
vtkSmartPointer< vtkBrush > Brush
This object stores the vtkBrush that controls how the plot is drawn.
Abstract class for 2D context mappers.
virtual float GetWidth()
Get the width of the line.
virtual void SetWidth(float width)
Set the width of the line.
A table, which contains similar-typed columns of data.
virtual vtkStringArray * GetIndexedLabels()
Get the indexed labels array.
vtkSmartPointer< vtkContextMapper2D > Data
This data member contains the data that will be plotted, it inherits from vtkAlgorithm.
virtual void SetLabels(vtkStringArray *labels)
Set the plot labels, these are used for stacked chart variants, with the index referring to the stack...
void SetIndexedLabels(vtkStringArray *labels)
Set indexed labels for the plot.
virtual void TransformScreenToData(const vtkVector2f &in, vtkVector2f &out)
Transform the mouse event in the control-points space.
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table and the x, y column for the plot.
vtkStdString GetLabel(vtkIdType index)
Get the label at the specified index.
vtkBrush * GetSelectionBrush()
virtual void SetSelection(vtkIdTypeArray *id)
Sets the list of points that must be selected.
virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Set the plot color.
bool Selectable
Whether plot points can be selected or not.
Class for drawing 2D primitives to a graphical context.
virtual int GetTooltipNotation()
Abstract class for 2D plots.
vtkSmartPointer< vtkStringArray > Labels
Plot labels, used by legend.
virtual void TransformDataToScreen(const double inX, const double inY, double &outX, double &outY)
virtual vtkTable * GetInput()
Get the input table used by the plot.
virtual void SetColor(double r, double g, double b)
void SetPen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws (out)lines.
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
Select all points in the specified rectangle.
virtual void SetYAxis(vtkAxis *axis)
static bool ClampPos(double pos[2], double bounds[4])
Clamp the given 2D pos into the provided bounds Return true if the pos has been clamped,...
virtual void UpdateCache()
Subclasses that build data caches to speed up painting should override this method to update such cac...
bool UseIndexForXSeries
Use the Y array index for the X value.
void SetSelectionBrush(vtkBrush *brush)
Set/get the vtkBrush object that controls how this plot fills selected shapes.
a simple class to control print indentation
vtkSmartPointer< vtkBrush > SelectionBrush
This object stores the vtkBrush that controls how the selected elements of the plot are drawn.
vtkStdString TooltipDefaultLabelFormat
The default printf-style string to build custom tooltip labels from.
virtual void SetLabel(const vtkStdString &label)
Set the label of this plot.
virtual void SetXAxis(vtkAxis *axis)
A atomic type representing the union of many types.
virtual void TransformDataToScreen(const vtkVector2f &in, vtkVector2f &out)
virtual vtkVariant GetProperty(const vtkStdString &property)
vtkSmartPointer< vtkPen > Pen
This object stores the vtkPen that controls how the plot is drawn.
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line dra...
vtkSmartPointer< vtkPen > SelectionPen
This object stores the vtkPen that controls how the selected elements of the plot are drawn.
vtkPen * GetSelectionPen()
vtkIdTypeArray * Selection
Selected indices for the table the plot is rendering.
virtual void SetTooltipNotation(int notation)
Sets/gets the tooltip notation style.
virtual int GetNumberOfLabels()
Get the number of labels associated with this plot.
vtkAxis * XAxis
The X axis associated with this plot.
base class for items that are part of a vtkContextScene.
void SetBrush(vtkBrush *brush)
Set/get the vtkBrush object that controls how this plot fills shapes.
virtual void SetInputArray(int index, const vtkStdString &name)
Convenience function to set the input arrays.
virtual void SetProperty(const vtkStdString &property, const vtkVariant &var)
A General setter/getter that should be overridden.
dynamic, self-adjusting array of vtkIdType
virtual vtkStringArray * GetLabels()
Get the plot labels.
virtual void GetUnscaledInputBounds(double bounds[4])
Provide un-log-scaled bounds for the plot inputs.
takes care of drawing 2D axes
void SetShiftScale(const vtkRectd &scaling)
Get/set the origin shift and scaling factor used by the plot, this is normally 0.0 offset and 1....
virtual void SetTooltipLabelFormat(const vtkStdString &label)
Sets/gets a printf-style string to build custom tooltip labels from.
a vtkAbstractArray subclass for strings
vtkRectd ShiftScale
The current shift in origin and scaling factor applied to the plot.
void GetColor(unsigned char rgb[3])
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Wrapper around std::string to keep symbols short.
virtual vtkStdString GetLabel()
Get the label of this plot.
virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon)
Select all points in the specified polygon.
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
vtkContextMapper2D * GetData()
Get the data object that the plot will draw.
virtual void GetColor(double rgb[3])
virtual bool ClampPos(double pos[2])
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetTooltipPrecision(int precision)
Sets/gets the tooltip precision.
virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn, const vtkStdString &yColumn)
vtkAxis * YAxis
The X axis associated with this plot.
virtual vtkStdString GetTooltipLabelFormat()
vtkStdString GetNumber(double position, vtkAxis *axis)
Get the properly formatted number for the supplied position and axis.