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.
`yyyy-MM-dd hh:mm:ss.sss` is not an unambiguous format when using the `datetime` datatype; it changes depending on the language.

Take the below examples:

```
SET LANGUAGE ENGLISH; --American
SELECT CONVERT(datetime,'2019-07-06'); --Returns 06 July 2019

SET LANGUAGE BRITISH; --English
SELECT CONVERT(datetime,'2019-07-06'); --Returns 07 June 2019

```

If we then take a date like the below, watch what happens:

```
SET LANGUAGE ENGLISH; --American
SELECT CONVERT(datetime,'2019-01-31'); --Returns 01 January 2019

SET LANGUAGE British; --English
SELECT CONVERT(datetime,'2019-01-31'); --Conversion error

```

Really, however, you should not be storing your dates as a `char`, and you need to fix that. Fortunately, you can easily fix your data by changing it to the ISO format `yyyy-MM-ddThh:mm:ss.sss`:

```
UPDATE CounterData
SET counterdatetime = STUFF(counterdatetime,11,1,'T');

ALTER TABLE CounterData ALTER COLUMN counterdatetime datetime;

```