[vtkusers] Data not getting to chart

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Oct 18 15:28:22 EDT 2010


On Mon, Oct 18, 2010 at 11:35 AM, Barney Sperlin <bsperlinus at yahoo.com>wrote:

> Hello, beginner question:
>      Data I'm reading is not getting charted.
>      After reading a space-delimited file of stock market data I'm trying
> to view a chart of this and the chart comes out as a single straight line at
> a 45° angle.  There should be 2 lines, neither of which are straight.  I
> suspect that both are being plotted, one on top of the other.
>

You seem to be using a mixture of the old and new chart APIs. If you want to
use the new chart API then the mapper stuff and the polyline code is not
necessary. If you would like to stick with the old API then getting rid of
vtkContextView, vtkChartXY etc would be the right thing to do.


>      When I break the program in the reading loop the values appear
> correctly so I think that reading the file is not the problem.  Is the data
> getting into the table?  Debugging doesn't show it.  Is the table
> transferring properly to the chart?
>      I'm using C++ in VS 2005 Express.
>      Below is my code, largely taken from an online example:
>

Which example did you get the charting stuff from?

Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101018/3a0c024e/attachment.htm>


More information about the vtkusers mailing list