# Distance widget is not rendering

**URL:** <https://discourse.vtk.org/t/distance-widget-is-not-rendering/8725>\
**Category:** Development\
**Created:** [June 14, 2022, 8:47pm UTC](https://discourse.vtk.org/t/distance-widget-is-not-rendering/8725 "2022-06-14T20:47:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![makinox](https://discourse.vtk.org/user_avatar/discourse.vtk.org/makinox/32/5338_2.png) [@makinox](https://discourse.vtk.org/u/makinox)\
**Post date:** [June 14, 2022, 8:47pm UTC](https://discourse.vtk.org/t/distance-widget-is-not-rendering/8725/1 "2022-06-14T20:47:12Z")

</div>

Hello, good day, I’m trying to use the distance widget in a created volume of DICOM files, but I have a problem that i don’t understand, and it is that the distance widget is shown in some studies and in others down, I have been moving every property or method but nothing seems to work, my implementation is very standard.

```nohighlight
const initGrabWidget = (objectToGrab, selectedIndex) => {
    const grabWidget = vtkDistanceWidget.newInstance();
    grabWidget.placeWidget(objectToGrab.getBounds());
    return grabWidget;
};

const widget = initGrabWidget(api.volumes[0], currentIndex);
widgetManager.addWidget(widget);
widgetManager.enablePicking();
handleGrab(widget, currentIndex);

```

How it looks like when is working

 ![Screen Shot 2022-06-14 at 3.43.50 PM](https://discourse.vtk.org/uploads/default/original/2X/0/098b691c6efef3328dfc40f1b2406cea02adfb2d.png)

How it looks like when is not working

 ![Screen Shot 2022-06-14 at 3.45.36 PM](https://discourse.vtk.org/uploads/default/original/2X/8/8368118473f2a3baa22c6437b8f2bac3b14dd6c7.png)
