diff --git a/CHANGELOG.md b/CHANGELOG.md index 36eece963c4..fbcc2bbdea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). import plotly.tools as tls help(tls.FigureFactory.create_gantt) ``` -- 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. +- 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. + +### Fixed +- Fixed check for the height parameter passed to `_plot_html`, and now sets the correct `link text` for plots +generated in offline mode. ## [1.12.1] - 2016-06-19 diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index c1ca5256e57..e06f28c27a3 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -176,11 +176,11 @@ def _plot_html(figure_or_data, show_link, link_text, validate, width = str(width) + 'px' try: - float(width) + float(height) except (ValueError, TypeError): pass else: - width = str(width) + 'px' + height = str(height) + 'px' plotdivid = uuid.uuid4() jdata = json.dumps(figure.get('data', []), cls=utils.PlotlyJSONEncoder) @@ -202,6 +202,7 @@ def _plot_html(figure_or_data, show_link, link_text, validate, .replace('https://', '')\ .replace('http://', '') link_text = link_text.replace('plot.ly', link_domain) + config['linkText'] = link_text script = 'Plotly.newPlot("{id}", {data}, {layout}, {config})'.format( id=plotdivid,