[vtkusers] How to mark annotations in a vtkChartXY and add a label?
Natalie
natis261270 at yahoo.com
Wed Dec 21 05:20:11 EST 2011
Hi,
I have a list with annotations (time stamp + action description) belonging
to data I display in a vtkChartXY. If a user selects an annotation item with
a mouse click, the annotation should be marked in the chart with a vertical
line at the time given by the time stamp and a label with the action
description should appear at the bottom of the chart near the line.
Now I tried the following:
I determine the ymin and ymax of the plot using the GetBounds method and
create two points:
P1(time stamp, ymin)
P2(time stamp, ymax)
A new line plot is created from the table that was made from the two points
and added to the chart. The title of the y column of the table is set with
the action description.
Thus, for each annotation in the annotation list a new plot is made and the
action description is found in the chart lengend.
Is there any better way of marking annotations in a chart with existing vtk
classes?
Since this is not what I really want, I think I have to write my own classes
similar to vtkChartLegend and the vtkTootipItem classes.
Any suggestions are welcomed!
Thank you!
Natalie
--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-mark-annotations-in-a-vtkChartXY-and-add-a-label-tp5091464p5091464.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list