[vtkusers] Set the Color of each line in vtkChartParallelCoordinates

Matthias Eggert besessener at gmx.net
Tue Nov 22 10:18:45 EST 2011


> Hi Matthias,
> 
> You cannot downcast a chart to a plotplots; they are two different types.
> 
> You need to add the points to the chart, and then cast the PlotPlot e.g.
> 
>   vtkPlotPoints *tmp = vtkPlotPoints::SafeDownCast( 
> chart->AddPlot(vtkChart::POINTS) );
> 
> Hope that helps,
> Jon
> _______________________________________________
> 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
> 
> 

Hi Jon and thanks for your reply.
I already added a table to the chart with: chart->GetPlot(0)->SetInput(table);
So my line would be: vtkPlotPoints *tmp = vtkPlotPoints::SafeDownCast( chart-
>getPlot(0) );  right?

When I do this, I still get an exception at: tmp->SetLookupTable(lookupTable);

And then i wouldn't know how to add my "tmp" variable to my view scene. view-
>GetScene()->AddItem(tmp); does not work either :( since tmp has a wrong class 
type.

Bye,
Matthias






More information about the vtkusers mailing list