[vtkusers] Displaying plot legends in Charts

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri Apr 22 17:40:40 EDT 2011


On Fri, Apr 22, 2011 at 10:52 AM, Jenya Burstein <taijinian at gmail.com> wrote:
> Marcus,
>
> Thank you for the response.
>
> Which path would be easier?
>   - Add the interactivity behavior for vtkCharLegend;
>   - Create a vtk widget for vtkLegendBoxActor

Interactivity in vtkChartLegend.
>
> Another potential feature, that I am thinking ahead, is the ability to
> display multiple legends. For example, one legend box for colors and another
> separate box for symbol shapes. As far as I can tell, vtkChart, currently,
> doesn't support multiple legends. If it is possible to place a
> vtkLegendBoxActor into a vtkContextView, the multiple legend box feature
> would become instantly available.
>
The chart is actually just using the 2D context scene in VTK 5.8+, and
so you can add whatever you like to that scene (including additional
legends). This could be done in the vtkChartXY derived class for
example.

Marcus



More information about the vtkusers mailing list