##// END OF EJS Templates
fix to baranimations leaving crap on screen with negative bars
sauimone -
r1824:4fa1dedc5aa7
parent child
Show More
@@ -70,6 +70,7 int main(int argc, char *argv[])
70 QBarCategoryAxis* axis = new QBarCategoryAxis();
70 QBarCategoryAxis* axis = new QBarCategoryAxis();
71 axis->append(categories);
71 axis->append(categories);
72 chart->setAxisY(axis,series);
72 chart->setAxisY(axis,series);
73 chart->axisX(series)->setRange(-210000,210000);
73 //![4]
74 //![4]
74
75
75 //![5]
76 //![5]
@@ -51,7 +51,7 QVariant BarAnimation::interpolated(const QVariant &from, const QVariant &to, qr
51 qreal y = endVector[i].topLeft().y() + endVector[i].height() - h;
51 qreal y = endVector[i].topLeft().y() + endVector[i].height() - h;
52
52
53 QRectF value(x,y,w,h);
53 QRectF value(x,y,w,h);
54 result << value;
54 result << value.normalized();
55 }
55 }
56 return qVariantFromValue(result);
56 return qVariantFromValue(result);
57 }
57 }
@@ -52,7 +52,7 QVariant HorizontalBarAnimation::interpolated(const QVariant &from, const QVaria
52 qreal y = endVector[i].top();
52 qreal y = endVector[i].top();
53
53
54 QRectF value(x,y,w,h);
54 QRectF value(x,y,w,h);
55 result << value;
55 result << value.normalized();
56 }
56 }
57 return qVariantFromValue(result);
57 return qVariantFromValue(result);
58 }
58 }
@@ -54,7 +54,7 QVariant HorizontalPercentBarAnimation::interpolated(const QVariant &from, const
54 qreal y = endVector[i].top();
54 qreal y = endVector[i].top();
55
55
56 QRectF value(x,y,w,h);
56 QRectF value(x,y,w,h);
57 result << value;
57 result << value.normalized();
58 }
58 }
59 return qVariantFromValue(result);
59 return qVariantFromValue(result);
60 }
60 }
@@ -54,7 +54,7 QVariant HorizontalStackedBarAnimation::interpolated(const QVariant &from, const
54 qreal y = endVector[i].top();
54 qreal y = endVector[i].top();
55
55
56 QRectF value(x,y,w,h);
56 QRectF value(x,y,w,h);
57 result << value;
57 result << value.normalized();
58 }
58 }
59 return qVariantFromValue(result);
59 return qVariantFromValue(result);
60 }
60 }
@@ -54,7 +54,7 QVariant PercentBarAnimation::interpolated(const QVariant &from, const QVariant
54 qreal y = yAxis + ((endVector[i].topLeft().y() - yAxis) * progress);
54 qreal y = yAxis + ((endVector[i].topLeft().y() - yAxis) * progress);
55
55
56 QRectF value(x,y,w,h);
56 QRectF value(x,y,w,h);
57 result << value;
57 result << value.normalized();
58 }
58 }
59 return qVariantFromValue(result);
59 return qVariantFromValue(result);
60 }
60 }
@@ -53,7 +53,7 QVariant StackedBarAnimation::interpolated(const QVariant &from, const QVariant
53 qreal y = yAxis + ((endVector[i].topLeft().y() - yAxis) * progress);
53 qreal y = yAxis + ((endVector[i].topLeft().y() - yAxis) * progress);
54
54
55 QRectF value(x,y,w,h);
55 QRectF value(x,y,w,h);
56 result << value;
56 result << value.normalized();
57 }
57 }
58 return qVariantFromValue(result);
58 return qVariantFromValue(result);
59 }
59 }
General Comments 0
You need to be logged in to leave comments. Login now