57 #include "vtkChartsCoreModule.h"
93 TICK_WILKINSON_EXTENDED
105 virtual void SetPosition(
int position);
114 void SetPoint1(
float x,
float y);
121 vtkGetVector2Macro(Point1,
float);
130 void SetPoint2(
float x,
float y);
137 vtkGetVector2Macro(Point2,
float);
145 virtual void SetNumberOfTicks(
int numberOfTicks);
151 vtkGetMacro(NumberOfTicks,
int);
158 vtkSetMacro(TickLength,
float);
159 vtkGetMacro(TickLength,
float);
175 virtual void SetMinimum(
double minimum);
183 vtkGetMacro(Minimum,
double);
191 virtual void SetMaximum(
double maximum);
199 vtkGetMacro(Maximum,
double);
207 virtual void SetUnscaledMinimum(
double minimum);
213 vtkGetMacro(UnscaledMinimum,
double);
219 virtual void SetUnscaledMaximum(
double maximum);
225 vtkGetMacro(UnscaledMaximum,
double);
238 virtual void SetRange(
double minimum,
double maximum);
239 virtual void SetRange(
double range[2]);
240 virtual void SetUnscaledRange(
double minimum,
double maximum);
241 virtual void SetUnscaledRange(
double range[2]);
252 virtual void GetRange(
double*
range);
253 virtual void GetUnscaledRange(
double*
range);
259 virtual void SetMinimumLimit(
double lowest);
265 vtkGetMacro(MinimumLimit,
double);
271 virtual void SetMaximumLimit(
double highest);
277 vtkGetMacro(MaximumLimit,
double);
283 virtual void SetUnscaledMinimumLimit(
double lowest);
289 vtkGetMacro(UnscaledMinimumLimit,
double);
295 virtual void SetUnscaledMaximumLimit(
double highest);
301 vtkGetMacro(UnscaledMaximumLimit,
double);
308 vtkGetVector2Macro(Margins,
int);
315 vtkSetVector2Macro(Margins,
int);
346 vtkGetMacro(LogScaleActive,
bool);
356 vtkGetMacro(LogScale,
bool);
357 virtual void SetLogScale(
bool logScale);
358 vtkBooleanMacro(LogScale,
bool);
365 vtkSetMacro(GridVisible,
bool);
366 vtkGetMacro(GridVisible,
bool);
373 vtkSetMacro(LabelsVisible,
bool);
374 vtkGetMacro(LabelsVisible,
bool);
381 vtkSetMacro(RangeLabelsVisible,
bool);
382 vtkGetMacro(RangeLabelsVisible,
bool);
389 vtkSetMacro(LabelOffset,
float);
390 vtkGetMacro(LabelOffset,
float);
397 vtkSetMacro(TicksVisible,
bool);
398 vtkGetMacro(TicksVisible,
bool);
405 vtkSetMacro(AxisVisible,
bool);
406 vtkGetMacro(AxisVisible,
bool);
413 vtkSetMacro(TitleVisible,
bool);
414 vtkGetMacro(TitleVisible,
bool);
422 virtual void SetPrecision(
int precision);
423 vtkGetMacro(Precision,
int);
431 STANDARD_NOTATION = 0,
442 virtual void SetLabelFormat(
const std::string& fmt);
462 virtual void SetNotation(
int notation);
463 vtkGetMacro(Notation,
int);
480 vtkSetMacro(Behavior,
int);
481 vtkGetMacro(Behavior,
int);
488 vtkSetSmartPointerMacro(Pen,
vtkPen);
489 vtkGetObjectMacro(Pen,
vtkPen);
496 vtkSetSmartPointerMacro(GridPen,
vtkPen);
497 vtkGetObjectMacro(GridPen,
vtkPen);
508 vtkSetMacro(TickLabelAlgorithm,
int);
509 vtkGetMacro(TickLabelAlgorithm,
int);
517 vtkSetMacro(ScalingFactor,
double);
518 vtkGetMacro(ScalingFactor,
double);
519 vtkSetMacro(Shift,
double);
520 vtkGetMacro(Shift,
double);
540 virtual void AutoScale();
546 virtual void RecalculateTickSpacing();
587 static double NiceNumber(
double number,
bool roundUp);
593 static double NiceMinMax(
double& min,
double&
max,
float pixelRange,
float tickPixelSpacing);
618 void UpdateLogScaleActive(
bool updateMinMaxFromUnscaled);
623 virtual void GenerateTickLabels(
double min,
double max);
628 virtual void GenerateTickLabels();
630 virtual void GenerateLabelFormat(
int notation,
double n);
641 double CalculateNiceMinMax(
double& min,
double&
max);
652 double LogScaleTickMark(
double number,
bool roundUp,
bool& niceValue,
int&
order);
665 virtual void GenerateLogSpacedLinearTicks(
int order,
double min,
double max);
677 void GenerateLogScaleTickMarks(
678 int order,
double min = 1.0,
double max = 9.0,
bool detailLabels =
true);
792 void operator=(
const vtkAxis&) =
delete;
797 bool InRange(
double value);
vtkTextProperty * LabelProperties
Location
Enumeration of the axis locations in a conventional XY chart.
Wrapper around std::string to keep symbols short.
double NonLogUnscaledMinLimit
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
struct Position_t Position
std::string RangeLabelFormat
double Shift
Scaling factor used on this axis, this is used to accurately render very small/large numbers accurate...
record modification and/or execution time
dynamic, self-adjusting array of float
a vtkAbstractArray subclass for strings
int TickLabelAlgorithm
The algorithm being used to tick label placement.
dynamic, self-adjusting array of double
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
double UnscaledMinimumLimit
double UnscaledMaximumLimit
bool Resized
Flag to indicate that the axis has been resized.
Class for drawing 2D primitives to a graphical context.
takes care of drawing 2D axes
data structure to represent mouse events.
a simple class to control print indentation
vtkSmartPointer< vtkStringArray > TickLabels
The labels for the tick marks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
represent text properties.
double ScalingFactor
Scaling factor used on this axis, this is used to accurately render very small/large numbers accurate...
vtkSmartPointer< vtkPen > GridPen
This object stores the vtkPen that controls how the grid lines are drawn.
vtkTextProperty * TitleProperties
bool CustomTickLabels
Are we using custom tick labels, or should the axis generate them?
vtkSmartPointer< vtkDoubleArray > TickPositions
Position of tick marks in screen coordinates.
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
bool UsingNiceMinMax
Hint as to whether a nice min/max was set, otherwise labels may not be present at the top/bottom of t...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
double NonLogUnscaledMaxLimit
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
vtkSmartPointer< vtkPen > Pen
This object stores the vtkPen that controls how the axis is drawn.
vtkSmartPointer< vtkFloatArray > TickScenePositions
Position of tick marks in screen coordinates.
bool TickMarksDirty
Mark the tick labels as dirty when the min/max value is changed.