# Bar chart data property

**URL:** <https://forum.inductiveautomation.com/t/bar-chart-data-property/9661>\
**Category:** Ignition\
**Created:** [February 5, 2015, 2:39pm UTC](https://forum.inductiveautomation.com/t/bar-chart-data-property/9661 "2015-02-05T14:39:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forum.inductiveautomation.com/u/pascal)\
**Post date:** [February 5, 2015, 2:39pm UTC](https://forum.inductiveautomation.com/t/bar-chart-data-property/9661/1 "2015-02-05T14:39:53Z")

</div>

Hello everyone,

I’m actually facing a problem with the Bar chart component in the 7.7.2 Version of Ignition. When i bind the data property to a SQL query, i have nothing displayed on the chart (as you can see int he attached image). However if i manually create a dataset with the Dataset Viewer it displays it well.  
Is it a bug in Ignition or is there a way to bind this property?

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/301ac398c5c4092c29cb40339006c31d7ae51148.JPG)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 5, 2015, 3:24pm UTC](https://forum.inductiveautomation.com/t/bar-chart-data-property/9661/2 "2015-02-05T15:24:59Z")

</div>

In the lower left of your screen capture, it shows [0R x 3C] for the result of your binding. Are you sure you are getting data from your database?

---

<div class="post-metadata">

**Author:** ![CPowell](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@CPowell](https://forum.inductiveautomation.com/u/CPowell)\
**Post date:** [February 5, 2015, 3:45pm UTC](https://forum.inductiveautomation.com/t/bar-chart-data-property/9661/3 "2015-02-05T15:45:32Z")

</div>

The bar chart is looking for a label as a string. Then the next columns should be integers.

Try this code:

```auto
SELECT ACTION as Label, COUNT(ACTION) as ACTION_COUNT 
FROM AUDIT_EVENTS
GROUP BY DATEPART(MONTH,EVENT_TIMESTAMP), ACTION
ORDER BY Label
```

Cheers,  
Chris
