Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

swap out Plotly.newPlot with Plotly.react #170

Merged
merged 2 commits into from
Mar 1, 2018
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
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.20.0] - 2018-03-01
### Added
- Upgraded Plotly.js, the underlying library behind the
`dash_core_components.Graph` component, to [version 1.34.0](https://github.com/plotly/plotly.js/releases/tag/v1.34.0).
See https://github.com/plotly/plotly.js/releases/tag/v1.34.0 for the official notes.

Many of these features were funded directly by companies that rely on this library.
If your organization or company would like to sponsor particular features or
bug fixes in these open source libraries, please reach out: http://plot.ly/products/consulting-and-oem

- Add constraint-type contours to `contour` traces [https://github.com/plotly/plotly.js/pull/2270]
- Add `notched` and `notchwidth` attributes to `box` traces [https://github.com/plotly/plotly.js/pull/2305]
- Add localization machinery to auto-formatted date axis ticks [https://github.com/plotly/plotly.js/pull/2261]
- Add support for `text` in `mesh3d` traces [https://github.com/plotly/plotly.js/pull/2327]
- Add support for scalar `text` in `surface` traces [https://github.com/plotly/plotly.js/pull/2327]
- Make mode bar for graphs with multiple subplot types more usable [https://github.com/plotly/plotly.js/pull/2339]

### Fixed
- The `Graph` component now uses `Plotly.react` instead of `Plotly.newPlot`. This should fix issues when repeatedly updating GL chart types (`surface`, `scatter3d`, `scattergl`). #170
- Many other bug fixes from the PLotly.js upgrade, including:
- Prevent page scroll on mobile device on `gl2d` and `gl3d` subplots [https://github.com/plotly/plotly.js/pull/2296]
- Fix multi-marker `scattergl` selection errors (bug introduced in `1.33.0`) [https://github.com/plotly/plotly.js/pull/2295]
- Fix trace `opacity` restyle for `scattergl` traces (bug introduced in `1.33.0`) [https://github.com/plotly/plotly.js/pull/2299]
- Fix `scattergl` handling of `selectedpoints` across multiple traces [https://github.com/plotly/plotly.js/pull/2311]
- Fix `scattergl` horizontal and vertical line rendering [https://github.com/plotly/plotly.js/pull/2340]
- Fix `table` when content-less cells and headers are supplied [https://github.com/plotly/plotly.js/pull/2314]
- Fix `hoverformat` on `visible: false` cartesian axes (bug introduced in `1.33.0`) [https://github.com/plotly/plotly.js/pull/2329]
- Fix handling of double negative translate transform values [https://github.com/plotly/plotly.js/pull/2339]
- Fix compare `hovermode` fallback for non-cartesian subplot types [https://github.com/plotly/plotly.js/pull/2339]


## [0.19.0] - 2018-02-11
### Changed
- `PropTypes` now uses `prop-types` package instead of `React` to support move to React 16+
Expand Down
4 changes: 2 additions & 2 deletions dash_core_components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

_js_dist = [
{
'external_url': 'https://cdn.plot.ly/plotly-1.33.1.min.js',
'relative_package_path': 'plotly-1.33.1.min.js',
'external_url': 'https://cdn.plot.ly/plotly-1.34.0.min.js',
'relative_package_path': 'plotly-1.34.0.min.js',
'namespace': 'dash_core_components'
},
{
Expand Down
7 changes: 0 additions & 7 deletions dash_core_components/plotly-1.33.1.min.js

This file was deleted.

7 changes: 7 additions & 0 deletions dash_core_components/plotly-1.34.0.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_core_components/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.19.0'
__version__ = '0.20.0'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash-core-components",
"version": "0.19.0",
"version": "0.20.0",
"description": "Core component suite for Dash",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Graph.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class PlotlyGraph extends Component {
if (animate && hasPlotted && figure.data.length === gd.data.length) {
return Plotly.animate(id, figure, animation_options);
} else {
return Plotly.newPlot(id, figure.data, figure.layout, config).then(() => {
return Plotly.react(id, figure.data, figure.layout, config).then(() => {
this.bindEvents(props);
this.setState({hasPlotted: true});
});
Expand Down