Skip to content

Chart not responsive - width stuck at 600px no matter what I do #262

@tonym99

Description

@tonym99

I'm stuck with a fixed width and height of 600px and 400px respectively no matter what the browser is narrowed to. The demos all seem to be responsive, but for some reason mine is stuck at 600px.

This is the resulting div for the chart after rendering:

This is my chart definition/options:

chart: {
backgroundColor: 'transparent',
marginTop: 10,
marginBottom: 50,
animation: false,
type: 'column'
},
title: { text: null },
scrollbar: {
enabled: true
},
reflow: true,

        responsive: {
            rules: [{
                condition: {
                    maxWidth: 1000
                },
                chartOptions: {
                    legend: {
                        align: 'center',
                        verticalAlign: 'bottom',
                        layout: 'horizontal'
                    },
                    yAxis: {
                        labels: {
                            align: 'left',
                            x: 0,
                            y: -5
                        },
                        title: {
                            text: null
                        }
                    },
                    subtitle: {
                        text: null
                    }
                }
            }]
        },
        legend: {
            enabled: false,
        },
        yAxis: {
            min: 0,
            max: maxval,
            stackLabels: {
                formatter: function () { return '$' + that.currencyPipe.transform(this.total, 'USD', true, '1.0-0'); }
            },
            title: { text: null },
            labels: {
                formatter: function () { return '$' + that.currencyPipe.transform(this.value, 'USD', true, '1.0-0'); }
            }
        },
        tooltip: {
            formatter: function () {
                return '<b>' + this.series.name + '</b>: ' + that.currencyPipe.transform(this.point.y, 'USD', true, '1.0-0');
            }
        },
        plotOptions: {
            series: {
                animation: false
            },
            column: {
                borderWidth: 0,

                stacking: 'normal',
                events: {
                    legendItemClick: function () {
                        return false; 
                    }
                }
            }
        }

Anyone??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions