21#ifndef JKQTPGRAPHSBASE_H
22#define JKQTPGRAPHSBASE_H
27#include "jkqtplotter/jkqtpbaseelements.h"
28#include "jkqtplotter/jkqtpbaseplotter.h"
29#include "jkqtplotter/jkqtptools.h"
30#include "jkqtplotter/jkqtplotter_imexport.h"
31#include "jkqtplotter/jkqtpimagetools.h"
90 virtual bool getXMinMax(
double& minx,
double& maxx,
double& smallestGreaterZero)=0;
100 virtual bool getYMinMax(
double& miny,
double& maxy,
double& smallestGreaterZero)=0;
120 Q_PROPERTY(
bool visible READ isVisible WRITE setVisible)
121 Q_PROPERTY(QString title READ getTitle WRITE setTitle)
122 Q_PROPERTY(
bool highlighted READ isHighlighted WRITE setHighlighted)
125 void setVisible(
bool __value);
127 void setHighlighted(
bool __value);
131 virtual
void setTitle(const QString & __value);
140 virtual
void getOutsideSize(
JKQTPEnhancedPainter& painter,
int& leftSpace,
int& rightSpace,
int& topSpace,
int& bottomSpace);
148 virtual
void drawOutside(
JKQTPEnhancedPainter& painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace);
199 virtual
double hitTest(const QPointF & posSystem, QPointF* closestSpotSystem=
nullptr, QString* label=
nullptr,
HitTestMode mode=HitTestXY) const;
207 inline HitTestLocation(
double x_,
double y_,
const QString& label_): pos(x_,y_), index(-1), label(label_) {}
208 inline HitTestLocation(
const QPointF& pos_,
const QString& label_): pos(pos_), index(-1), label(label_) {}
209 inline HitTestLocation(
double x_,
double y_,
int index_,
const QString& label_): pos(x_,y_), index(index_), label(label_) {}
210 inline HitTestLocation(
const QPointF& pos_,
int index_,
const QString& label_): pos(pos_), index(index_), label(label_) {}
236 return QPointF(transformX(x.x()), transformY(x.y()));
242 return QPointF(backtransformX(x.x()), backtransformY(x.y()));
247 return transform(QPointF(x,y));
252 return backTransform(QPointF(x,y));
278 return parent->getXAxis(xAxisRef);
282 return parent->getYAxis(yAxisRef);
300 inline
void clearHitTestData() { m_hitTestData.clear(); }
465 bool getDataMinMax(
int column,
double& minx,
double& maxx,
double& smallestGreaterZero);
498 DrawAsMathematicalCurve
514 Q_PROPERTY(
DrawMode drawMode READ getDrawMode WRITE setDrawMode)
600 Q_ENUM(DataSortOrder)
607 virtual
bool getXMinMax(
double& minx,
double& maxx,
double& smallestGreaterZero) override;
609 virtual
bool getYMinMax(
double& miny,
double& maxy,
double& smallestGreaterZero) override;
612 virtual
bool usesColumn(
int column) const override;
615 int getXColumn() const;
617 int getYColumn() const;
621 virtual
int getKeyColumn() const;
623 virtual
int getValueColumn() const;
625 Q_PROPERTY(
DataSortOrder sortData READ getDataSortOrder WRITE setDataSortOrder)
626 Q_PROPERTY(
int xColumn READ getXColumn WRITE setXColumn)
627 Q_PROPERTY(
int yColumn READ getYColumn WRITE setYColumn)
639 virtual
double hitTest(const QPointF &posSystem, QPointF* closestSpotSystem=
nullptr, QString* label=
nullptr,
HitTestMode mode=HitTestXY) const override;
642 void setXYColumns(
size_t xCol,
size_t yCol);
644 void setXYColumns(
int xCol,
int yCol);
645#if QT_VERSION<QT_VERSION_CHECK(6,0,0)
647 void setXYColumns(std::pair<int,int> xyColPair);
649 void setXYColumns(std::pair<size_t,size_t> xyColPair);
692 if (sortData==Unsorted)
return i;
693 return sortedIndices.value(i,i);
722 Q_PROPERTY(
double baseline READ getBaseline WRITE setBaseline)
731 bool getMinMaxWithErrorsAndBaseline(
int dataColumn,
int errorColumn,
int errorColumnLower,
bool errorSymmetric,
double &minv,
double &maxv,
double &smallestGreaterZero);
763 virtual bool getYMinMax(
double& miny,
double& maxy,
double& smallestGreaterZero)
override;
774 virtual double hitTest(
const QPointF &posSystem, QPointF* closestSpotSystem=
nullptr, QString* label=
nullptr,
HitTestMode mode=HitTestXY)
const override;
776 Q_PROPERTY(
int yColumn2 READ getYColumn2 WRITE setYColumn2)
821 virtual bool getXMinMax(
double& minx,
double& maxx,
double& smallestGreaterZero)
override;
832 virtual double hitTest(
const QPointF &posSystem, QPointF* closestSpotSystem=
nullptr, QString* label=
nullptr,
HitTestMode mode=HitTestXY)
const override;
834 Q_PROPERTY(
int xColumn2 READ getXColumn2 WRITE setXColumn2)
888 Q_ENUM(DataSortOrder)
895 Q_ENUM(DataDirection)
901 int getDataColumn() const;
911 virtual
bool usesColumn(
int c) const override;
913 Q_PROPERTY(
DataSortOrder sortData READ getDataSortOrder WRITE setDataSortOrder)
914 Q_PROPERTY(
int dataColumn READ getDataColumn WRITE setDataColumn)
915 Q_PROPERTY(
DataDirection dataDirection READ getDataDirection WRITE setDataDirection)
919 void setDataColumn(
int __value);
921 void setDataColumn (
size_t __value);
925 void setDataSortOrder(
int __value);
939 QVector<
int> sortedIndices;
940 virtual
void intSortData();
946 inline
int getDataIndex(
int i)
const {
947 if (sortData==Unsorted)
return i;
948 return sortedIndices.value(i,i);
976 DefaultVectorDataLayout=DeltaXDeltaYLayout,
978 Q_ENUM(VectorDataLayout)
985 virtual
bool getXMinMax(
double& minx,
double& maxx,
double& smallestGreaterZero) override;
987 virtual
bool getYMinMax(
double& miny,
double& maxy,
double& smallestGreaterZero) override;
990 virtual
bool usesColumn(
int column) const override;
993 int getDxColumn() const;
995 int getDyColumn() const;
997 int getAngleColumn() const;
999 int getLengthColumn() const;
1004 virtual
double hitTest(const QPointF &posSystem, QPointF* closestSpotSystem=
nullptr, QString* label=
nullptr,
HitTestMode mode=HitTestXY) const override;
1006 virtual QString formatHitTestDefaultLabel(
double x,
double y,
int index=-1, const
JKQTPDatastore *datastore=
nullptr) const override;
1009 Q_PROPERTY(
int dxColumn READ getDxColumn WRITE setDxColumn)
1010 Q_PROPERTY(
int dyColumn READ getDyColumn WRITE setDyColumn)
1011 Q_PROPERTY(
int angleColumn READ getAngleColumn WRITE setAngleColumn)
1012 Q_PROPERTY(
int lengthColumn READ getLengthColumn WRITE setLengthColumn)
1015 void setDxColumn(
int col);
1017 void setDyColumn(
int col) ;
1022 void setDxDyColumn(
int colDx,
int colDy) ;
1024 void setAngleColumn(
int col) ;
1029 void setAngleAndLengthColumn(
int colAngle,
int colLength) ;
1031 void setLengthColumn(
int col) ;
1034 static inline
double getVectorMagnitude(const QPointF& v) {
1038 return getVectorMagnitude(getVectorDxDy(i));
1042 double colValue=atan2(v.y(),v.x());
1047 return getVectorAngle(getVectorDxDy(i));
1132 Q_ENUM(DataSortOrder)
1139 virtual
bool getXMinMax(
double& minx,
double& maxx,
double& smallestGreaterZero) override;
1142 virtual
bool usesColumn(
int column) const override;
1145 int getXColumn() const;
1149 virtual
int getKeyColumn() const;
1152 Q_PROPERTY(
int xColumn READ getXColumn WRITE setXColumn)
1157 void setDataSortOrder(
int __value);
1161 void setXColumn(
int __value);
1163 void setXColumn (
size_t __value);
1165 virtual
void setKeyColumn(
int __value);
1174 QVector<
int> sortedIndices;
1176 virtual
void intSortData();
1184 inline
int getDataIndex(
int i)
const {
1185 if (sortData==Unsorted)
return i;
1186 return sortedIndices.value(i,i);
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
this virtual class is the base for any type of coordinate axis, to be drawn by JKQTBasePlotter.
Definition jkqtpcoordinateaxes.h:181
This class manages data columns (with entries of type double ), used by JKQTPlotter/JKQTBasePlotter t...
Definition jkqtpdatastorage.h:282
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
this is the virtual base class of all JKQTPPlotElement's in a JKQTPlotter plot that represent geometr...
Definition jkqtpgraphsbase.h:491
DrawMode
indicates how to draw the geometric object
Definition jkqtpgraphsbase.h:496
@ DrawAsGraphicElement
draw lines as lines (i.e. graphic elements)
Definition jkqtpgraphsbase.h:497
This mix-in class assembles all styling properties applicable to error indicators.
Definition jkqtpgraphsbaseerrors.h:45
this virtual base class of the (data-column based) graphs, which are part of a JKQTPlotter plot and w...
Definition jkqtpgraphsbase.h:429
virtual bool usesColumn(int column) const
returns true if the given column is used by the graph
virtual ~JKQTPGraph()=default
default wirtual destructor
virtual void drawErrorsBefore(JKQTPEnhancedPainter &)
this function is used to plot error inidcators before plotting the graphs.
bool getDataMinMax(int column, double &minx, double &maxx, double &smallestGreaterZero)
get the maximum and minimum value of the given column
JKQTPGraph(JKQTBasePlotter *parent=nullptr)
class constructor
virtual void drawErrorsAfter(JKQTPEnhancedPainter &)
this function is used to plot error inidcators after plotting the graphs.
this is the virtual base class of all JKQTPPlotElement's in a JKQTPlotter plot that represent annotat...
Definition jkqtpgraphsbase.h:550
virtual ~JKQTPPlotAnnotationElement()
default wirtual destructor
JKQTPPlotAnnotationElement(JKQTBasePlotter *parent=nullptr)
class constructor
this virtual base class of every element, which is part of a JKQTPlotter plot and may appear in its k...
Definition jkqtpgraphsbase.h:62
void addHitTestData(const QPointF &pos_, int index_=-1, const JKQTPDatastore *datastore=nullptr)
clear the internal datastore for hitTest(), this variant uses formatHitTestDefaultLabel() to auto-gen...
Definition jkqtpgraphsbase.h:350
QPointF backTransform(const QPointF &x) const
tool routine that back-transforms a QPointF according to the parent's transformation rules (pixels --...
Definition jkqtpgraphsbase.h:241
int parentPlotStyle
internal storage for the used parent plot style
Definition jkqtpgraphsbase.h:396
QString yFloatToString(double v, int past_comma=-1) const
converts a x-value v into a string, taking into account the type of x-axis
void reserveHitTestData(int points)
reserve list entries for up to points graph points in the internal datastore for hitTest()
Definition jkqtpgraphsbase.h:306
double transformX(double x) const
tool routine that transforms an x-coordinate (plot coordinate --> pixels) for this plot element,...
void setYAxis(JKQTPCoordinateAxisRef ref)
indicates which coordinate axis to use for coordinate transforms in y-direction
JKQTBasePlotter * getParent()
returns the parent painter class
Definition jkqtpgraphsbase.h:114
const JKQTPCoordinateAxis * getYAxis() const
returns the actual y-Axis-object from the parent plotter, referenced in yAxisRef
Definition jkqtpgraphsbase.h:281
QPointF backTransform(double x, double y) const
tool routine that back-transforms a QPointF according to the parent's transformation rules (pixels --...
Definition jkqtpgraphsbase.h:251
virtual void drawKeyMarker(JKQTPEnhancedPainter &painter, const QRectF &rect)=0
plots a key marker inside the specified rectangle rect
QPainterPath transformToLinePath(const QPolygonF &x) const
tool routine that transforms a QPolygonF according to the parent's transformation rules and returns a...
virtual void setParent(JKQTPlotter *parent)
sets the parent painter class
virtual void draw(JKQTPEnhancedPainter &painter)=0
plots the graph to the plotter object specified as parent
QVector< double > transformY(const QVector< double > &x) const
transform all y-coordinates in a vector x
virtual QString formatHitTestDefaultLabel(double x, double y, int index=-1, const JKQTPDatastore *datastore=nullptr) const
tool-function for hitTest(), which formats a default label, taking into account the x- and y-position...
void addHitTestData(double x_, double y_, const QString &label_)
add a new point on the graph to the internal datastore for hitTest()
Definition jkqtpgraphsbase.h:321
QPointF transform(const QPointF &x) const
tool routine that transforms a QPointF according to the parent's transformation rules (plot coordinat...
Definition jkqtpgraphsbase.h:235
void setXAxis(JKQTPCoordinateAxisRef ref)
indicates which coordinate axis to use for coordinate transforms in x-direction
QString getTitle() const
returns the the title of the plot
virtual bool getXMinMax(double &minx, double &maxx, double &smallestGreaterZero)=0
get the maximum and minimum x-value of the graph
void addHitTestData(const QPointF &pos_, int index_, const QString &label_)
clear the internal datastore for hitTest()
Definition jkqtpgraphsbase.h:369
void addHitTestData(double x_, double y_, int index_, const QString &label_)
clear the internal datastore for hitTest()
Definition jkqtpgraphsbase.h:360
void setAxes(JKQTPCoordinateAxisRef ref)
set the coordinate axes to use for this plot element
virtual QColor getKeyLabelColor() const =0
returns the color to be used for the key label
JKQTBasePlotter * parent
the plotter object this object belongs to
Definition jkqtpgraphsbase.h:386
QImage generateKeyMarker(QSize size=QSize(16, 16))
returns an image with a key marker inside
const JKQTPCoordinateAxis * getXAxis() const
returns the actual x-Axis-object from the parent plotter, referenced in xAxisRef
Definition jkqtpgraphsbase.h:277
bool isHighlighted() const
returns whether the graph is shown in a highlighted style in the plot
void addHitTestData(double x_, double y_, int index_=-1, const JKQTPDatastore *datastore=nullptr)
add a new point on the graph to the internal datastore for hitTest(), this variant uses formatHitTest...
Definition jkqtpgraphsbase.h:340
void addHitTestData(const QPointF &pos_, const QString &label_)
clear the internal datastore for hitTest()
Definition jkqtpgraphsbase.h:329
const JKQTBasePlotter * getParent() const
returns the parent painter class
Definition jkqtpgraphsbase.h:112
QVector< HitTestLocation > m_hitTestData
dataset with graph-points and associated data from the function hitTest()
Definition jkqtpgraphsbase.h:407
double backtransformY(double y) const
tool routine that backtransforms a y-coordinate (pixels --> plot coordinate) for this plot element,...
double transformY(double y) const
tool routine that transforms a y-coordinate (plot coordinate --> pixels) for this plot element,...
virtual ~JKQTPPlotElement()=default
default wirtual destructor
QPolygonF transform(const QPolygonF &x) const
tool routine that transforms a QPolygonF according to the parent's transformation rules (plot coordin...
QPointF transform(double x, double y) const
tool routine that transforms a QPointF according to the parent's transformation rules (plot coordinat...
Definition jkqtpgraphsbase.h:246
QVector< double > transformX(const QVector< double > &x) const
transform all x-coordinates in a vector x
void addHitTestData(const HitTestLocation &loc)
clear the internal datastore for hitTest()
Definition jkqtpgraphsbase.h:312
bool isVisible() const
returns whether the graph is visible in the plot
HitTestMode
modes of operation for the function hitTest()
Definition jkqtpgraphsbase.h:151
@ HitTestXOnly
find closest point in x-direction only
Definition jkqtpgraphsbase.h:153
@ HitTestXY
find closest point in x- and y-direction simulatneously (i.e. measure direct distance)
Definition jkqtpgraphsbase.h:152
@ HitTestYOnly
find closest point in y-direction only
Definition jkqtpgraphsbase.h:154
JKQTPCoordinateAxisRef getXAxisRef() const
indicates which coordinate axis to use for coordinate transforms in x-direction
virtual bool getYMinMax(double &miny, double &maxy, double &smallestGreaterZero)=0
get the maximum and minimum y-value of the graph
JKQTPPlotElement(JKQTBasePlotter *parent=nullptr)
class constructor
virtual void setParent(JKQTBasePlotter *parent)
sets the parent painter class
QString xFloatToString(double v, int past_comma=-1) const
converts a x-value v into a string, taking into account the type of x-axis
double backtransformX(double x) const
tool routine that backtransforms an x-coordinate (pixels --> plot coordinate) for this plot element,...
JKQTPCoordinateAxisRef getYAxisRef() const
indicates which coordinate axis to use for coordinate transforms in y-direction
This virtual JKQTPGraph descendent may be used as base for all graphs that use at least one column of...
Definition jkqtpgraphsbase.h:875
virtual bool getIndexRange(int &imin, int &imax) const
determines the range of row indexes available in the data columns of this graph
DataSortOrder
specifies how to sort the data for a JKQTPSingleColumnGraph before drawing
Definition jkqtpgraphsbase.h:884
DataDirection
specifies whether the data for a JKQTPSingleColumnGraph represent x-axis or y-axis values
Definition jkqtpgraphsbase.h:891
This virtual JKQTPGraph descendent may be used as base for all graphs that use at least one column th...
Definition jkqtpgraphsbase.h:1119
DataSortOrder
specifies how to sort the data in a JKQTPXGraph before drawing
Definition jkqtpgraphsbase.h:1128
virtual bool getIndexRange(int &imin, int &imax) const
determines the range of row indexes available in the data columns of this graph
This virtual JKQTPGraph descendent extends JKQTPXYGraph to two columns for x-values (e....
Definition jkqtpgraphsbase.h:812
virtual int getKey2Column() const
returns the column used as "key" for the current graph (typically this call getXColumn(),...
void setXColumn2(int __value)
the column that contains the second y-component of the datapoints
virtual bool getIndexRange(int &imin, int &imax) const override
determines the range of row indexes available in the data columns of this graph
int getXColumn2() const
the column that contains the second y-component of the datapoints
virtual void setKey2Column(int __value)
sets the column used as "key" for the current graph (typically this call setXColumn(),...
virtual bool getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) override
get the maximum and minimum x-value of the graph
void setXXYColumns(size_t xCol, size_t x2Col, size_t yCol)
sets xColumn, yColumn and xColumn2 at the same time
void setXColumn2(size_t __value)
the column that contains the second y-component of the datapoints
virtual double hitTest(const QPointF &posSystem, QPointF *closestSpotSystem=nullptr, QString *label=nullptr, HitTestMode mode=HitTestXY) const override
Implmentation of JKQTPPlotElement::hitTest(), which searches through all graph points defined by xCol...
JKQTPXXYGraph(JKQTBasePlotter *parent=nullptr)
class constructor
virtual bool usesColumn(int column) const override
returns true if the given column is used by the graph
void setXXYColumns(int xCol, int x2Col, int yCol)
sets xColumn, yColumn and xColumn2 at the same time
This virtual JKQTPGraph descendent extends JKQTPXYGraph with two additional columns that encode for a...
Definition jkqtpgraphsbase.h:968
double getVectorAngle(int i) const
Definition jkqtpgraphsbase.h:1046
static double getVectorAngle(const QPointF &v)
calculates the rotation angle (3 o'clock is 0) in radians of a vector v
Definition jkqtpgraphsbase.h:1041
VectorDataLayout
values from this enum indicates how to interpret the data columns provided to this graph
Definition jkqtpgraphsbase.h:972
@ AngleAndLengthLayout
Data is given in the form of an angle and a length that describe the vector together.
Definition jkqtpgraphsbase.h:974
@ DeltaXDeltaYLayout
Data is given in the form of two vector components (along x- and y-axis)
Definition jkqtpgraphsbase.h:973
virtual bool getIndexRange(int &imin, int &imax) const override
determines the range of row indexes available in the data columns of this graph
QPointF getVectorDxDy(int i) const
this function interprets vectorDataLayout together with (dxColumn, dyColumn) or (angleColumn,...
double getVectorMagnitude(int i) const
Definition jkqtpgraphsbase.h:1037
This virtual JKQTPGraph descendent extends JKQTPXYGraph adds a baseline-property, which is necessary,...
Definition jkqtpgraphsbase.h:712
bool getMinMaxWithErrorsAndBaseline(int dataColumn, int errorColumn, int errorColumnLower, bool errorSymmetric, double &minv, double &maxv, double &smallestGreaterZero)
can be called by JKQTPGraph::getXMinMax() or JKQTPGraph::getYMinMax() calculates min/max/....
double getBaseline() const
baseline of the plot (NOTE: 0 is interpreted as until plot border in log-mode!!!)
double getErrorU(int i, const JKQTPDatastore *ds, int xErrorColumn) const
returns the upper error for the i-th datapoint, read from datastore ds
void setBaseline(double __value)
baseline of the plot (NOTE: 0 is interpreted as until plot border in log-mode!!!)
double getErrorL(int i, const JKQTPDatastore *ds, int xErrorColumn, int xErrorColumnLower, bool xErrorSymmetric) const
returns the lower error for the i-th datapoint, read from datastore ds
JKQTPXYBaselineGraph(JKQTBasePlotter *parent=nullptr)
class constructor
double m_baseline
baseline of the plot (NOTE: 0 is interpreted as until plot border in log-mode!!!)
Definition jkqtpgraphsbase.h:738
bool getMinMaxWithBaseline(int dataColumn, double &minv, double &maxv, double &smallestGreaterZero)
can be called by JKQTPGraph::getXMinMax() or JKQTPGraph::getYMinMax() calculates min/max/....
This virtual JKQTPGraph descendent may be used as base for all graphs that use at least two columns t...
Definition jkqtpgraphsbase.h:586
virtual void intSortData()
sorts data according to the specified criterion in sortData ... The result is stored as a index-map i...
void setXColumn(size_t __value)
the column that contains the x-component of the datapoints
void setXYColumns(QPair< size_t, size_t > xyColPair)
sets xColumn and yColumn at the same time
void setDataSortOrder(int __value)
if !=Unsorted, the data is sorted before plotting
QVector< int > sortedIndices
this array contains the order of indices, in which to access the data in the data columns
Definition jkqtpgraphsbase.h:681
void setYColumn(int __value)
the column that contains the y-component of the datapoints
void setXColumn(int __value)
the column that contains the x-component of the datapoints
int getDataIndex(int i) const
returns the index of the i-th datapoint (where i is an index into the SORTED datapoints)
Definition jkqtpgraphsbase.h:691
void setDataSortOrder(DataSortOrder __value)
if !=Unsorted, the data is sorted before plotting
DataSortOrder
specifies how to sort the data in a JKQTPXYGraph before drawing
Definition jkqtpgraphsbase.h:595
virtual bool getIndexRange(int &imin, int &imax) const
determines the range of row indexes available in the data columns of this graph
virtual void setValueColumn(int __value)
sets the column used as "value" for the current graph (typically this call setXColumn(),...
virtual void setKeyColumn(int __value)
sets the column used as "key" for the current graph (typically this call setXColumn(),...
void setYColumn(size_t __value)
the column that contains the y-component of the datapoints
void setXYColumns(QPair< int, int > xyColPair)
sets xColumn and yColumn at the same time
This virtual JKQTPGraph descendent extends JKQTPXYGraph to two columns for y-values (e....
Definition jkqtpgraphsbase.h:754
void setXYYColumns(size_t xCol, size_t yCol, size_t y2Col)
sets xColumn, yColumn and yColumn2 at the same time
void setYColumn2(size_t __value)
the column that contains the second y-component of the datapoints
virtual int getValue2Column() const
returns the column used as secondary "value" for the current graph (typically this call getXColumn(),...
virtual bool getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) override
get the maximum and minimum y-value of the graph
virtual bool getIndexRange(int &imin, int &imax) const override
determines the range of row indexes available in the data columns of this graph
void setXYYColumns(int xCol, int yCol, int y2Col)
sets xColumn, yColumn and yColumn2 at the same time
int getYColumn2() const
the column that contains the second y-component of the datapoints
virtual double hitTest(const QPointF &posSystem, QPointF *closestSpotSystem=nullptr, QString *label=nullptr, HitTestMode mode=HitTestXY) const override
Implmentation of JKQTPPlotElement::hitTest(), which searches through all graph points defined by xCol...
virtual void setValue2Column(int __value)
sets the column used as secondary "value" for the current graph (typically this call setXColumn(),...
virtual bool usesColumn(int column) const override
returns true if the given column is used by the graph
void setYColumn2(int __value)
the column that contains the second y-component of the datapoints
JKQTPXYYGraph(JKQTBasePlotter *parent=nullptr)
class constructor
plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing)
Definition jkqtplotter.h:364
JKQTPCoordinateAxes
named references for different oordinate axes in the plot
Definition jkqtpcoordinateaxes.h:42
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
Dataset for a single point on the graph, associated with its data-column index and a label that can b...
Definition jkqtpgraphsbase.h:205
QPointF pos
position of the hit-test point
Definition jkqtpgraphsbase.h:212
HitTestLocation(double x_, double y_, const QString &label_)
Definition jkqtpgraphsbase.h:207
int index
index of the hit-test point in the linked data-columns (or -1)
Definition jkqtpgraphsbase.h:214
QString label
label for that specific hit-test point
Definition jkqtpgraphsbase.h:216
HitTestLocation(const QPointF &pos_, int index_, const QString &label_)
Definition jkqtpgraphsbase.h:210
HitTestLocation(double x_, double y_, int index_, const QString &label_)
Definition jkqtpgraphsbase.h:209
HitTestLocation()
Definition jkqtpgraphsbase.h:206
HitTestLocation(const QPointF &pos_, const QString &label_)
Definition jkqtpgraphsbase.h:208