[vtkusers] vtkChart

Eric E. Monson emonson at cs.duke.edu
Wed Jun 29 13:53:48 EDT 2011


(Marcus, there's a note for you towards the end.)

Just as a point of interest: After playing around a bit myself, since I don't use C++ VTK on Windows very often, it turns out that I have runtime (not build) problems with that specific LinePlot example. (Any build errors I got along the way were related to mismatched Release/Debug/etc versions between how I set up my VTK build and my example program build – decided to go with all Release for my testing.)

Running that LinePlot example just showed me a black window with no chart in it. It works fine, though, if I follow something like the Bar Chart example and change

  vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
    vtkSmartPointer<vtkRenderWindowInteractor>::New();
  renderWindowInteractor->SetRenderWindow(view->GetRenderWindow());
  renderWindowInteractor->Initialize();
  renderWindowInteractor->Start();

to 

  view->GetInteractor()->Initialize();
  view->GetInteractor()->Start();

This is with VTK git version from yesterday on Window 7 64-bit built in Release mode using Visual Studio 2010 x64 compiler option. (CMake 2.8.4 to create the VS solution.)

I think I'm going to just edit the example to lock in that change, since the first way is pretty non-standard.

Marcus, I also get some axis numbering rendering problems off and on. I'll attach an example. It persists on zooming the axis, although sometimes when the particular number that's being affected leaves the view and then comes back it's okay for a while...

-Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Win7_64_PlotNumbers.png
Type: image/png
Size: 6823 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110629/97a582b5/attachment.png>
-------------- next part --------------


On Jun 29, 2011, at 11:43 AM, Marcus D. Hanwell wrote:

> On Sun, Jun 26, 2011 at 12:09 PM, emreturkoz <emreturkoz at gmail.com> wrote:
>> Hi to all,
>> 
>> I'm a newbie to VTK and want to work with vtkCharts library using C++.
>> 
>> I'm using Visual Studio 2010.
>> 
>> Whenever I want to compile the examples listed at VTK webpage like in
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot here  , I get
>> these linking errors.
>> 
>> I linked almost all the libraries, including vtkChart and vtkHybrid. I
>> wonder the reason why these errors occur..
> 
> It would be helpful to know, as Eric said, what version of VTK you are
> using and ideally I would like to see the code. We build nightly on
> Visual Studio 2010, and the charts tests are built and linked to
> vtkCharts. I am not aware of any issues there, and would need more
> information to diagnose further.
> 
> Marcus
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list