sitesalt
sitesalt

Reputation: 55

some highcharts categories missing for unknown reason

I have a problem with a highcharts script. I used it a few times so far and I didn't bump ito this issue. It seems it does not want to display some of the categories I am listing (Y axis). I noticed they are not being placed properly, their coordinates are waaaay off (x=0, y=-9999). Am I doing something wrong? Can this be fixed easily, or is it a bug that they would have to fix?

JsFiddle: http://jsfiddle.net/E6cc3/

        $(function () {
        $('#questionsBx').highcharts({
            chart: {
                type: 'bar'
            },
            title: {
                style: {
                    color: '#8EC526',
                    font: 'normal 16px font-family: "Open Sans", sans-serif;'
                },
                text: 'Performance per Question Dec 19 2013 - Jan 21 2014'
            },
            xAxis: {
                categories: ["Was your call answered promptly?","How helpful and knowledgeable was the staff in making your reservation?","What was the level of courtesy and professionalism of the staff answering the phone?","Was the Chauffeur on time for your pickup?","Was the Chauffeur's appearance neat and professional?","Did the Chauffeur open the door for you?","Did the Chauffeur assist you with your luggage?","Was the Chauffeur prepared and familiar with the itinerary?","Was the amount of talking by the Chauffeur appropriate?","Did the Chauffeur drive you in a safe, comfortable manner?","What was the level of courtesy and professionalism of the Chauffeur providing services?","Was the vehicle clean inside and out?","What was your overall level of satisfaction pertaining to the vehicle?","How would you rate your overall experience?"]
            },
            yAxis: {
                min: 0,
                title: {
                    text: 'Performance per Question'
                }
            },
            legend: {
                backgroundColor: '#FFFFFF',
                reversed: true
            },
            plotOptions: {
                series: {
                    stacking: 'normal'
                }
            },
                series: [{
                name: 'Below Expectations',
                data: [2,1,2,1,2,2,1,1,1,1,1,2,1,2]
            }, {
                name: 'Met Expectations',
                data: [0,4,3,2,2,1,1,2,2,4,2,1,4,2]
            }, {
                name: 'Above Expectations',
                data: [6,3,3,5,3,4,4,3,3,3,4,5,3,4]
            }]
        });
    });

Thank you for your time!

Upvotes: 2

Views: 562

Answers (1)

brent
brent

Reputation: 924

The sizing of the chart itself is to small to accommodate for the category titles. Either make the category titles smaller to fit in to the chart area, or increase the height of the chart.

eg. Change chart height: http://jsfiddle.net/E6cc3/4/

chart: {
                type: 'bar',
                height: 1000
            },

or eg. change titles:

use : Level of courtesy and professionalism in chauffeur services 

instead of : What was the level of courtesy and professionalism of the Chauffeur providing services

Upvotes: 2

Related Questions