[vtkusers] multiple vtkXYChart in the same vtkRenderWindow
Eric E. Monson
emonson at cs.duke.edu
Fri Aug 20 09:00:55 EDT 2010
Hey Nicolas,
Right now there may not be an ideal solution. You can follow the example of VTK/Charts/Testing/Cxx/TestMultipleChartRenderers.cxx to place the charts in separate viewports of the same render window, and that will work fine for display. I played around with this a bit recently, but I can't get the interaction to work properly because the charts detect mouse position with respect to the corner of the window, not relative to each of the viewports separately. There may be a way to add each chart to the same viewport using a single vtkContextView and each chart's SetBorders or SetPoint1 and SetPoint2 methods, but I haven't tried this yet. I have had more luck putting all the charts in a GUI so they can be arranged in a single panel, but each can have their own render window.
Maybe someone else has more clever ideas,
-Eric
------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group
On Aug 20, 2010, at 3:47 AM, nclemeur wrote:
>
> Hello,
>
> I am beginning with vtk and I am looking at the vtkXYChart class. I am
> trying to have more than on chart in a single window. I can't really figured
> out how to go about this. I have tried creating multiple vtkContextView and
> using the same renderer/renderWindowInteractor for all the views and setting
> multiple viewport on the renderer but it keeps opening a new window for each
> vtkContextView... I am pretty sure I am not really using the good path
> here... Any idea on how to achieve that?
>
> Cheers
>
> Nicolas
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/multiple-vtkXYChart-in-the-same-vtkRenderWindow-tp2641898p2641898.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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