# vtkLegendScaleActor

**URL:** https://discourse.paraview.org/t/vtklegendscaleactor/9942
**Category:** Development
**Created:** [June 29, 2022, 3:52pm UTC](https://discourse.paraview.org/t/vtklegendscaleactor/9942 "2022-06-29T15:52:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fvitello](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fvitello/32/8783_2.png) [@fvitello](https://discourse.paraview.org/u/fvitello)
#### Post date: [June 29, 2022, 3:52pm UTC](https://discourse.paraview.org/t/vtklegendscaleactor/9942/1 "2022-06-29T15:52:59Z")

</div>

Dear All,

I would like to add a vtkLegendScaleActor to my paraview custom application render view, any suggestion on how to do it?

EDIT:  
I have added with the following code

```auto
 auto legendActorCube = vtkSmartPointer<vtkLegendScaleActor>::New();
    legendActorCube->LegendVisibilityOff();
    auto rw=viewCube->getViewProxy()->GetRenderWindow()->GetRenderers();
    rw->GetFirstRenderer()->AddActor(legendActorCube);

```

but the actor is displayed only when I interact with the view (and the annotation of the render view display that remote rendering is off).

Thanks

---

<div class="post-metadata">

### Author: ![Joachim\_P](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_p/32/9596_2.png) [@Joachim\_P](https://discourse.paraview.org/u/Joachim_P)
#### Post date: [July 8, 2022, 11:26am UTC](https://discourse.paraview.org/t/vtklegendscaleactor/9942/2 "2022-07-08T11:26:58Z")

</div>

Fabio,  
You are targeting the wrong discourse page/community. Please ask your question on the VTK discourse page.  
Cheers,  
J.

---

<div class="post-metadata">

### Author: ![fvitello](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fvitello/32/8783_2.png) [@fvitello](https://discourse.paraview.org/u/fvitello)
#### Post date: [July 8, 2022, 1:02pm UTC](https://discourse.paraview.org/t/vtklegendscaleactor/9942/3 "2022-07-08T13:02:55Z")

</div>

Hi Joachim,

Thanks, but my question is related on how to use vtk classes in a paraview custom application.

Fabio

---

<div class="post-metadata">

### Author: ![Joachim\_P](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_p/32/9596_2.png) [@Joachim\_P](https://discourse.paraview.org/u/Joachim_P)
#### Post date: [July 8, 2022, 10:46pm UTC](https://discourse.paraview.org/t/vtklegendscaleactor/9942/4 "2022-07-08T22:46:59Z")

</div>

My bad Fabio.  
So where do you put the code that adds the legend actor?  
Does your custom application only work in built in mode (with no connection to a remote PV server)?

j.
