# how can i draw a straight horizontal line using line widget?

**URL:** <https://discourse.vtk.org/t/how-can-i-draw-a-straight-horizontal-line-using-line-widget/8487>\
**Category:** Development\
**Created:** [May 13, 2022, 8:11am UTC](https://discourse.vtk.org/t/how-can-i-draw-a-straight-horizontal-line-using-line-widget/8487 "2022-05-13T08:11:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sneha-pk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sneha-pk/32/4216_2.png) [@Sneha-pk](https://discourse.vtk.org/u/Sneha-pk)\
**Post date:** [May 13, 2022, 8:11am UTC](https://discourse.vtk.org/t/how-can-i-draw-a-straight-horizontal-line-using-line-widget/8487/1 "2022-05-13T08:11:35Z")

</div>

I am trying to draw a line using line widget and want to set the line straight. Is the method [SetAlignToXAxis] available in vtk.js?? Also, are all of the methods mentioned in vtkLineWidget class([https://vtk.org/doc/nightly/html/classvtkLineWidget.html#aaa561f1a3cc726fdc7441a485959570a](https://vtk.org/doc/nightly/html/classvtkLineWidget.html#aaa561f1a3cc726fdc7441a485959570a)) available for use in vtk.js?

Also, is there any documentation available to learn the functioning of the methods/functions of vtk.js?

Thanks in advance for all the information…
