# Choosing columns from query to Populate a bar chart

**URL:** <https://forum.inductiveautomation.com/t/choosing-columns-from-query-to-populate-a-bar-chart/96132>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 18, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/choosing-columns-from-query-to-populate-a-bar-chart/96132 "2024-09-18T14:58:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [September 18, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/choosing-columns-from-query-to-populate-a-bar-chart/96132/1 "2024-09-18T14:58:58Z")

</div>

Hello!

I´ve got a table populated with 4 columns as follow:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/6/664db39696d435427ad1ecd69a14e6540f8af5d1.png)

I want to choose column 2 (NUMERO DE PETICIONES) to be the height of the Bar and column 4 (DESCRIPCION) to be the name of the bar.

How can I archieve this???

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/9/f9bd5a78f272b3f7e86a3c0e81c75eafa6848fa7.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 18, 2024, 3:02pm UTC](https://forum.inductiveautomation.com/t/choosing-columns-from-query-to-populate-a-bar-chart/96132/2 "2024-09-18T15:02:00Z")

</div>

Try changing the query column order to,

```python
SELECT
    DESCRIPCION,
    NUMERO DE PETICIONES,
    etc.,

```

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [September 18, 2024, 3:09pm UTC](https://forum.inductiveautomation.com/t/choosing-columns-from-query-to-populate-a-bar-chart/96132/3 "2024-09-18T15:09:52Z")

</div>

Thanks, I changed the query order as you suggest, now I binding that table data to the dataSources.example prop of the BarChart but can´t see the labels of the first column

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/4/f4944c1f0370687f2ecb37ba865ab8926ebe6306.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5fe16329f0dde8c886159caa79187f8557acb8dc.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 18, 2024, 3:12pm UTC](https://forum.inductiveautomation.com/t/choosing-columns-from-query-to-populate-a-bar-chart/96132/4 "2024-09-18T15:12:43Z")

</div>

`xAxes.0.render : category`  
?

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [September 18, 2024, 3:20pm UTC](https://forum.inductiveautomation.com/t/choosing-columns-from-query-to-populate-a-bar-chart/96132/5 "2024-09-18T15:20:32Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/b/fb6dfbcfbfa77a1bdd769353209c1ffc28a9cebf.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/01e1c8fe810bbfafbebf32e9dfc32b2b92ef9044.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bd7c68a071f7e0b77ec0dc8ad3e218e3910aa7d7.png)

so many options  
like this?

no data appear on the bars
