0

Hello Im using "highcharts 8.0.0","highcharts-angular 2.4.0" with angular8:

The line charts works great with google chrome but with Firefox I can't see the yAxis (width ~ 16px)

here's my chartOptions

 this.chartOptions = {
            chart: {
                type: 'line',
                spacingBottom: 0
            },
            title: false,

            legend: {
                enabled: false
            },
            xAxis: {
                categories: ['11/02/2019', '11/02/2020']
            },
            yAxis: {
                min: 0,
                max: 6,
                categories: ['0', '1', '2', '3', '4', '5', '6'],
                title: {
                    text: 'xxx'
                },
                labels: {
                    formatter: function () {
                        return this.value;
                    }
                }
            },

            plotOptions: {
                area: {
                    fillOpacity: 0.2
                },

            },
            credits: {
                enabled: false
            },
            tooltip: {
                enabled: false,
            },
            series: [{
                data: ['0','5'],
                color: '#00335f',
                marker: {
                    fillColor: '#00335f'
                }
            }],
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        };

Does any one have a solution for this problem ?

Help :)

1 Answers1

0

I found a solution in the offical doc:

<highcharts-chart [Highcharts]="Highcharts" [options]="chartOptions" style="width:  100%; height: 100%; display: block;"\> \</highcharts-chart>

force the height in the style balise.

offical highchart-angular doc

denis
  • 5,580
  • 1
  • 13
  • 40
Micky C.
  • 21
  • 4