Highcharts - print large format chart but keep text small

35 Views Asked by At

I have a lot of sunburst charts made using Highcharts that are displayed on a web page - an example is below.

What I would like to do is to be able to print these on A1 or A0 paper (to use as a wall display) - but when I try to scale them everything gets bigger, including the text. I would like to keep the text small so that when the chart is printed, all of the text displays and none overflows.

Sunburst Chart

Does anyone have any suggestion how I could achieve this?

I've tried saving as various different formats. My next idea would be to perhaps use CSS

1

There are 1 best solutions below

1
magdalena On

You can define font size via exporting.chartOptions

Example config:

Highcharts.chart('container', {
  series: [{
    dataLabels: {
      enabled: true
    },
    data: [1, 2, 3, 4]
  }],

  exporting: {
    enabled: true,
    chartOptions: {
      plotOptions: {
        series: {
          dataLabels: {
            style: {
              fontSize: '56px'
            }
          }
        }
      }
    }
  }
})

Demo: https://jsfiddle.net/BlackLabel/ar49cbfh/

API Reference: https://api.highcharts.com/highcharts/exporting.chartOptions