56 Q_PROPERTY(QString xTitle READ xTitle WRITE setXTitle)
57 Q_PROPERTY(QString yTitle READ yTitle WRITE setYTitle)
58 Q_PROPERTY(
int xTicksAngle READ xTicksAngle WRITE setXTicksAngle)
62 void setYTitle(QString yTitle);
63 inline QString yTitle()
const {
return myYTitle; }
64 void setXTitle(QString xTitle);
65 inline QString
xTitle()
const {
return myXTitle; }
66 void setXTicksAngle(
int angle);
75 int xTicksAngle()
const;
77 void setXTicks(
const QList<QVariant> xTicks);
78 void setYTicks(
const QList<QVariant> yTicks);
81 void drawChart(QPainter *painter, QRect viewPort);
85 void mouseMoveEvent(QMouseEvent * event);
88 float linearInterpolation(
const float dy,
const float x1,
const float x0,
const float y0,
const float x)
const;
102 #endif // ECHARTLINE_H
virtual void drawChart(QPainter *painter, QRect viewPort)=0
Function to draw the chart.
int myXTicksAngle
Definition: echartline.h:99
Base class for ECharts.To add values, call addDataSet(). How the values are treated or how many data ...
Definition: echartbase.h:56
qreal currentYValue
Definition: echartline.h:98
QList< QVariant > yTicks
Definition: echartline.h:91
A EWidget to display line chartsThe title of the whole chart can be set by setTitle(). Afterwards set the title of the x- (setXTitle()) and y-axis (setYTitle()). Now configure the x- and y-axis with setXTicks() and setYTicks(). The chart is configured now and you can add lines with addDataSet(). Make sure, that the values are added in the order of x- and y-ticks. If x-ticks and y-ticks are not numeric, x- and y-values can only contain exactly the values from x-ticks and y-ticks.
Definition: echartline.h:53
QString xTitle() const
Definition: echartline.h:65
QMap< QString, QList< QPointF > > linesDrawn
Definition: echartline.h:96
QPoint origin
Definition: echartline.h:97
#define E_CHARTS_EXPORT
Definition: echarts.h:31
QString myYTitle
Definition: echartline.h:90
bool yNumeric
Definition: echartline.h:92