score:23
Accepted answer
As far as I can recall jQuery's .html()
makes use of innerHTML
which is meant for html, not svg. SVG's are xml documents, so you can use XMLSerializer()
var svg = document.getElementById('svg_root'); // or whatever you call it
var serializer = new XMLSerializer();
var str = serializer.serializeToString(svg);
score:0
For the problem you are not getting your svg content,
If only one svg chart is on page then use:
$('svg').html();
and if more than present then please see there is a div of highcharts_container because they create that svg charts. If you are using them.
Then use:
$('id of that div').html();
Source: stackoverflow.com
Related Query
- Why .html() doesn't work with SVG selectors using jquery ?
- How can i add element with attributes to SVG using jquery
- Why are Bootstrap tabs displaying tab-pane divs with incorrect widths when using highcharts?
- JavaScript - Export Div with SVG chart + HTML as and Image
- Create Density Heatmap Chart using Jquery with array of data
- SVG tooltip z-index with html title
- How to grab correct highchart number in selectors using Selenium Webdriver with Python with several charts on the page?
- Nested table yields unexpected columns for a basic column graph using high charts with 'Data defined in a HTML table'
- How to read and insert correct highchart number in selectors using Selenium Webdriver with Python?
- Jquery Highcharts is not loading when using with common function?
- Using highchart SVG images with Selenium
- Highcharts display label for pie chart using html table as data source
- With Highmaps, why is the callback in my jQuery fadein happening prior to the fade completing?
- HTML table as data source for highstock charts using highcharts
- Stacked Bar type of jquery Highcharts with data from HTML Table
- Using JSON data with the jQuery highcharts plugin
- Javascript - convert HTML div with SVG to image
- Why code of Horizonal line(y-axis) on a single in Highcharts get applied to all other charts integrated with Webdatarocks
- Parsing JSON for use with Highcharts using jquery .parseJSON or JSON.parse: how to remove quotes from function calls for formatters?
- Using Highcharts with SPServices jQuery library to create Pie Chart
- Is it possible to export HTML along with SVG markup to the Highcharts Export Server (http://export.highcharts.com/)
- Using the source version instead of mimified when import lib with reactjs and npm
- Is it possible to get highcharts range selector to work with jQuery timepicker, like it works with jQuery datepicker?
- Using HTML with Vue or how to adapt it to Vue.js
- Rendering Highcharts legend using HTML causes issue with positioning/spacing
- Iterate over a text label in HTML using JQUERY
- Highcharts code with same set of code/data works in PHP but does not work in JSfiddle
- Loading multiple variables using Highcharts and jquery with php
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Loading Highcharts via shim using RequireJS and maintaining jQuery dependency
More Query from same tag
- Show customized Mouse over on a bubble chart in Highchart JS
- Highcharts Pie dynamic series color
- Change Graph Series Fillcolor in highcharts
- Highcharts xAxis shows labels from drilldown on drillup
- Highcharts (PieChart) - chart width reduced on drawing second time
- How to use scrollbar on highcharts heatmap?
- Highcharts.js question: is it possible to keep some part of chart in visible area always, even if "overscoll" option is set
- Highcharts increase hover detection for markers
- HighCharts - Single legend for two columns in a Stack Column chart
- Hicharts.js Boxplots with a mean line
- Query rails database, and update highcharts using Javascript
- How to hide color axis in heatmaps using highcharts
- HighChart to show multiple chart after drill down?
- HighCharts Solid Gauge Chart not displaying ticks
- Highcharts / Highmaps with Angular - Cannot run demo
- Label hover function in highchart
- Make HTML element fill rest of page
- Flags Stack Distance Not Working
- r - How to set xlim and ylim range in a highcharter plot?
- Get Parent When Clicked Child Highcharts
- Highchart : sunburst chart not displaying
- How to change the color of a custom renderer text to the title color in Highcharts
- Position text and circle in Highcharts graph dynamically?
- Region Boundary in Scatter Chart in Highcharts
- Apply outer border for the highchart area chart
- Highcharts graph does not update with firebase
- Highcharts Angular navigator xAxis is not shrinking
- AngularJS Http Requests processed synchronously?
- How to add background colors to category groupings in Highcharts
- Data map to suitable Highcharts series