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

Ordering of bars in histogram? #325

Open
magerlin opened this issue Jun 12, 2023 · 5 comments
Open

Ordering of bars in histogram? #325

magerlin opened this issue Jun 12, 2023 · 5 comments

Comments

@magerlin
Copy link

I cannot figure out what determines the ordering of bars in a histogram.

With a text attribute as X field I would expect the bars to be shown in alphabetical order but that is not the case:
Bar Order

@ghtmtt
Copy link
Owner

ghtmtt commented Jun 19, 2023

can you please share the input data (also a small piece of it)?

@magerlin
Copy link
Author

Sorry for my late reply – I have been on summer holiday.

Please find attached data and Qgis project as well as a PDF illustrating the problem.

The Layout in the project is an atlas and I want to make a histogram only for points inside the current atlas feature.

If I tick “Only use features in visible map” I get the expected sorting order of the bars in the histogram – but this is not the histogram I want to show.

With no ticks or tick in “Use only features inside atlas feature” I get another and for me not right sorting order.

I have tried adding starting letters a to d to the intervals (as shown in the PDF) but it did not make any difference.

Histogram.zip

@WilliamBelini
Copy link

Could it have an order column organize the data plot? I have the same problem. I create a Bar Plot with round numbers but when its plotting, the data order by the ID of attribute table (It create an order X axis based on the round number, but the color of the bar if I create a customization rampage color by the original number -decimal 0,000-, its color based on ID, so it don't have uniform transition colors).

@palight
Copy link

palight commented Jul 2, 2024

I really need also ordering the X-values for histogram. Is the PR order by expression soon merged ?

@WilliamBelini
Copy link

the solution: You need reorder the data table Id, by column, using MMQGIS. It will change the Id by the order you want. And the chart will plot correctly.

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

No branches or pull requests

4 participants