Skip to content

Commit

Permalink
Fix Match function type default circle radius bug (#74)
Browse files Browse the repository at this point in the history
* fixed default radius coerce to string bug, add test

* updated example to include match type radius function
  • Loading branch information
ryanbaumann committed Mar 17, 2018
1 parent fcea62b commit 5ca5cbd
Show file tree
Hide file tree
Showing 3 changed files with 358 additions and 39 deletions.
391 changes: 353 additions & 38 deletions examples/point-viz-categorical-example.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mapboxgl/templates/graduated_circle.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"minzoom": {{ minzoom }},
"paint": {
"circle-color": generatePropertyExpression("{{ colorType }}", "{{ colorProperty }}", {{ colorStops }}, "{{ defaultColor }}" ),
"circle-radius" : generatePropertyExpression("{{ radiusType }}", "{{ radiusProperty }}", {{ radiusStops }}, "{{ defaultRadius }}" ),
"circle-radius" : generatePropertyExpression("{{ radiusType }}", "{{ radiusProperty }}", {{ radiusStops }}, {{ defaultRadius }} ),
"circle-stroke-color": "grey",
"circle-stroke-width": generatePropertyExpression('interpolate','zoom', [[0,0.01], [18,1]]),
"circle-opacity" : {{ opacity }}
Expand Down
4 changes: 4 additions & 0 deletions tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def test_display_GraduatedCircleViz(display, data):
color_property="Avg Medicare Payments",
label_property="Avg Medicare Payments",
radius_property="Avg Covered Charges",
radius_function_type="match",
color_function_type="match",
radius_default=2,
color_default="red",
access_token=TOKEN)
viz.show()
display.assert_called_once()
Expand Down

0 comments on commit 5ca5cbd

Please sign in to comment.