-
-
Notifications
You must be signed in to change notification settings - Fork 143
Fix #260, allow '{}' as Graph.figure #285
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,10 @@ | |
| All notable changes to this project will be documented in this file. | ||
| This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
|
||
| ## [0.28.1] | ||
| ### Fixed | ||
| - Fix bug where front-end error was thrown when setting `Graph.figure = {}` (fixes [#260]). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a |
||
|
|
||
| ## [0.28.0] | ||
| - Upgraded Plotly.js, the underlying library behind the | ||
| `dash_core_components.Graph` component, to [version 1.40.1](https://github.com/plotly/plotly.js/releases/tag/v1.40.1). | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| __version__ = '0.28.0' | ||
| __version__ = '0.28.1' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import React, {Component} from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import {contains, intersection, filter, has, isNil, type, pluck} from 'ramda'; | ||
| import {contains, filter, has, isNil, type} from 'ramda'; | ||
| /* global Plotly:true */ | ||
|
|
||
| const filterEventData = (gd, eventData, event) => { | ||
|
|
@@ -77,18 +77,7 @@ export default class PlotlyGraph extends Component { | |
| if (animate && this._hasPlotted && figure.data.length === gd.data.length) { | ||
| return Plotly.animate(id, figure, animation_options); | ||
| } else { | ||
|
|
||
| let PlotMethod; | ||
| if (intersection( | ||
| pluck('type', figure.data), | ||
| ['candlestick', 'ohlc']).length | ||
| ) { | ||
| PlotMethod = Plotly.newPlot; | ||
| } else { | ||
| PlotMethod = Plotly.react; | ||
| } | ||
|
|
||
| return PlotMethod(id, figure.data, figure.layout, config).then( | ||
| return Plotly.react(id, figure.data, figure.layout, config).then( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you clarify this for me? Isn't
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure, I just reverted this commit: ea4e66c#diff-b2faf9645a4fcca0badb59ef2fba58a3
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For context, that change was made because there was a bug in Plotly. That bug was fixed in plotly/plotly.js#2561 but we never removed the fix from Dash.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #170 I found this, this is why we call Plotly.react
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some more context:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, great! Thanks for clarifying! |
||
| () => { | ||
| if (!this._hasPlotted) { | ||
| this.bindEvents(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also start adding dates here?