# How to get the legent to display properly in Bar Chart?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-the-legent-to-display-properly-in-bar-chart/12222>\
**Category:** Ignition\
**Created:** [October 11, 2016, 10:13am UTC](https://forum.inductiveautomation.com/t/how-to-get-the-legent-to-display-properly-in-bar-chart/12222 "2016-10-11T10:13:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanko26](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@vanko26](https://forum.inductiveautomation.com/u/vanko26)\
**Post date:** [October 11, 2016, 10:13am UTC](https://forum.inductiveautomation.com/t/how-to-get-the-legent-to-display-properly-in-bar-chart/12222/1 "2016-10-11T10:13:12Z")

</div>

Hi all!

I am experiencing some issues with trying to populate Bar chart with data from 2 SQL tables. First table is being populated by a transaction group every time a machine stops with t\_stamp, name and error code. The 2nd table has a list with all the error codes in one column and descriptions in different languages in another columns. I am trying to get the number of times had a stoppage error and group them by description and display them in order. The SQL works as I can see the data set is correct but it does not display properly (cannot see the descriptions in the legend). Could you give me a hand I believe it is something stupid I am missing. Thanks!

`SELECT en,COUNT(Last_Stop_Reason)
FROM BMM_Stop_data, Last_stop_errors
WHERE Last_Stop_errors.no=BMM_Stop_data.Last_Stop_Reason AND t_stamp BETWEEN '{Root Container.Calendar.formattedLatchedDate}' 
AND '{Root Container.Calendar 1.formattedLatchedDate}' AND
BMM_Stop_data.Machine_Name = '{[Client]Machine}' GROUP BY Last_stop_errors.en
ORDER BY COUNT(BMM_Stop_data_ndx) DESC`
