<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE>BODY {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana
}
PRE {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
BLOCKQUOTE {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
A {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
MENU {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DD {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
UL {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DT {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DIR {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
ADDRESS {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H5 {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H6 {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
HR {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
P {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
TD {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
TR {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
P.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
LI.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DIV.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
LI {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
UL {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
OL {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H1 {
        FONT-SIZE: 16pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
H2 {
        FONT-SIZE: 14pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-STYLE: italic; FONT-FAMILY: Verdana,Arial,sans-serif
}
H3 {
        FONT-SIZE: 12pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
H4 {
        FONT-SIZE: 11pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
</STYLE>
<META name=GENERATOR content="MSHTML 8.00.7600.16625"></HEAD>
<BODY style="FONT-FAMILY: Verdana; COLOR: #000000; FONT-SIZE: 10pt" id=ridBody
background="">
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><SPAN class=673322608-15092010>Hi</SPAN></DIV>
<DIV><SPAN class=673322608-15092010></SPAN> </DIV>
<DIV><SPAN class=673322608-15092010>I want to make a 2D bar chart whereby the
bars specify the ammount of volumina change (double value) of a region. So
i want to display the name of the region on horizontal axis and and
the value on vertical.</SPAN></DIV>
<DIV><SPAN class=673322608-15092010></SPAN> </DIV>
<DIV><SPAN class=673322608-15092010>I already made it with vtkQtBarChart but i
have no idea how i could display text on horizontal axis, here my
code:</SPAN></DIV>
<DIV><SPAN class=673322608-15092010></SPAN> </DIV>
<DIV><SPAN class=673322608-15092010></SPAN> </DIV>
<DIV><SPAN class=673322608-15092010>
<P>m_poDialog = <FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
QDialog;</P>
<P>m_poChartWidget = <FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
vtkQtChartWidget(m_poDialog);</P>
<P> </P>
<P>QBoxLayout* poLayout = <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> QBoxLayout(QBoxLayout::Direction::TopToBottom,
m_poDialog);</P>
<P>poLayout->addWidget(m_poChartWidget);</P>
<P>
<P></P>m_poArea = m_poChartWidget->getChartArea();</P>
<P>m_poBarChart = <FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
vtkQtBarChart();<FONT color=#008000><FONT color=#008000></P></FONT></FONT>
<P>m_poArea->insertLayer( m_poArea->getAxisLayerIndex(), m_poBarChart
);</P>
<P> </P>
<P>vtkQtChartLegend *poLegend = <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> vtkQtChartLegend(m_poChartWidget);</P>
<P>vtkQtChartLegendManager *poManager = <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> vtkQtChartLegendManager(poLegend);</P>
<P>poManager->setChartLegend(poLegend);</P>
<P>poManager->setChartArea(m_poArea);</P>
<P>m_poChartWidget->setLegend(poLegend);</P>
<P> </P>
<P>vtkQtChartMouseSelection *poSelector
=vtkQtChartInteractorSetup::createDefault(m_poArea);</P>
<P>vtkQtChartSeriesSelectionHandler *poHandler = <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT>
vtkQtChartSeriesSelectionHandler(poSelector);</P>
<P>poHandler->setModeNames(<FONT color=#a31515><FONT color=#a31515>"Bar Chart
- Series"</FONT></FONT>, <FONT color=#a31515><FONT color=#a31515>"Bar Chart -
Bars"</FONT></FONT>);</P>
<P>poHandler->setMousePressModifiers(Qt::ControlModifier,
Qt::ControlModifier);</P>
<P>poHandler->setLayer(m_poBarChart);</P>
<P>poSelector->addHandler(poHandler);</P>
<P>poSelector->setSelectionMode(<FONT color=#a31515><FONT color=#a31515>"Bar
Chart - Bars"</FONT></FONT>);</P>
<P>vtkQtChartInteractorSetup::setupDefaultKeys(m_poArea->getInteractor());</P>
<P><FONT color=#008000><FONT color=#008000><FONT
color=#000000></FONT> </P></FONT></FONT>
<P><FONT color=#008000><FONT color=#008000>// Hide the x-axis
grid.</P></FONT></FONT>
<P>vtkQtChartAxisLayer *axisLayer = m_poArea->getAxisLayer();</P>
<P>vtkQtChartAxis *xAxis = axisLayer->getAxis(vtkQtChartAxis::Bottom);</P>
<P>xAxis->getOptions()->setGridVisible(<FONT color=#0000ff><FONT
color=#0000ff>false</FONT></FONT>);</P>
<P>xAxis->getOptions()->setLabelsVisible(<FONT color=#0000ff><FONT
color=#0000ff>true</FONT></FONT>);</P>
<P><FONT color=#008000></FONT>
<P></P>
<P></P><FONT color=#008000><FONT color=#008000>// Set up the poModel for the bar
chart.</P></FONT></FONT>
<P>m_poTable = <FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
vtkQtChartTableSeriesModel(0, m_poBarChart);</P>
<P>m_poBarChart->setModel(m_poTable);</P>
<P> </P>
<P>QStandardItemModel *poModel = qobject_cast<QStandardItemModel
*>(m_poTable->getItemModel());</P>
<P><FONT color=#0000ff><FONT color=#0000ff>if</FONT></FONT>(poModel)</P>
<P>{</P>
<P><SPAN class=673322608-15092010>
</SPAN>m_poTable->setItemModel(0);</P>
<P><FONT color=#0000ff><SPAN class=673322608-15092010>
</SPAN>delete</FONT> poModel;</P>
<P>}</P>
<P></P>
<P><FONT color=#0000ff><FONT color=#0000ff>int</FONT></FONT> iRows =
poInput->GetVoluminaChanges()->size();<FONT color=#008000><FONT
color=#008000></P></FONT></FONT>
<P><FONT color=#008000><FONT color=#008000>// Create a new item poModel for the
file.</P></FONT></FONT>
<P>poModel = <FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
QStandardItemModel(iRows, 1, m_poTable);</P>
<P>poModel->setItemPrototype(<FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> QStandardItem());</P>
<P><FONT color=#008000><FONT color=#008000>//QStringList
oLabels;</FONT></FONT><FONT color=#008000><FONT color=#008000></P></FONT></FONT>
<P></P>
<P><FONT color=#0000ff><FONT color=#0000ff>for</FONT></FONT>(<FONT
color=#0000ff><FONT color=#0000ff>unsigned</FONT></FONT> <FONT
color=#0000ff><FONT color=#0000ff>int</FONT></FONT> nRow = 0; nRow < iRows;
nRow++)</P>
<P>{<FONT color=#008000><FONT color=#008000></P></FONT></FONT>
<P><SPAN class=673322608-15092010>
</SPAN>poModel->setVerticalHeaderItem(nRow, <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> QStandardItem));</P>
<P><SPAN class=673322608-15092010>
</SPAN>poModel->verticalHeaderItem(nRow)->setData(QVariant((<FONT
color=#0000ff><FONT color=#0000ff>int</FONT></FONT>)nRow), Qt::DisplayRole);</P>
<P>}</P>
<P>poModel->setHorizontalHeaderItem(0, <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> QStandardItem(<FONT color=#a31515><FONT
color=#a31515>"Volumina change in %"</FONT></FONT>));</P>
<P></P>
<P><FONT color=#0000ff><FONT color=#0000ff></FONT></FONT> </P>
<P><FONT color=#0000ff><FONT color=#0000ff>for</FONT></FONT>(<FONT
color=#0000ff><FONT color=#0000ff>unsigned</FONT></FONT> <FONT
color=#0000ff><FONT color=#0000ff>int</FONT></FONT> nRow = 0; nRow < iRows;
nRow++)</P>
<P>{</P>
<P><SPAN class=673322608-15092010>
</SPAN>poModel->setItem(nRow, 0, <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> QStandardItem(<FONT color=#a31515><FONT
color=#a31515>""</FONT></FONT>));</P>
<P><SPAN class=673322608-15092010>
</SPAN>poModel->item(nRow, 0)->setData(<SPAN
class=673322608-15092010>dVoluminaChange[nRow]</SPAN>, Qt::DisplayRole);</P>
<P>}</P>
<P><FONT color=#008000><FONT color=#008000>// Set the new poModel in the
chart.</P></FONT></FONT>
<P>m_poTable->setItemModel(poModel);</P>
<P>m_poDialog->show(); </P>
<P> </P>
<P><SPAN class=673322608-15092010>best regards</SPAN></P></SPAN></DIV>
<DIV align=left>
<P class=MsoNormal align=left><B><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt" lang=EN-GB>Gerald
Lodron</SPAN></B></P></DIV></BODY></HTML>