QSint Charts
Qt Widgets
Score 52%
Description:

BarChartPlotter is a simple Bar Chart plotting widget.

This is a technical preview only - BarChartPlotter will be included into QSint::Charts library.

BarChartPlotter provides easy-to-use API and performs fast \"native\" painting (directly via QPainter).

Currently it allows to draw Bar Charts of 2 types: Stacked and Column.

BarChartPlotter follows MVC ideology using QAbstractItemModel as data source.

Karbofos

5 years ago

Hello!
Many thanks for this project. :)
My question: i try to colorize the separate items of the chart, for example:

itemModel->setData(itemModel->index(i, j), Qt::red, Qt::BackgroundRole);

or
itemModel->setData(itemModel->index(i, j), Qt::blue, Qt::ForegroundRole);

and the objects are not colorized. what is wrong?
thank you!

Report

Karbofos

5 years ago

all right, i solved it.
replaced in BarChartPlotter::drawContent

// QPen pen(qvariant_cast<QColor>(m_model->headerData(j, Qt::Vertical, Qt::ForegroundRole)));
// QBrush brush(qvariant_cast<QBrush>(m_model->headerData(j, Qt::Vertical, Qt::BackgroundRole)));
QPen pen(qvariant_cast<QColor>(m_model->data(m_model->index(j,i), Qt::ForegroundRole)));
QBrush brush(qvariant_cast<QBrush>(m_model->data(m_model->index(j,i), Qt::BackgroundRole)));

this solution i need for colorized displaing of percent information, f. ex: about 35% is red and so on

Report

product-maker Karbofos Aug 02 2012

product-maker 6 6

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.1.1
updated Mar 24 2011
added Mar 20 2011
downloads today
0
page views today 1