##// END OF EJS Templates
Title and name of QSeries replaced with name
Title and name of QSeries replaced with name

File last commit:

r694:08035ff71c15
r731:90a16700f8b3
Show More
stackedbarchartitem.cpp
84 lines | 2.5 KiB | text/x-c | CppLexer
/ src / barchart / stackedbarchartitem.cpp
sauimone
combined barpresenterbase and barpresenter. renamed barchartpresenters to barchartitems
r666 #include "stackedbarchartitem_p.h"
sauimone
renamed bar.h to bar_p.h
r118 #include "bar_p.h"
sauimone
Floating values to bar charts
r263 #include "barvalue_p.h"
sauimone
Added pen & brush to QBarSet
r214 #include "qbarset.h"
sauimone
added missing example files :)
r96 #include <QDebug>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactors chartitem...
r677 StackedBarChartItem::StackedBarChartItem(QBarSeries *series, ChartPresenter *presenter) :
BarChartItem(series,presenter)
sauimone
added missing example files :)
r96 {
}
sauimone
combined barpresenterbase and barpresenter. renamed barchartpresenters to barchartitems
r666 StackedBarChartItem::~StackedBarChartItem()
sauimone
updating drilldown example. Needs some more thinking
r438 {
}
sauimone
animations to stacked and percent barchart
r694 QVector<QRectF> StackedBarChartItem::calculateLayout()
sauimone
added missing example files :)
r96 {
sauimone
animations to stacked and percent barchart
r694 QVector<QRectF> layout;
sauimone
Fixed layout for barcharts
r473 // Use temporary qreals for accurancy (we might get some compiler warnings... :)
Michal Klocek
Refactors barchart axis hadnling...
r679
sauimone
moved tooltip to presenter
r288 qreal maxSum = mSeries->maxCategorySum();
sauimone
barchart domain fix
r674 // Domain:
if (mDomainMaxY > maxSum) {
maxSum = mDomainMaxY;
}
Michal Klocek
Refactors barchart axis hadnling...
r679 qreal height = geometry().height();
qreal width = geometry().width();
qreal scale = (height / mSeries->maxCategorySum());
qreal categotyCount = mSeries->categoryCount();
qreal barWidth = width / (categotyCount *2);
qreal xStep = width/categotyCount;
qreal xPos = xStep/2 - barWidth/2;
sauimone
Fixed layout for barcharts
r473 int itemIndex(0);
Michal Klocek
Refactors barchart axis hadnling...
r679 for (int category = 0; category < categotyCount; category++) {
qreal yPos = height;
sauimone
review fixes. countCategories() -> categoryCount(). countSets -> barsetCount()
r366 for (int set=0; set < mSeries->barsetCount(); set++) {
sauimone
moved tooltip to presenter
r288 qreal barHeight = mSeries->valueAt(set, category) * scale;
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 Bar* bar = mBars.at(itemIndex);
Tero Ahola
Bar series to use theme base colors. Pie brush minor fix....
r661 bar->setPen(mSeries->barsetAt(set)->pen());
sauimone
review fix: Removed iterator from barseries. Remove const from brush and pen. Renamed setters for tooltip, floating values and separators
r357 bar->setBrush(mSeries->barsetAt(set)->brush());
sauimone
animations to stacked and percent barchart
r694 QRectF rect(xPos,yPos-barHeight,barWidth,barHeight);
layout.append(rect);
sauimone
added missing example files :)
r96 itemIndex++;
sauimone
Some fixes to bar charts. Now bars draw almost correctly
r97 yPos -= barHeight;
sauimone
added missing example files :)
r96 }
sauimone
fixing layout bug on stacked bar chart
r98 xPos += xStep;
sauimone
added missing example files :)
r96 }
sauimone
cleanup on barseries. removed old commented out separator code
r654
sauimone
Floating values to bar charts
r263 // Position floating values
itemIndex = 0;
Michal Klocek
Refactors barchart axis hadnling...
r679 xPos = (width/categotyCount);
sauimone
review fixes. countCategories() -> categoryCount(). countSets -> barsetCount()
r366 for (int category=0; category < mSeries->categoryCount(); category++) {
Michal Klocek
Refactors barchart axis hadnling...
r679 qreal yPos = height;
sauimone
review fixes. countCategories() -> categoryCount(). countSets -> barsetCount()
r366 for (int set=0; set < mSeries->barsetCount(); set++) {
sauimone
moved tooltip to presenter
r288 qreal barHeight = mSeries->valueAt(set,category) * scale;
sauimone
Floating values to bar charts
r263 BarValue* value = mFloatingValues.at(itemIndex);
sauimone
better use of gradients in barcharts
r512 QBarSet* barSet = mSeries->barsetAt(set);
value->resize(100,50); // TODO: proper layout for this.
sauimone
updated barchart examples. minor fixes
r276 value->setPos(xPos, yPos-barHeight/2);
sauimone
better use of gradients in barcharts
r512 value->setPen(barSet->floatingValuePen());
sauimone
Floating values to bar charts
r263
sauimone
moved tooltip to presenter
r288 if (mSeries->valueAt(set,category) != 0) {
value->setValueString(QString::number(mSeries->valueAt(set,category)));
sauimone
updated barchart examples. minor fixes
r276 } else {
value->setValueString(QString(""));
}
sauimone
Floating values to bar charts
r263
itemIndex++;
yPos -= barHeight;
}
xPos += xStep;
sauimone
prototyping separators with stacked bars
r119 }
sauimone
animations to stacked and percent barchart
r694 return layout;
sauimone
added missing example files :)
r96 }
sauimone
combined barpresenterbase and barpresenter. renamed barchartpresenters to barchartitems
r666 #include "moc_stackedbarchartitem_p.cpp"
sauimone
moved tooltip to presenter
r288
sauimone
added missing example files :)
r96 QTCOMMERCIALCHART_END_NAMESPACE