[vtkusers] vtkBarChartActor - FontSize() won't work
Eric E. Monson
emonson at cs.duke.edu
Fri Mar 8 10:21:12 EST 2013
Hello,
You can see if you resize the bar chart render view that all of the text and bars have automatic sizing applied to make sure everything fits in the window properly. If you want to see where in the code it happens, it's in vtkBarChartActor.cxx (VTK/Rendering/Annotation), within vtkBarChartActor::PlaceAxes().
I don't know if it would serve your needs, but VTK also has a more recent (and under current development and high performance) set of Charts classes, which includes a bar chart. Here is a link to some slides that the main developer made giving an overview from a couple years ago:
http://www.na-mic.org/Wiki/images/1/18/NA-MIC-VTK-Charts-2011.pdf
and there are a few examples here:
http://www.vtk.org/Wiki/VTK/Examples/Cxx#Plotting
Best,
-Eric
On Mar 7, 2013, at 7:24 PM, harshanand <harsha.nyshadham at gmail.com> wrote:
> I am not sure why this happening, everything works well for vtkBarChartActor
> except for FontSize(), it wont change no matter what value i give . I tried
> changing color and it works, but not the fontsize. What might be the reason?
>
> Code:
>
> vtkSmartPointer<vtkBarChartActor> BarChartactor =
> vtkSmartPointer<vtkBarChartActor>::New();
> BarChartactor->SetInput(dataobject);
> BarChartactor->SetTitle("string");
> BarChartactor->GetTitleTextProperty()->SetColor(1,1,0);
> BarChartactor->GetTitleTextProperty()->SetFontSize(20);
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkBarChartActor-FontSize-won-t-work-tp5719176.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