question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SVG API export problems

See original GitHub issue

Commit:

  • Master branch of higlass
  • Compiled version of Danielle’s higlass-multivec
  • Compiled version of master branch of higlass-website
  • Master branch of higlass-server

Steps to reproduce

  1. Initialize higlass container
  2. Use zoomTo() API call to relocate view to genomic position
  3. Use exportAsSvg() API call to export SVG

I have experimented with using setTimeout() to delay the execution of exportAsSvg() until after zoomTo() is given time to complete rendering (between 0-5 seconds), but the SVG output has the same render issues.

Observed behavior

  1. Chromosome track includes position labels from initial viewconf genomic position, as well as the position labels from to the post-zoomTo() call
  2. Track label components are not positioned correctly (specifically, the data resolution labels are left-aligned in the web view, but are centered in the SVG view)

Example SVG file is available here: https://gist.github.com/alexpreynolds/743af70631575bf1ecbad425e5034d13

In this example, the browser is initialized to a position on chrX and a zoomTo() call moves the browser to a position on chr3. The chromosome track contains labels from both chromosomes.

The SVG output should look similar to this:

test

However, this is the observed output (converted to PNG):

test2

Expected behavior

  • Track content should match the post-zoomTo() genomic position shown in the source web container
  • Track label components should match alignment and position of components in web container

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
pkerpedjievcommented, Oct 23, 2018

One of the more satisfying issues to close 😃

0reactions
alexpreynoldscommented, Oct 23, 2018

This seems to work much better, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SVG export via Export API stopped working #3003 - GitHub
Bug description When I attempt to export a chart as SVG using the export API without passing options chart.exporting.
Read more >
Quality issue when exporting SVGs that contain bitmaps
Hi. I'm working on an app and exploring the GET/v1/images/:key endpoint. While pure vector SVGs look fine, the quality of contained bitmaps ...
Read more >
Problems when exporting to svg - Google Groups
I'm trying to export a simple graph to svg format, but I'm facing some issues. My graph should contain a series of points...
Read more >
SVG export from a vega-lite api chart: error on opening the file
I would like to display a vega-lite-api generated chart and be able to save it as an SVG file or a PNG file....
Read more >
How to resolve issues with SVG exports from ArcGIS Pro?
Hello, I just created an ArcGIS Pro project with about 12 map files that I need to export and edit in Adobe Illustrator....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found