# Limit data points in chart

**URL:** <https://community.glideapps.com/t/limit-data-points-in-chart/69223>\
**Category:** Ask for Help\
**Created:** [January 4, 2024, 12:21am UTC](https://community.glideapps.com/t/limit-data-points-in-chart/69223 "2024-01-04T00:21:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mberns01](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mberns01/32/51549_2.png) [@mberns01](https://community.glideapps.com/u/mberns01)\
**Post date:** [January 4, 2024, 12:21am UTC](https://community.glideapps.com/t/limit-data-points-in-chart/69223/1 "2024-01-04T00:21:45Z")

</div>

I have a chart component that graphs a single datapoint from a linked record field. However, the chart only looks good if it has 30 or fewer datapoints, otherwise there is pagination.

When I select “Limit number of items” and enter “30”, it charts the oldest 30 data points.

How do I limit that chart to the **most recent** 30 data points?

Thank you!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 4, 2024, 1:21am UTC](https://community.glideapps.com/t/limit-data-points-in-chart/69223/2 "2024-01-04T01:21:40Z")

</div>

Try sorting by Date descending.

---

<div class="post-metadata">

**Author:** ![mberns01](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mberns01/32/51549_2.png) [@mberns01](https://community.glideapps.com/u/mberns01)\
**Post date:** [January 24, 2024, 9:19pm UTC](https://community.glideapps.com/t/limit-data-points-in-chart/69223/3 "2024-01-24T21:19:37Z")

</div>

Hey Darren, thanks for your reply. Unfortunate that did not work. That just created another problem but putting the most recent data at the beginning of the chart.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [January 24, 2024, 10:26pm UTC](https://community.glideapps.com/t/limit-data-points-in-chart/69223/4 "2024-01-24T22:26:52Z")

</div>

Create a query column that retrieves the data and sorts it in descending order,and set it to only retrieve 30 rows. Then set the query as the data source for the chart, but have it sort in ascending order.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 31, 2024, 10:27pm UTC](https://community.glideapps.com/t/limit-data-points-in-chart/69223/5 "2024-01-31T22:27:18Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
