<!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>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=673322608-15092010>Hi</SPAN></DIV>
<DIV><SPAN class=673322608-15092010></SPAN>&nbsp;</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)&nbsp;of a region. So 
i want to display the name of the region on&nbsp;horizontal&nbsp;axis and and 
the value on vertical.</SPAN></DIV>
<DIV><SPAN class=673322608-15092010></SPAN>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=673322608-15092010></SPAN>&nbsp;</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>&nbsp;</P>
<P>QBoxLayout* poLayout = <FONT color=#0000ff><FONT 
color=#0000ff>new</FONT></FONT> QBoxLayout(QBoxLayout::Direction::TopToBottom, 
m_poDialog);</P>
<P>poLayout-&gt;addWidget(m_poChartWidget);</P>
<P>
<P></P>m_poArea = m_poChartWidget-&gt;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-&gt;insertLayer( m_poArea-&gt;getAxisLayerIndex(), m_poBarChart 
);</P>
<P>&nbsp;</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-&gt;setChartLegend(poLegend);</P>
<P>poManager-&gt;setChartArea(m_poArea);</P>
<P>m_poChartWidget-&gt;setLegend(poLegend);</P>
<P>&nbsp;</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-&gt;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-&gt;setMousePressModifiers(Qt::ControlModifier, 
Qt::ControlModifier);</P>
<P>poHandler-&gt;setLayer(m_poBarChart);</P>
<P>poSelector-&gt;addHandler(poHandler);</P>
<P>poSelector-&gt;setSelectionMode(<FONT color=#a31515><FONT color=#a31515>"Bar 
Chart - Bars"</FONT></FONT>);</P>
<P>vtkQtChartInteractorSetup::setupDefaultKeys(m_poArea-&gt;getInteractor());</P>
<P><FONT color=#008000><FONT color=#008000><FONT 
color=#000000></FONT>&nbsp;</P></FONT></FONT>
<P><FONT color=#008000><FONT color=#008000>// Hide the x-axis 
grid.</P></FONT></FONT>
<P>vtkQtChartAxisLayer *axisLayer = m_poArea-&gt;getAxisLayer();</P>
<P>vtkQtChartAxis *xAxis = axisLayer-&gt;getAxis(vtkQtChartAxis::Bottom);</P>
<P>xAxis-&gt;getOptions()-&gt;setGridVisible(<FONT color=#0000ff><FONT 
color=#0000ff>false</FONT></FONT>);</P>
<P>xAxis-&gt;getOptions()-&gt;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-&gt;setModel(m_poTable);</P>
<P>&nbsp;</P>
<P>QStandardItemModel *poModel = qobject_cast&lt;QStandardItemModel 
*&gt;(m_poTable-&gt;getItemModel());</P>
<P><FONT color=#0000ff><FONT color=#0000ff>if</FONT></FONT>(poModel)</P>
<P>{</P>
<P><SPAN class=673322608-15092010>&nbsp;&nbsp;&nbsp; 
</SPAN>m_poTable-&gt;setItemModel(0);</P>
<P><FONT color=#0000ff><SPAN class=673322608-15092010>&nbsp;&nbsp;&nbsp; 
</SPAN>delete</FONT> poModel;</P>
<P>}</P>
<P></P>
<P><FONT color=#0000ff><FONT color=#0000ff>int</FONT></FONT> iRows = 
poInput-&gt;GetVoluminaChanges()-&gt;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-&gt;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 &lt; iRows; 
nRow++)</P>
<P>{<FONT color=#008000><FONT color=#008000></P></FONT></FONT>
<P><SPAN class=673322608-15092010>&nbsp;&nbsp;&nbsp; 
</SPAN>poModel-&gt;setVerticalHeaderItem(nRow, <FONT color=#0000ff><FONT 
color=#0000ff>new</FONT></FONT> QStandardItem));</P>
<P><SPAN class=673322608-15092010>&nbsp;&nbsp;&nbsp; 
</SPAN>poModel-&gt;verticalHeaderItem(nRow)-&gt;setData(QVariant((<FONT 
color=#0000ff><FONT color=#0000ff>int</FONT></FONT>)nRow), Qt::DisplayRole);</P>
<P>}</P>
<P>poModel-&gt;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>&nbsp;</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 &lt; iRows; 
nRow++)</P>
<P>{</P>
<P><SPAN class=673322608-15092010>&nbsp;&nbsp;&nbsp; 
</SPAN>poModel-&gt;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>&nbsp;&nbsp;&nbsp; 
</SPAN>poModel-&gt;item(nRow, 0)-&gt;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-&gt;setItemModel(poModel);</P>
<P>m_poDialog-&gt;show(); </P>
<P>&nbsp;</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>