# XY Chart suggestions to group columns

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-suggestions-to-group-columns/75036>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 14, 2023, 6:52pm UTC](https://forum.inductiveautomation.com/t/xy-chart-suggestions-to-group-columns/75036 "2023-06-14T18:52:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![splata](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@splata](https://forum.inductiveautomation.com/u/splata)\
**Post date:** [June 14, 2023, 6:52pm UTC](https://forum.inductiveautomation.com/t/xy-chart-suggestions-to-group-columns/75036/1 "2023-06-14T18:52:40Z")

</div>

Hello, can you help me with a suggestion about how can i group by shift ("Turno") and separate the groups by Date in a XY chart component?, i make a named query and to get the data, but i need to plot in a chart in the most understandable way possible. today i achieved this:

```auto
[
  {
    "id": 1,
    "Availability": 79.96180725097656,
    "Performance": 78.5,
    "Quality": 83.43949127197266,
    "OEE": 52.37498474121094,
    "Turno": 1,
    "Date": 1686601740000
  },
  {
    "id": 2,
    "Availability": 90.70138549804688,
    "Performance": 40.400001525878906,
    "Quality": 95.04950714111328,
    "OEE": 34.8293342590332,
    "Turno": 2,
    "Date": 1686626971000
  },
  {
    "id": 3,
    "Availability": 100,
    "Performance": 32.5,
    "Quality": 103.07691955566406,
    "OEE": 33.5,
    "Turno": 3,
    "Date": 1686657540000
  },
  {
    "id": 4,
    "Availability": 82.88541412353516,
    "Performance": 84,
    "Quality": 92.26190185546875,
    "OEE": 64.23619079589844,
    "Turno": 1,
    "Date": 1686688140000
  },
  {
    "id": 5,
    "Availability": 81.98958587646484,
    "Performance": 43.83333206176758,
    "Quality": 93.91635131835938,
    "OEE": 33.75238037109375,
    "Turno": 2,
    "Date": 1686713340000
  },
  {
    "id": 6,
    "Availability": 85.27083587646484,
    "Performance": 60.33333206176758,
    "Quality": 93.64640808105469,
    "OEE": 48.17802047729492,
    "Turno": 3,
    "Date": 1686743940000
  }
]

```

it looks now :

 ![imagen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72961b738b88662c7e17c7ecb2270e43db1bec95.png)

i like to group by day on the X axis and also by shift "Turno" , is there a way to make on the chart or the better option is modify the DB to get all data for day?

what you think?

---

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [June 15, 2023, 2:59am UTC](https://forum.inductiveautomation.com/t/xy-chart-suggestions-to-group-columns/75036/2 "2023-06-15T02:59:20Z")

</div>

Hello,

Perhaps the simplest approach is to add this grouping in your queries feeding this table. Instead of trying to manipulate the data after the fact in the chart binding.

Frank
