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

Alternative measure/dimension selection unavailable #1318

Open
M1CK431 opened this issue Jul 26, 2023 · 5 comments
Open

Alternative measure/dimension selection unavailable #1318

M1CK431 opened this issue Jul 26, 2023 · 5 comments
Labels
Charts out of scope This request is out of the Nebula projects direct scope

Comments

@M1CK431
Copy link

M1CK431 commented Jul 26, 2023

🐛 Bug report

On Qlik:
image

With Nebula:
image

Nothing happens while clicking on the axis label of Nebula bar chart

Steps to Reproduce

  1. embed a bar chart with Nebula which has multiple measures
  2. click on the axis label to choose the desired measure
  3. nothing happens! 💥

Expected behavior

Ability to select the desired measure on axis label click, like in Qlik.

Actual behavior

Nothing happens on axis label click.

Versions

  • nebula.js:
    • "@nebula.js/sn-bar-chart": "^1.33.0",
    • "@nebula.js/stardust": "^4.2.3",
  • Platform: not relevant
  • Browser: Chrome/114.0.0.0
@M1CK431
Copy link
Author

M1CK431 commented Aug 21, 2023

any idea @Caele ?

@M1CK431 M1CK431 changed the title sn-bar-chart: measure selection unavailable sn-bar-chart: alternative measure/dimension selection unavailable Aug 24, 2023
@M1CK431 M1CK431 changed the title sn-bar-chart: alternative measure/dimension selection unavailable Alternative measure/dimension selection unavailable Aug 24, 2023
@M1CK431
Copy link
Author

M1CK431 commented Aug 24, 2023

After so many answers... I finally found a way to workaround this issue after reading this: https://community.qlik.com/t5/Integration-Extension-APIs/Engine-API-Get-Object-layout-for-an-Alternate-Dimension/td-p/1670667

The workaround is to implement a select yourself:

  • options for the select can be obtained using getProperties() on the generic object then build an array with [...qHyperCubeDef.qDimensions, ...qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions] to get all available dimensions
  • the current dimension is in qHyperCubeDef.qDimensions[0]
  • for measures, remplace qDimensions by qMeasures
  • dimensions labels are in qDef.qFieldLabels[0] but for measures labels 2 additional API calls are needed: doc.getMeasure(id).then(qMeasure => qMeasure.getLayout()) (id is from qLibraryId) then label is in qMeta.title
  • to change the current dimension/measure, use applyPatches method on the generic object as described in the discussion provided at the beginning of that comment.

Good luck...

@Caele
Copy link
Collaborator

Caele commented Jan 5, 2024

This is due to the logic for the alternative dim/measure selection is done in the actual client UI, and not in the individual charts or Nebula. This exists on our roadmap, but continues to be pushed low. I currently have no timeline.

@Caele Caele added Charts out of scope This request is out of the Nebula projects direct scope labels Jan 5, 2024
@xunziheng
Copy link

but it works well in capability api.

@xunziheng
Copy link

but it works well in capability api.

excuse me @Caele , does Nebula team have plan to support this now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Charts out of scope This request is out of the Nebula projects direct scope
Projects
None yet
Development

No branches or pull requests

3 participants