Thanks Marcus , it works <br><br>I do have one more question though . Is there any way to change the tooltip? I mean that when you hover the mouse on the line, I get the x and y axis value of the point. Since I have custom labels for the X axis, can I also modify the tooptip value to reflect that label.<br>
<br>Regards<br>Darshan<br><br><div class="gmail_quote">On Wed, Mar 14, 2012 at 9:57 AM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com">marcus.hanwell@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sun, Mar 11, 2012 at 5:52 PM, Darshan Pai <<a href="mailto:darshanpai@gmail.com">darshanpai@gmail.com</a>> wrote:<br>
> I have a a set of Ids which are strings . Sample :- ( FP1,FP2.....<br>
> FP10,AP1,AP2....AP10) etc<br>
> For each ID I have a double value .<br>
> I want to map the strings to the X-axis in the same order that I see the<br>
> strings. I have all this information in a vtkTable.<br>
> How do I arrange the vtkChartXY to do precisely this .<br>
><br>
</div></div>Any axis on a chart can have custom labels. I notice now that there is<br>
no test, but this can be done from ParaView for example.<br>
<br>
vtkAxis *axis = chart->GetAxis(vtkAxis::BOTTOM);<br>
axis->SetBehavior(vtkAxis::CUSTOM);<br>
axis->SetTickPositions(positions);<br>
axis->SetTickLabels(labels);<br>
<br>
You would need a vtkDoubleArray with the label positions, and a<br>
vtkStringArray with the custom labels. They should both be of the same<br>
length.<br>
<br>
Thanks,<br>
<br>
Marcus<br>
</blockquote></div><br>