Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @treesloth,
The combo chart visualisation does not support "By field" sorting on the x-axis. If you open the x-axis kebab menu, you'll see that the "By field" option is greyed out with a "Not available for this visualisation" tooltip. This means you can't point the x-axis sort at your sort_order column the way you could with a regular bar chart. The only sort options available for combo charts are Alphabetical and Custom.
I reproduced this in my own workspace using a simplified version of your dataset to confirm the behaviour. Here's what I found.
When Genie first created the chart, it likely set up the visualisation without an explicit sort, so the chart reflected your SQL row order. The moment you edited the widget in the visual editor, the editor took ownership of the sort configuration and applied its default, which is alphabetical. That's why it broke after your edit, even though you didn't intentionally change the sort.
Here are a couple of workarounds you can try.
Option 1: Custom sort (quick fix): Open the x-axis kebab menu, choose Custom under Sort, and drag the category values into your Pareto order: SQL, Python, R, .Net, Bash, All Others. This works perfectly, but is manual. If your underlying data changes and new categories appear, you'll need to re-drag them into position.
Option 2: SQL prefix trick (automatic fix)
If your data changes frequently and you don't want to manually reorder every time, you can prepend the sort order to the category name directly in your SQL. Something like:
SELECT
CONCAT(LPAD(CAST(sort_order AS STRING), 2, '0'), '. ', category) AS category,
sort_order,
category_count,
cumulative_pct
FROM (
-- your original query here
)
ORDER BY sort_orderThis turns your categories into 01. SQL, 02. Python, 03. R, and so on. Since the editor's alphabetical sort now sorts 01... before 02..., the Pareto order is preserved automatically. The tradeoff is that your x-axis labels will have the numeric prefix, which isn't as clean, but it's fully hands-off when data changes.
If your categories are fairly stable, go with Custom sort. It gives you clean labels and exact control. If your query is dynamic and categories shift over time, the SQL prefix approach saves you from having to re-drag things every time you refresh.
Hope that helps! Let us know if you run into anything else.
If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.
Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***