daxu
daxu

Reputation: 4124

why setting div's height and width lose bar's label in highchart?

I need to draw a bar chart and need to set width and height for the container div (as there is only that amount of space I can use)

However, when I set height and width, in some cases, highchart will not draw some of the bar labels, even though I think there are places to draw them. Can someone explain this or maybe provide a workaround (without removing height)?

The jsfiddle is http://jsfiddle.net/daxu/md2zk/68/

                    labels: {
                        style: {
                            color: 'black',
                            fontFamily: 'DINPro',
                            fontSize: '7.8409px',
                            fontWeight: 'normal'
                        },
                        formatter: function () {
                            return this.value;
                        }

                    }

Upvotes: 0

Views: 110

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

At the beginning, remove datalabels configuration per each point and use common options. There, you can disable hiding labels by crop option.

Example: http://jsfiddle.net/md2zk/70/

Upvotes: 0

Related Questions