chrisb89123456789

PDF Export ignores dashstyle

Dear all,

I am experiencing a problem with the offline export that I cannot explain. For some reason, on my local machine the dash style is ignored, if I try to export the chart as PDF.

The error occurs:
  • Parallel Coordinates Chart
  • DashStyle per series
  • offline-export
  • pdf format
The error does not occur:
  • on js fiddle
  • in any other export format than pdf
Any ideas what I could do to search for the reason? I am using 6.2

Thanks
Chris
chrisb89123456789

Re: PDF Export ignores dashstyle

By the way, I exported some charts from Highcharts as PDF and included them in latex files. Thereby. I get the following warning

Couldn't read xref table Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...

Again, if I export my chart as SVG and convert them to PDF, the warning is gone...
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: PDF Export ignores dashstyle

Hi, Chris!

I have tested offline exporting to pdf with parallel-coordinates chart and series with dashStyles and everything works as expected. See my settings:

Code: Select all

<!DOCTYPE html>
<html>
  <head>
    <title>test</title>
    <link rel="stylesheet" type="text/css" href="style/style.css">
  </head>

  <body>
    <div id="container"></div>
    <button id="export">Export</button>
    <script src="https://code.highcharts.com/highcharts.js"></script>
    <script src="https://code.highcharts.com/modules/exporting.js"></script>
    <script src="https://code.highcharts.com/modules/offline-exporting.js"></script>
    <script src="https://code.highcharts.com/modules/parallel-coordinates.js"></script>
    <script>
      let chart = Highcharts.chart('container', {
        chart: {
            parallelCoordinates: true
        },

        series: [{
          type: 'spline',
          data: [18, 42, 32]
        }, {
          type: 'spline',
          data: [8, 2, 72],
          dashStyle: 'dash'
        }, {
          type: 'spline',
          data: [38, 22, 42]
        }]
      });

      document.getElementById('export').addEventListener('click', function() {
        chart.exportChartLocal({
          type: 'application/pdf',
          width: 600,
        }, {
          title: {
            text: 'It works'
          }
        });
      })
    </script>
  </body>
</html>
Best regards!
Rafal Sebestjanski,
Highcharts Team Lead

Return to “Highcharts Usage”