New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highchart excel export with multiple series skips data for scatter chart #6761

Closed
SushantKadam008 opened this Issue May 23, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@SushantKadam008

SushantKadam008 commented May 23, 2017

Expected behavior

When I export a highchart to excel with mutiple series and chart type as scatter it should show all series data.

Actual behavior

In actual scenario, the x-axis data points are skipped. If we change the chart type to line then proper export takes place.

Issue sample

If we modify the JS fiddle at https://jsfiddle.net/pscjzhe4/1/?utm_source=website&utm_medium=embed&utm_campaign=pscjzhe4

with the below data the issue can be reproduced

$('#example-1').highcharts({
   chart: {
      type: 'scatter'
   },
  title: {
    text: 'Monthly Average Temperature',
    x: -20 //center
  },
  subtitle: {
    text: 'Source: WorldClimate.com',
    x: -20
  },
  xAxis: {
    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
    'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
    ]
  },
  yAxis: {
    title: {
      text: 'Temperature (°C)'
    },
    plotLines: [{
      value: 0,
      width: 1,
      color: '#808080'
    }]
  },
  tooltip: {
    valueSuffix: '°C'
  },
  legend: {
    layout: 'vertical',
    align: 'right',
    verticalAlign: 'middle',
    borderWidth: 0
  },
series: [{
    name: 'New York',
    data: [{x : -8.3 , y : 445.42},{x : -8.2 , y : 450.83},{x : -8.0 , y : 520.83},{x : -6.3 , y : 529.58},
    {x : -6.1 , y : 415.42}]
  },{
    name: 'Tokyo',
    data: [{x : -12.9 , y : 594.25},{x : -12.7 , y : 710.83},{x : -6.8 , y : 549.58}]
  }]
});

Affected browser(s)

All browser

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus May 23, 2017

Contributor

It works fine for me, demo: https://jsfiddle.net/bsfmbwc8/

And this is the result:
chart_download.xlsx

Which looks like this:

screen shot 2017-05-23 at 16 53 33

Tested with: Chrome Version 58.0.3029.110 (64-bit) (OSX)

Contributor

pawelfus commented May 23, 2017

It works fine for me, demo: https://jsfiddle.net/bsfmbwc8/

And this is the result:
chart_download.xlsx

Which looks like this:

screen shot 2017-05-23 at 16 53 33

Tested with: Chrome Version 58.0.3029.110 (64-bit) (OSX)

@SushantKadam008

This comment has been minimized.

Show comment
Hide comment
@SushantKadam008

SushantKadam008 May 23, 2017

SushantKadam008 commented May 23, 2017

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus May 23, 2017

Contributor

You are right! I just noticed that values from first series are in wrong categories.

Minified demo: https://jsfiddle.net/cqjvD/1452/

Contributor

pawelfus commented May 23, 2017

You are right! I just noticed that values from first series are in wrong categories.

Minified demo: https://jsfiddle.net/cqjvD/1452/

@pawelfus pawelfus added Bug and removed Cant reproduce labels May 23, 2017

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi May 24, 2017

Collaborator

Demo with the fix applied: http://jsfiddle.net/dynpms3g/2/.

Note that the export-csv plugin has now ascended to a Highcharts module, and maintenance will continue there.

Collaborator

TorsteinHonsi commented May 24, 2017

Demo with the fix applied: http://jsfiddle.net/dynpms3g/2/.

Note that the export-csv plugin has now ascended to a Highcharts module, and maintenance will continue there.

@SushantKadam008

This comment has been minimized.

Show comment
Hide comment
@SushantKadam008

SushantKadam008 May 24, 2017

HI @TorsteinHonsi ,
What was the fix ? Do I need to use latest version of export-csv ?

SushantKadam008 commented May 24, 2017

HI @TorsteinHonsi ,
What was the fix ? Do I need to use latest version of export-csv ?

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi May 26, 2017

Collaborator

This is the fix: 12ce502.

As indicated, the export-csv plugin is now deprecated. The Highcharts module will be updated with the next maintenance release. Until then, you can apply the fix directly to the source code.

Collaborator

TorsteinHonsi commented May 26, 2017

This is the fix: 12ce502.

As indicated, the export-csv plugin is now deprecated. The Highcharts module will be updated with the next maintenance release. Until then, you can apply the fix directly to the source code.

@SushantKadam008

This comment has been minimized.

Show comment
Hide comment
@SushantKadam008

SushantKadam008 Jun 13, 2017

@TorsteinHonsi : DO I need to use latest plugin of export-csv ? Where should I apply the fix ?

SushantKadam008 commented Jun 13, 2017

@TorsteinHonsi : DO I need to use latest plugin of export-csv ? Where should I apply the fix ?

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Jun 13, 2017

Contributor

Please, try our pre-release version: http://github.highcharts.com/modules/export-data.src.js

Contributor

pawelfus commented Jun 13, 2017

Please, try our pre-release version: http://github.highcharts.com/modules/export-data.src.js

simonberger pushed a commit to simonberger/export-csv that referenced this issue Mar 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment