Question: So I am creating a highcharts bar chart in a function inside my jQuery script, and it was working fine until I tried to incorporate different colors for each bar of the bar chart. My code is basically as follows

```
function BarChart(title, gType, list, numbers){
    var data = [];
    var allData = [];
    var series = [];
    var len = numbers.length;
    var colors = ['#7cb5ec', '#434348', '#90ed7d', '#f7a35c', '#8085e9', '#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1'];
    for(i=0; i<len; i++){
        data.push({
            y: numbers[i],
            color:colors[i]
        });
        allData.push(data[i]);
    }
    for(i=0; i<len; i++){
        series.push({
            name: list[i],
            data: allData[i]
        });
    }

```

Then I go on and create the chart and for series, I simply put

```
series: series

```

But no bars come up, only the legend, the title, the yAxis title and the xAxis title. If you can help me out that be great, hopefully my question is clear enough! Thanks!

P.S.

when I just put 

```
series:[{
data: data
}] 

```

it works, but then all the legend says is Series 1 and I don't want that, I want it to actually show the name of each data with its corresponding color, thanks again!

Answer: 
Here you go...your CSS was out of whack.

Fiddle <https://jsfiddle.net/tzgevx8e/3/>

CSS

```
#contact-form  {
    overflow:hidden;
    height:0px;
    transition:all 0.5s ease-in;
}
#contact-form.open {
    height:200px;
    background-color:#2e263d;
    color:#fff;
    padding:20px 0 40px 0;
}

```

JQuery

```
$('.menu-icon').click(function(){
    $(this).toggleClass('active');
    $('#contact-form').toggleClass('open');
});

```
just change the css as i mention below no need to change anything else.

```
#contact-form.closed{
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease-in;
  padding: 0
}

#contact-form{
  max-height: 500px;
  overflow: hidden;
  transition: all 0.5s ease-in;
  background-color: #2e263d;
  color: #fff;
  padding: 20px 0 40px 0;
}

```