[vtkusers] Hide legends for plots in vtkChartXY

Joseph Melnyk JMelnyk at pile.com
Tue Mar 29 09:23:13 EDT 2011


Have you tried sub-classing vtkChartLegend and overriding the Paint function to include this behavior?  Perhaps add a flag indicating whether or not a plot should be drawn and then check it for each plot, as you paint?



From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Carsten Panch Pedersen
Sent: Thursday, March 24, 2011 9:24 AM
To: vtkusers at vtk.org
Subject: [vtkusers] Hide legends for plots in vtkChartXY

Hi everyone,

I'm using a vtkChartXY to display some plots. On the vtkChartXY I can choose to show legends (SetShowLegend(true)). Apparently, I cannot select which plots to show the legends for. Either it's all or none.

Is it possible to hide the legends for specific plots? I could set the plot label to an empty string, but it still leaves drawing of the plot color. I would like to remove it altogether.

__Scanned by MessageLabs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110329/fb3ab653/attachment.htm>


More information about the vtkusers mailing list