Files
openobserve/web
ktx-vaidehi 776e427657 fix: dashboard if no label, remove unnecessary space (#7577)
### **PR Type**
Enhancement


___

### **Description**
- Remove redundant label validations in dashboard builders

- Introduce axis name flags in convertSQLData

- Dynamically adjust grid.left based on Y axis existence

- Refine grid.bottom spacing logic for X axis and legends


___

### **Changes diagram**

```mermaid
flowchart LR
  A["Dashboard Query Builders"] -- "Remove validation rules" --> B["Cleaned validation logic"]
  C["convertSQLData"] -- "Detect axis labels" --> D["hasXAxisName/hasYAxisName flags"]
  D -- "Apply spacing rules" --> E["Dynamic grid margins"]
```


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>DashboardGeoMapsQueryBuilder.vue</strong><dd><code>Remove
field label validations in GeoMaps builder</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/addPanel/DashboardGeoMapsQueryBuilder.vue

<li>Removed <code>:rules</code> for latitude label<br> <li> Removed
<code>:rules</code> for longitude label<br> <li> Removed
<code>:rules</code> for weight label


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7577/files#diff-3b97eb04cae0673539b1d0112d23bbbf4048b453c623c1640a9ceeecf50ec99b">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>DashboardMapsQueryBuilder.vue</strong><dd><code>Drop
label validations in Maps query builder</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/components/dashboards/addPanel/DashboardMapsQueryBuilder.vue

<li>Removed <code>:rules</code> for name label<br> <li> Removed
<code>:rules</code> for value_for_maps label


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7577/files#diff-f07786c7f9c6d797af04eeb9a16d9a6b954b000c793265849aeba406bd750b9e">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>DashboardQueryBuilder.vue</strong><dd><code>Clear label
validations in core query builder</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/addPanel/DashboardQueryBuilder.vue

<li>Removed <code>:rules</code> for X field labels<br> <li> Removed
<code>:rules</code> for breakdown field labels<br> <li> Removed
<code>:rules</code> for Y and Z field labels


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7577/files#diff-a4f9abbeaad1156ab6ba5740d59ccb869d6a9172ca1c64b89cff78f3d7783409">+0/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>DashboardSankeyChartBuilder.vue</strong><dd><code>Remove
label validation in Sankey builder</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/addPanel/DashboardSankeyChartBuilder.vue

<li>Removed <code>:rules</code> for source label<br> <li> Removed
<code>:rules</code> for target label<br> <li> Removed
<code>:rules</code> for value label


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7577/files#diff-b8cd4e5c2b67e186c7bb233b699fe7c9c7ebc8ed6f411945e9670908e1329427">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>convertSQLData.ts</strong><dd><code>Update grid spacing
logic for axis labels</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/utils/dashboard/convertSQLData.ts

<li>Added <code>hasXAxisName</code> and <code>hasYAxisName</code>
flags<br> <li> Adjusted <code>grid.left</code> based on Y axis label
existence<br> <li> Refined <code>grid.bottom</code> calculation for X
axis and legends


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7577/files#diff-88c0e865040a20b2c8bb7d77e7f6bd187a5b07c1645c120223bc9d59603752c3">+23/-11</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-07-17 12:22:18 +05:30
..
2023-02-02 09:03:11 +05:30
2024-05-09 18:46:48 +05:30
2023-08-06 01:29:13 +08:00
2023-02-02 09:03:11 +05:30
2023-02-02 09:03:11 +05:30
2023-02-02 09:03:11 +05:30
2024-04-03 12:49:25 +05:30
2023-02-02 09:03:11 +05:30

web

This template should help get you started developing with Vue 3 in Vite.

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

For stand-alone UI development environment, create .env file and which contains below environment variable

VITE_OPENOBSERVE_ENDPOINT=http://localhost:5080/
npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Cypress

npm run test:e2e:dev

This runs the end-to-end tests against the Vite development server. It is much faster than the production build.

But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):

npm run build
npm run test:e2e

Lint with ESLint

npm run lint