Skip to content

Fix displaying the "Name" field value for X and Y axes#7701

Open
X-Crux wants to merge 1 commit intogetredash:masterfrom
X-Crux:patch-1
Open

Fix displaying the "Name" field value for X and Y axes#7701
X-Crux wants to merge 1 commit intogetredash:masterfrom
X-Crux:patch-1

Conversation

@X-Crux
Copy link
Copy Markdown

@X-Crux X-Crux commented Apr 29, 2026

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

OS: Chrome/Ubuntu 24.04.4 LTS

Redash version: 26.3.0


Issue: #7700

The issue is related to a breaking change that occurred when updating Plotly.js from version 2 to version 3. Version 3 no longer supports passing axis titles as plain strings. Now the title must be defined as an object with a text field.

Structure used in Redash 25.1.0 (Plotly.js v2):

"xaxis": {
  "title": "random string",
}

Structure required in Redash 26.3.0 (Plotly.js v3):

"xaxis": {
  "title": {
    "text": "random string",
  }
}

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

1. Create New Query. I'm using the script that was already used here for testing Charts:

select '2025-01-01' as t, 'apple' as grp1, 'tokyo' as grp2, 10 as value
union all
select '2025-01-01' as t, 'orange' as grp1, 'tokyo' as grp2, 20 as value
union all
select '2025-01-01' as t, 'apple' as grp1, 'osaka' as grp2, 30 as value
union all
select '2025-01-01' as t, 'orange' as grp1, 'osaka' as grp2, 40 as value
union all
select '2025-01-02' as t, 'apple' as grp1, 'tokyo' as grp2, 210 as value
union all
select '2025-01-02' as t, 'orange' as grp1, 'tokyo' as grp2, 220 as value
union all
select '2025-01-02' as t, 'apple' as grp1, 'osaka' as grp2, 230 as value
union all
select '2025-01-02' as t, 'orange' as grp1, 'osaka' as grp2, 240 as value
union all
select '2025-01-03' as t, 'apple' as grp1, 'tokyo' as grp2, 110 as value
union all
select '2025-01-03' as t, 'orange' as grp1, 'tokyo' as grp2, 120 as value
union all
select '2025-01-03' as t, 'apple' as grp1, 'osaka' as grp2, 130 as value
union all
select '2025-01-03' as t, 'orange' as grp1, 'osaka' as grp2, 140 as value

2. Add Visualization -> Chart -> Line/Bar/Area...

3. Settings:

  • X Column = "t"
  • Y Columns = "value"
  • Group by = "grp1
  • X Axis(tab):
    • Name = "random string"
  • Y Axis(tab):
    • Left Y Axis -> Name = "random string"

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

This is what it looks like now:

2630_1

After applying the changes:

2630_after

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant