Chart - Sort by most recent date

I have a chart that I need to start at the most recent date. Right now it is showing the oldest date and you have to click through all the pages to get to the most recent.

How can I add “sort order” in the options of the graph like in the “Business Report” Template.

Screenshots below

You can use a query column to query the data you need, and do the sort in that column.

Use that column as the data source for your chart.

Also, you probably want to increase the “page size” to show more dates?

Sorry im confused. You cant choose a column as a data source for a chart it has to be a sheet. As far as the page size we want to show last 7 days which is how it is set right now.

I created a query column in the table and queried the “periodstart” date but still dont have an option to sort the chart by the date.

It can be a query, that’s what I was trying to write above.

You do the sort in the query column, not the chart.

hmm I cant choose the query column as a source for the chart. What am I doing wrong here?

CleanShot 2025-02-06 at 11.02.15

I think you should change it in this part.

Thats what im confused by. I cant select a column for a data source only a sheet.

This is pulling data for “ApData”. I added a query column in the ApData source but I cant select that column as the chart data source

Is your query column in the same table that is the source of your screen?

Yes it is. Shown in attached screenshot. White block is sensitive info I have covered up

Okay, that was my mistake I found where I can select a query column as a "Data Source’ for the chart. I select that query column and change sor to “Z-A” but it still doesnt change the graph

I believe the suggestion was to apply the sort inside the query, not on the chart. Like below:

1 Like

I checked with Morgan.

We tested that out with a simple collection using the query as the source. It was indeed showing the right sorting. But the chart doesn’t want to respect that sorting.

Note: He is using Postgres.

Should be reported as a bug in that case.

Can you escalate it?

@glide_help Please check this thread.

@Morgan_Diesen @MaximeBaker Please feel free to give more context to this issue if needed here.

1 Like

Thanks !

The chart seems to do bad behaviour with external sources. MySQL had the issue with precision after comma too. That was reported by @Morgan_Diesen to the support team.

We could probably try to replicate this with standard Glide tables to see if it is only a postgres issue.

I took a look at this issue and found that the sorting behavior (when using high-scale data sources for Charts) doesn’t seem to be supported at this time.

I’ve reached out to the team for confirmation, but my testing has produced inconsistent results that make me think that the “Sort” option is missing from the Chart’s options section by design and the work-around to use a Query column as the Chart’s source won’t work reliably (even though the Query column looks to provide the sorting option, the Chart itself doesn’t seem to respect it).

I will touch base once I hear from the team to confirm these assumptions.

Note that this only applies to high-scale data sources like Glide Big Tables, SQL, etc.

4 Likes

+1 : I just ran into this issue independently. Just trying to sort a bar chart by date ascending with a Postgres data source and can’t do it (the option to apply a sort in chart options is not shown). Tried pulling data with a custom query with date sort on the table but that didn’t work either. Without this my chart is unusable. Hoping for a resolution :slight_smile:

1 Like

I can confirm that this is a current limitation of the existing Chart component when using a high-scale data source (like Glide Big Tables or SQL, for example). The team is working on a solution to the underlying limitation, but I don’t have an ETA at this time.

2 Likes