##// END OF EJS Templates
minor. barchart layout fix
sauimone -
r570:9f92aa7110d8
parent child
Show More
@@ -40,7 +40,7 void BarPresenter::layoutChanged()
40
40
41 int itemIndex(0);
41 int itemIndex(0);
42 for (int category=0; category < categoryCount; category++) {
42 for (int category=0; category < categoryCount; category++) {
43 qreal xPos = categoryWidth * category + categoryWidth /2;
43 qreal xPos = categoryWidth * category + categoryWidth /2 + mBarWidth/2;
44 qreal yPos = mHeight;
44 qreal yPos = mHeight;
45 for (int set = 0; set < setCount; set++) {
45 for (int set = 0; set < setCount; set++) {
46 qreal barHeight = mSeries->valueAt(set,category) * scale;
46 qreal barHeight = mSeries->valueAt(set,category) * scale;
@@ -56,7 +56,7 void BarPresenter::layoutChanged()
56 }
56 }
57
57
58 // Position separators
58 // Position separators
59 qreal xPos = categoryWidth + categoryWidth/2 - mBarWidth /2;
59 qreal xPos = categoryWidth + categoryWidth/2;
60 for (int s=0; s < mSeparators.count(); s++) {
60 for (int s=0; s < mSeparators.count(); s++) {
61 Separator* sep = mSeparators.at(s);
61 Separator* sep = mSeparators.at(s);
62 sep->setPos(xPos,0);
62 sep->setPos(xPos,0);
@@ -68,7 +68,7 void BarPresenter::layoutChanged()
68 // Position floating values
68 // Position floating values
69 itemIndex = 0;
69 itemIndex = 0;
70 for (int category=0; category < mSeries->categoryCount(); category++) {
70 for (int category=0; category < mSeries->categoryCount(); category++) {
71 qreal xPos = categoryWidth * category + categoryWidth/2 + mBarWidth/2;
71 qreal xPos = categoryWidth * category + categoryWidth/2 + mBarWidth;
72 qreal yPos = mHeight;
72 qreal yPos = mHeight;
73 for (int set=0; set < mSeries->barsetCount(); set++) {
73 for (int set=0; set < mSeries->barsetCount(); set++) {
74 qreal barHeight = mSeries->valueAt(set,category) * scale;
74 qreal barHeight = mSeries->valueAt(set,category) * scale;
General Comments 0
You need to be logged in to leave comments. Login now