Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello everyone,
I need you help to make y-axis coherent to the facetted plot I am doing (Deneb).
I facet a graph upon differents Products, with independant and differents Versions (y-axis) for each product. The issue is that Products are displayed according to versions of all product shown, and not only the one intended. Here he two screen of my deneb :
1 2
When only one Product is filtered, version are shown correctly. But when I filter multiples products, each product is displayed according to the sum of versions of all products, which make it unreadable.
Could you help me figure out how to make it work as I need ?
Thanks everyone that's is going to help.
@giammariam @ppm1 @lbendlin, I ping you as you helped me at the beginning of the project, maybe you could also help here 😉
Solved! Go to Solution.
Thanks @hsavy, is this more of what you're after? I simply updated the resolve to set the scale as independent, as opposed to the axis. Let me know if you're trying to do something else.
"resolve": {"scale": {"y": "independent"}}
Hey @hsavy. I would look into resolve to get the scales to show as desired. If you could provide a santized .pbix file with some mock data and your deneb visual, it'd really help me to dive deeper into this. If that can't happen, could you provide your vega/vega-lite spec? Happy to help further. Also, thanks for the tag.
.txt / .pbix files are not supported, how could i gave you access to my vega-lite spec ?
I will also give you some anonimized data to work with.
You can also share your data with your spec. Please see this video.
https://www.youtube.com/watch?v=SQt1qv24BKY
Pat
Hoosier always here to help ahha
Issue On VegaLite hsave (github.com)
Vega Editor
Here is a gist containing the data and code.
As you can see, Product 1 and Product2 are shown according to all versions.
I would like to display product1 according to his versions and product2 according to his versions.
Thank you guys
Thanks @hsavy, is this more of what you're after? I simply updated the resolve to set the scale as independent, as opposed to the axis. Let me know if you're trying to do something else.
"resolve": {"scale": {"y": "independent"}}
Thanks again. I also tried to change the height of each facet according to the number of version. Do you think it's possible ?
I've tried with a calculate and with "height" : calculated_height, but it said it had to constant 😕
@hsavy I believe so. Can you share the formula that you tried to implement for calculated_height? This may be doable by manipulating the y-scale output range values.
Or a better option is to probably use step for the height instead of a fixed value. See here and let me know.
@giammariam I couldn't find exactly what I've tried but it was something like :
"transform" : [
{"calcultate" : length("List_of_version"), "as" calculated_height}
]
But it couldn't work correctly in this version, rising the error : height as to be constant.
When I try to put a step height in my facet spec, the error raising is "missing child_height signal".
I am currently looking for an other solution
@hsavy this was a tricky one. The layer inside the facet was throwing things off. The way the underlying Vega works, it wasn't recognizing the auto-generated signal called child_height. The solution was to create a param with the name, child_height. To avoid confusion, I didn't give the param a value. To update the vertical step, update the step value inside the spec for the facet.
A bit of a hack, but it works. Glad I was able to discover this in case I ever run into this down the road with any of my projects.
Here is the gist
What a solution :')
Good job finding this one trick. Maybe you could post this as a bug on the vega-lite git.
Thanks again, you're the goat
Wow, that was that easy :')
I may had some issue to different scale and axis as a non english speaker.
Thanks for you help and quick answers. Really appreciate !
@ppm1, thanks for sharing this. I've seen many of Hoosier BI's videos before, but not that one. That simple function will not only make getting help with Deneb easier, but will also make development with realistic data outside of deneb and in the vega editor, faster.
How to provide data/pbix: https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
you can also share your spec by using the code tag under formatting. The icon looks like this: </>
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
37 | |
4 | |
3 | |
3 | |
3 |