# Can I define the position of widgets on the dashboard by altering javascript?

**URL:** https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567
**Category:** Dashboard
**Created:** [4 October 2022 18:10 UTC](https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567 "2022-10-04T18:10:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![DaveBriggs](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@DaveBriggs](https://discourse.nodered.org/u/DaveBriggs)
#### Post date: [4 October 2022 18:10 UTC](https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567/1 "2022-10-04T18:10:55Z")

</div>

I have two gauges and two charts, however 'layout' does not work properly. v3.0.2 I have tried using both RasPi & Windows platforms. I want to reposition widgets, layout is acting very strangely. Should I resort to using node.js explicitly ?

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [4 October 2022 18:31 UTC](https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567/2 "2022-10-04T18:31:33Z")

</div>

Hi Dave, you need to be a bit more descriptive than "does not work properly" and "layout is acting very strangely", if you want support with your issue 😉

---

<div class="post-metadata">

### Author: ![DaveBriggs](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@DaveBriggs](https://discourse.nodered.org/u/DaveBriggs)
#### Post date: [5 October 2022 08:06 UTC](https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567/3 "2022-10-05T08:06:48Z")

</div>

I have two MQTT messages, each of which has two widgets, a gauge & chart, see screen capture

> **[Screenshot](https://prnt.sc/CrqRM4j51rgq)**
>
> Captured with Lightshot

The gauges are 4x4 - [Screenshot by Lightshot](https://prnt.sc/rfXJiwYkpcTm)  
and charts are 20x10 - [Screenshot by Lightshot](https://prnt.sc/XHE4u_q-cMBs)  
I want to position the gauges to the left, one above the other, and the charts alongside to the right  
Layout editor shows - [Screenshot by Lightshot](https://prnt.sc/39NmiusVju4F)  
and this is the actual Dashboard - [Screenshot by Lightshot](https://prnt.sc/PTSgwK_mrJOo)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [5 October 2022 08:18 UTC](https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567/4 "2022-10-05T08:18:28Z")

</div>

The layout editor does seem to fall down when the dashboard is wider than a certain size. (not sure how big)  
Your layout screen capture seems to be 40 units wide. That's a) probably wide enough to upset the layout editor and b) not wide enough to place a 4 unit widget and two 20 unit widgets side by side.

You could try creating a new group 4 units wide for the gauges.

---

<div class="post-metadata">

### Author: ![DaveBriggs](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@DaveBriggs](https://discourse.nodered.org/u/DaveBriggs)
#### Post date: [5 October 2022 08:46 UTC](https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567/5 "2022-10-05T08:46:40Z")

</div>

The layout editor is OK @ 30 units wide, but is 'messed up' @ 32 units wide

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [4 November 2022 08:46 UTC](https://discourse.nodered.org/t/can-i-define-the-position-of-widgets-on-the-dashboard-by-altering-javascript/68567/6 "2022-11-04T08:46:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
