arcanine
arcanine

Reputation: 1953

xAxis labels refuse to align with columns

enter image description here here is the configuration code: http://pastebin.com/3W3r9sHQ apologies for the formatting but it is generated rather than written

I would like the labels to align with the columns and to be able to add my own labels which I think can be done with categories

Upvotes: 0

Views: 69

Answers (1)

Jugal Thakkar
Jugal Thakkar

Reputation: 13482

You are plotting each point to a different series !!! It should be a single series with multiple points to get things right. You will also need to define an xAxis that contains all the x values in the correct order.

"xAxis": {
        "categories": [
            'Core i7-3770 4-Core 3.4GHz',
            'Core 2 Duo E4600 2.4GHz',
            'Pentium Dual Core E2200 2.2GHz'
            ]
 }

Set all the values into the data array with y value and the color

    "series": [{
        "type": "column",
        "name": "Popular CPU",
        "data": [
            {
            "color": "#AA4643",    
            "y": 100},
        {
            "color": "#4572A7",
            "y": 13.24},
        {
            "color": "#AA4643",
            "y": 12.03}
        ]
    }]    

demo basic @ jsFiddle
demo @ jsFiddle

Upvotes: 1

Related Questions