[vtkusers] Setting the X-Axis with vtkQtLineChartView ?

da remywendy at gmail.com
Tue Apr 20 16:53:49 EDT 2010


Hi folks,

I would like to set the X-Axis of a vtkQtLineChartView to correspond to the
X-Coordinate of a point while my Y-Axis corresponds to the scalar point data
at that point.

I've tried doing

vtkQtChartAxis *axis =
internals->lineChart->GetAxis(vtkQtChartAxis::Bottom);
vtkQtChartAxisModel *axisModel = axis->getModel();
axisModel->removeAllLabels();
axisModel->addLabel(QVariant((float)1500));
        ...

but it still ended up starting at 1.

Attached is a screenshot of what I have now, how can I set the X-Axis to
refer to the data's X-coordinate value instead of just an index that starts
at 1?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100420/dd226a78/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkqtlinechart.jpg
Type: image/jpeg
Size: 14073 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100420/dd226a78/attachment.jpg>


More information about the vtkusers mailing list