Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a1c0a9c

Browse filesBrowse files
author
Kevin Yan
authored
Merge pull request plotly#508 from plotly/_plot_html_issues
Addressing issues in _plot_html
2 parents 982b5bc + fd2c4d1 commit a1c0a9c
Copy full SHA for a1c0a9c

File tree

Expand file treeCollapse file tree

2 files changed

+8
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-3
lines changed

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1515
import plotly.tools as tls
1616
help(tls.FigureFactory.create_gantt)
1717
```
18-
- Ability to download images in offline mode. By providing an extra keyword `image` to the existing plot calls, you can now download the images of the plots youmake in offline mode.
18+
- Ability to download images in offline mode. By providing an extra keyword `image` to the existing plot calls, you can now download the images of the plots you make in offline mode.
19+
20+
### Fixed
21+
- Fixed check for the height parameter passed to `_plot_html`, and now sets the correct `link text` for plots
22+
generated in offline mode.
1923

2024

2125
## [1.12.1] - 2016-06-19

‎plotly/offline/offline.py

Copy file name to clipboardExpand all lines: plotly/offline/offline.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ def _plot_html(figure_or_data, show_link, link_text, validate,
176176
width = str(width) + 'px'
177177

178178
try:
179-
float(width)
179+
float(height)
180180
except (ValueError, TypeError):
181181
pass
182182
else:
183-
width = str(width) + 'px'
183+
height = str(height) + 'px'
184184

185185
plotdivid = uuid.uuid4()
186186
jdata = json.dumps(figure.get('data', []), cls=utils.PlotlyJSONEncoder)
@@ -202,6 +202,7 @@ def _plot_html(figure_or_data, show_link, link_text, validate,
202202
.replace('https://', '')\
203203
.replace('http://', '')
204204
link_text = link_text.replace('plot.ly', link_domain)
205+
config['linkText'] = link_text
205206

206207
script = 'Plotly.newPlot("{id}", {data}, {layout}, {config})'.format(
207208
id=plotdivid,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.