Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_choropleth figure factory returns go.Figure #1600

Merged
merged 1 commit into from
Jun 10, 2019
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
3 changes: 2 additions & 1 deletion plotly-package/plotly/figure_factory/_county_choropleth.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import plotly.colors as clrs
from plotly.figure_factory import utils
from plotly.exceptions import PlotlyError
import plotly.graph_objs as go

pd.options.mode.chained_assignment = None

Expand Down Expand Up @@ -950,4 +951,4 @@ def create_choropleth(fips, values, scope=['usa'], binning_endpoints=None,
fig['layout']['yaxis']['range'][0] = center[1] - new_height * 0.5
fig['layout']['yaxis']['range'][1] = center[1] + new_height * 0.5

return fig
return go.Figure(fig)
Original file line number Diff line number Diff line change
Expand Up @@ -2817,7 +2817,7 @@ def test_full_choropleth(self):
simplify_county=1
)

exp_fig_head = [
exp_fig_head = (
-88.053375,
-88.02916499999999,
-88.02432999999999,
Expand Down Expand Up @@ -2868,7 +2868,7 @@ def test_full_choropleth(self):
-85.142567,
-85.113329,
-85.10533699999999
]
)

self.assertEqual(fig['data'][2]['x'][:50], exp_fig_head)

Expand Down