Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Orange/widgets/highcharts.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,15 @@ def _on_selected_points(self, points):
self._selection_callback([np.sort(selected).astype(int)
for selected in points])

def svg(self):
"""
Returns div that is container of a chart.
This method overrides svg method from WebView because
SVG itself does not contain chart labels (title, axis labels, ...)
"""
html = self.frame.toHtml()
return html[html.index('<div id="container"'):html.rindex('</div>') + 6]


def main():
""" A simple test. """
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ def svg(self):
""" Return SVG string of the first SVG element on the page, or
raise ValueError if not any. """
html = self.frame.toHtml()
return html[html.index('<svg '):html.index('</svg>') + 5]
return html[html.index('<svg '):html.index('</svg>') + 6]