Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static viz multi-series shows two Y-axis #20559

Closed
Tracked by #24759
flamber opened this issue Feb 16, 2022 · 6 comments · Fixed by #28295
Closed
Tracked by #24759

Static viz multi-series shows two Y-axis #20559

flamber opened this issue Feb 16, 2022 · 6 comments · Fixed by #28295
Assignees
Labels
.Correctness .echarts-scope Issues related to chart types that have already been or will be migrated to echarts. Priority:P2 Average run of the mill bug .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/Charts Line, area, bar, combo, and scatter charts. Visualization/Static Subscriptions/pulse generated image
Milestone

Comments

@flamber
Copy link
Contributor

flamber commented Feb 16, 2022

Describe the bug
Static viz multi-series shows two Y-axis.
Kinda a regression in 0.42.0, since 0.41.6 would just show a table, but at least there wasn't a correctness issue with that.

To Reproduce

  1. Question > Sample > Products
  2. Summarize Sum of Price, grouped by CreatedAt:Year and Category
    image
  3. Visualize and save question
    image
  4. Not going to spend time on subscription, go to /api/pulse/preview_card_png/:question_id
    image

Expected behavior
Follow Y-axis choices from normal visualization settings.

Information about your Metabase Installation:
Tested 0.41.6 and 0.42.0

⬇️ Please click the 👍 reaction instead of leaving a +1 or update? comment

@flamber flamber added Type:Bug Product defects Priority:P2 Average run of the mill bug .Correctness Visualization/Charts Line, area, bar, combo, and scatter charts. .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. Visualization/Static Subscriptions/pulse generated image labels Feb 16, 2022
@howonlee howonlee self-assigned this Feb 16, 2022
@losrebellos
Copy link
Contributor

@flamber @howonlee

  • After checking the png render it seems that the Doohickey category is using the left side axis and all the other categories are using the right side axis.
  • Based on the original viz, the correct axis should be the right side one

@losrebellos
Copy link
Contributor

losrebellos commented Mar 7, 2022

@howonlee

After some more debugging, the example is using a combo-chart/LineAreaBarChart.
The options.series needs to specify which axis the serie belong to using yAxisPosition with left or right:

"series": [
  {
    "name": "bar series 1",
    "color": "#88bf4d",
    "yAxisPosition": "left",
    "type": "bar",
    "data": [
      ...
    ],
  },
  ...
}

In the GH issue example, it seems that the series all have "yAxisPosition": "right" except for the first one, hence the legend being divided, the 2 axises and the incorrect position of the first serie (Doohickey).
In that case, they should all have "yAxisPosition": "left".

@Tony-metabase
Copy link
Contributor

Tony-metabase commented Apr 17, 2023

Tested this on 1.46.1 and master and there are some paths that still doesn't work ... the issue in this case seems to be related to the Join between orders and product (in this case explicit)

So Step 1 ,create the following question -> Orders -> Count -> Group by Created_at:Month and Product -> Category:

image

Step 2, set visualization as a Line and make sure the split is disabled

image

Step 3, Add it to dashboard and send it to an email

image

Reopening issues

@Tony-metabase Tony-metabase reopened this Apr 17, 2023
@luizarakaki
Copy link
Contributor

@Tony-metabase can you help me reproduce it? I couldn't on 46.1

@Tony-metabase
Copy link
Contributor

Any specific step you are getting stuck? Since same replication steps apply as the one flamber created ...

So Step 1 ,create the following question:

image

Step 2, set visualization as a Line and make sure the split is disabled

image

Step 3, Add it to dashboard and send it to an email

image

You get split Y-axis which are not there in the question and are also disabled form the settings ... Anything not clear let me know

Happens both on 1.46.1 and master

@ylq5126
Copy link

ylq5126 commented Jun 28, 2023

@Tony-metabase Can Chromium or Firefox be used to replace the existing solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Correctness .echarts-scope Issues related to chart types that have already been or will be migrated to echarts. Priority:P2 Average run of the mill bug .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/Charts Line, area, bar, combo, and scatter charts. Visualization/Static Subscriptions/pulse generated image
Projects
None yet