Skip to content

Conversation

@ktx-vaidehi
Copy link
Collaborator

Bug fix


  • Fix table chart no-data validation

  • Separate table logic from other charts

  • Ensure presence check on x/y aliases

  • Prevent false negatives with single row


flowchart LR
  Renderer["PanelSchemaRenderer.vue"]
  Charts["Non-table charts validation"]
  Table["Table-specific validation"]
  Metric["Metric validation (unchanged)"]

  Renderer -- "refine validation" --> Charts
  Renderer -- "add distinct logic" --> Table
  Renderer -- "keep existing flow" --> Metric
Loading

File Walkthrough

Relevant files
Bug fix
PanelSchemaRenderer.vue
Refine table chart data validation logic                                 

web/src/components/dashboards/PanelSchemaRenderer.vue

  • Remove table from generic chart validation branch.
  • Add table-specific data presence checks.
  • Allow single-row tables with any x/y value.
  • Keep gauge and others using stricter alias checks.
+10/-2   

Bug fix

___
- Fix table chart no-data validation

- Separate table logic from other charts

- Ensure presence check on x/y aliases

- Prevent false negatives with single row

___

```mermaid
flowchart LR
  Renderer["PanelSchemaRenderer.vue"]
  Charts["Non-table charts validation"]
  Table["Table-specific validation"]
  Metric["Metric validation (unchanged)"]

  Renderer -- "refine validation" --> Charts
  Renderer -- "add distinct logic" --> Table
  Renderer -- "keep existing flow" --> Metric
```

<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>PanelSchemaRenderer.vue</strong><dd><code>Refine table
chart data validation logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/PanelSchemaRenderer.vue

<ul><li>Remove table from generic chart validation branch.<br> <li> Add
table-specific data presence checks.<br> <li> Allow single-row tables
with any x/y value.<br> <li> Keep gauge and others using stricter alias
checks.</ul>

</details>

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

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

</details>

___
@github-actions github-actions bot added ☢️ Bug Something isn't working 🧹 Updates labels Sep 15, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR fixes a bug in the table chart no-data validation logic within the PanelSchemaRenderer.vue component. The change addresses false "No Data" messages that were appearing for table charts containing valid data.

The core issue was that table charts were using the same validation logic as other chart types (line, bar, etc.), which required ALL x and y field aliases to contain non-null values using an every() condition. This approach was too restrictive for tables, which can legitimately display rows with partial data - unlike other charts that typically need complete coordinate pairs.

The fix separates table validation from the generic chart validation by:

  • Removing "table" from the generic chart validation case (line 763)
  • Adding a dedicated table-specific validation branch (lines 772-780) that uses a more lenient approach
  • For tables with multiple rows, it simply checks if data exists
  • For single-row tables, it uses some() instead of every() to check if ANY x or y field contains non-null data

This change aligns the validation logic with how tables actually render data, where partially populated rows are valid and displayable, while maintaining the stricter validation requirements for other chart types that need complete data points.

Confidence score: 4/5

  • This PR addresses a specific UI bug with targeted logic changes and minimal risk
  • The fix correctly separates table validation logic from other chart types which have different data requirements
  • The change is localized to a single validation function with clear, readable conditional logic

1 file reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

Comment on lines 777 to 778
xAlias.some((x: any) => data.value[0][0][x] != null) ||
yAlias.some((y: any) => data.value[0][0][y] != null))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: Missing closing parenthesis - the OR condition with yAlias.some() should be wrapped in the same parentheses as the xAlias.some() condition for the single-row case.

Suggested change
xAlias.some((x: any) => data.value[0][0][x] != null) ||
yAlias.some((y: any) => data.value[0][0][y] != null))
xAlias.some((x: any) => data.value[0][0][x] != null) ||
yAlias.some((y: any) => data.value[0][0][y] != null))

@ktx-vaidehi ktx-vaidehi merged commit e9485dd into branch-v0.14.6-rc7 Sep 15, 2025
51 of 53 checks passed
@ktx-vaidehi ktx-vaidehi deleted the fix/dashboard/table-noData-rc7 branch September 15, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ Bug Something isn't working 🧹 Updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants