add bars support to gi

same as graphs but also provides solid background under lines
This commit is contained in:
2016-04-16 03:23:28 +03:00
parent d30df9dafc
commit 0e3f83f361
5 changed files with 47 additions and 7 deletions

View File

@ -116,6 +116,11 @@ QString GraphicalItem::image(const QVariant &value)
m_helper->paintGraph(converted);
// direction option is not recognized by this GI type
break;
case Bars:
m_helper->paintBars(converted);
// direction option is not recognized by this GI type
scale[1] = -1;
break;
case Horizontal:
default:
m_helper->paintHorizontal(converted);
@ -198,6 +203,9 @@ QString GraphicalItem::strType() const
case Graph:
value = QString("Graph");
break;
case Bars:
value = QString("Bars");
break;
case Horizontal:
default:
value = QString("Horizontal");
@ -331,6 +339,8 @@ void GraphicalItem::setStrType(const QString _type)
setType(Circle);
else if (_type == QString("Graph"))
setType(Graph);
else if (_type == QString("Bars"))
setType(Bars);
else
setType(Horizontal);
}