Skip to content

Commit 6cd1e9e

Browse files
committed
addressing #504 and #505
1 parent 982b5bc commit 6cd1e9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plotly/offline/offline.py

Lines 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)