mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 08:34:38 +03:00
Update code
This commit is contained in:
parent
0369137800
commit
7a4b3646e3
@ -70,12 +70,7 @@ void LinesChart::drawDesignMode(QPainter* painter, qreal hStep, qreal vStep, qre
|
|||||||
|
|
||||||
qreal LinesChart::calculatePos(const AxisData &data, qreal value, qreal rectSize) const
|
qreal LinesChart::calculatePos(const AxisData &data, qreal value, qreal rectSize) const
|
||||||
{
|
{
|
||||||
if (data.reverseDirection() && data.rangeMin() >= 0) {
|
|
||||||
// Not flipping for minimum less than 0 because lower number is at the bottom.
|
|
||||||
return (1 - (data.rangeMax() - value) / data.delta()) * rectSize;
|
|
||||||
} else {
|
|
||||||
return (data.rangeMax() - value) / data.delta() * rectSize;
|
return (data.rangeMax() - value) / data.delta() * rectSize;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinesChart::paintSeries(QPainter *painter, SeriesItem *series, QRectF barsRect)
|
void LinesChart::paintSeries(QPainter *painter, SeriesItem *series, QRectF barsRect)
|
||||||
|
@ -53,16 +53,6 @@ qreal AxisData::delta() const
|
|||||||
return m_delta;
|
return m_delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AxisData::reverseDirection() const
|
|
||||||
{
|
|
||||||
return m_reverseDirection;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AxisData::setReverseDirection(bool reverseDirection)
|
|
||||||
{
|
|
||||||
m_reverseDirection = reverseDirection;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AxisData::calculateValuesAboveMax(qreal minValue, qreal maxValue, int segments)
|
void AxisData::calculateValuesAboveMax(qreal minValue, qreal maxValue, int segments)
|
||||||
{
|
{
|
||||||
const int delta = maxValue - minValue;
|
const int delta = maxValue - minValue;
|
||||||
|
@ -21,9 +21,6 @@ public:
|
|||||||
|
|
||||||
qreal delta() const;
|
qreal delta() const;
|
||||||
|
|
||||||
bool reverseDirection() const;
|
|
||||||
void setReverseDirection(bool reverseDirection);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void calculateValuesAboveMax(qreal minValue, qreal maxValue, int segments);
|
void calculateValuesAboveMax(qreal minValue, qreal maxValue, int segments);
|
||||||
|
|
||||||
@ -34,7 +31,6 @@ private:
|
|||||||
qreal m_step;
|
qreal m_step;
|
||||||
qreal m_delta;
|
qreal m_delta;
|
||||||
int m_segmentCount;
|
int m_segmentCount;
|
||||||
bool m_reverseDirection;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -171,6 +171,8 @@ void QObjectPropertyModel::translatePropertyName()
|
|||||||
tr("removeGap");
|
tr("removeGap");
|
||||||
tr("dropPrinterMargins");
|
tr("dropPrinterMargins");
|
||||||
tr("notPrintIfEmpty");
|
tr("notPrintIfEmpty");
|
||||||
|
tr("gridChartLines");
|
||||||
|
tr("horizontalAxisOnTop");
|
||||||
tr("mixWithPriorPage");
|
tr("mixWithPriorPage");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user