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.
> 
> The table has a char(24) field... I'm trying to treat that field as a datetime data
> 
> 
> 

**DON'T DO THAT!** If you have DateTime values, store them using a type from the DateTime family! Hopefully this whole thing is part of a project to *fix* (because right now, the schema really is *broken*) this table. As just one example (of many) of why this is important, indexes on this column are mostly useless as it is.

> 
> I thought perhaps the failure was triggered by a bogus value in one record... 
> 
> 
> 

This is **exactly** what is happening. There is bad data. (Using a real DateTime type would prevent this from happening in the first place). 

> 
> ... so I tried limiting the conversion with a WHERE expression that specifies a good value.
> 
> 
> 

Check your `WHERE` clause again, because it wasn't specific enough, or there was a problem with the value you chose you didn't see at first.