Question: I am new to HighCharts; In our project, we are using the below code where we are giving index value along with data (I won't be able to post the actual code)

```
      data.push([indx,getRandomInt(50)]);                       
      splitSeries[i].push({
          "name" : optionData.series[m].name,
          "data" : data
      });

```

But we are facing two problems   

1. The categories are getting divided equally even though the first category has more number of bars.
2. There's so much space left at the bottom of each category.

[![chart after rendering](https://i.stack.imgur.com/925km.png)](https://i.stack.imgur.com/925km.png)

How to resolve these issues, please help.

[Adding jsfiddle](http://jsfiddle.net/9hzypqms/)

Answer: 
I am not certain if the literal `'2019-07-02 09:19:46.300'` is the text value which is actually crashing your query. If you are using SQL Server 2012 or later, there is a helper function [`TRY_CONVERT`](https://learn.microsoft.com/en-us/sql/t-sql/functions/try-convert-transact-sql?view=sql-server-2017) which will attempt to convert an input string to a certain type (datetime in this case), and will either return a converted datetime value, or `NULL` if the conversion failed.

Try running the following query:

```
SELECT
    counterdatetime
FROM CounterData
WHERE
    TRY_CONVERT(datetime, counterdatetime) IS NULL;

```

If you see any records showing up in the result set, it means that these values cannot be successfully converted.
@Jeroen Mostert provided the correct answer in a comment to the original post, so credit should go to him. 

> 
> Uh-oh, Spaghetti-O's. That's a NUL character that doesn't belong
>  there. These are extra awful because REPLACE doesn't know what to do
>  with them by default. Try CONVERT(DATETIME, REPLACE(CounterDateTime
>  COLLATE Latin1\_General\_BIN2, CHAR(0), '')).
>  (SUBSTRING(CounterDateTime, 1, 23) should also work in this case,
>  since we can expect the NUL to always be at the end.)
> 
> 
>