Skip to content

Commit

Permalink
1.8.5(hotfix)
Browse files Browse the repository at this point in the history
 * fixed bug with column calculation for map inputs
 * #149, icons for map types
  • Loading branch information
Andrew Schonfeld authored and aschonfeld committed Apr 6, 2020
1 parent a15e891 commit a591235
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -5,7 +5,7 @@ defaults: &defaults
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
CODECOV_TOKEN: b0d35139-0a75-427a-907b-2c78a762f8f0
VERSION: 1.8.4
VERSION: 1.8.5
PANDOC_RELEASES_URL: https://github.com/jgm/pandoc/releases
steps:
- checkout
Expand Down
6 changes: 5 additions & 1 deletion CHANGES.md
@@ -1,8 +1,12 @@
## Changelog

### 1.8.5 [hotfix] (2020-4-5)
* fixed bug with column calculation for map inputs
* [#149](https://github.com/man-group/dtale/issues/149)

### 1.8.4 [hotfix] (2020-4-5)
* update to setup.py to include missing static topojson files
* [#145](https://github.com/man-group/dtale/issues/143)
* [#145](https://github.com/man-group/dtale/issues/145)

### 1.8.3 (2020-4-4)
* [#143](https://github.com/man-group/dtale/issues/143), scattergeo map chart UI changes
Expand Down
2 changes: 1 addition & 1 deletion docker/2_7/Dockerfile
Expand Up @@ -44,4 +44,4 @@ WORKDIR /app

RUN set -eux \
; . /root/.bashrc \
; easy_install dtale-1.8.4-py2.7.egg
; easy_install dtale-1.8.5-py2.7.egg
2 changes: 1 addition & 1 deletion docker/3_6/Dockerfile
Expand Up @@ -44,4 +44,4 @@ WORKDIR /app

RUN set -eux \
; . /root/.bashrc \
; easy_install dtale-1.8.4-py3.7.egg
; easy_install dtale-1.8.5-py3.7.egg
4 changes: 2 additions & 2 deletions docs/source/conf.py
Expand Up @@ -64,9 +64,9 @@
# built documents.
#
# The short X.Y version.
version = u'1.8.3'
version = u'1.8.5'
# The full version, including alpha/beta/rc tags.
release = u'1.8.4'
release = u'1.8.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
49 changes: 27 additions & 22 deletions dtale/dash_application/layout.py
Expand Up @@ -187,8 +187,8 @@ def build_option(value, label=None):
'albers usa', 'winkel tripel', 'aitoff', 'sinusoidal']


def build_proj_img_src(proj):
return '/images/projections/{}.png'.format('_'.join(proj.split(' ')))
def build_img_src(proj, img_type='projections'):
return '/images/{}/{}.png'.format(img_type, '_'.join(proj.split(' ')))


def build_proj_hover_children(proj):
Expand All @@ -197,7 +197,7 @@ def build_proj_hover_children(proj):
return [
html.I(className='ico-help-outline', style=dict(color='white')),
html.Div(
[html.Div(proj), html.Img(src=build_proj_img_src(proj))],
[html.Div(proj), html.Img(src=build_img_src(proj))],
className='hoverable__content',
style=dict(width='auto')
)
Expand Down Expand Up @@ -389,7 +389,7 @@ def build_map_options(df, type='choropleth', loc=None, lat=None, lon=None, map_v
if classify_type(dtype) == 'S':
str_cols.append(c)

lat_options = [build_option(c) for c in float_cols if c['name'] not in build_selections(lon, map_val)]
lat_options = [build_option(c) for c in float_cols if c not in build_selections(lon, map_val)]
lon_options = [build_option(c) for c in float_cols if c not in build_selections(lat, map_val)]
loc_options = [build_option(c) for c in str_cols if c not in build_selections(map_val)]

Expand Down Expand Up @@ -460,6 +460,28 @@ def build_group_val_options(df, group_cols):
]


def build_map_type_tabs(map_type):
def _build_hoverable():
for t in MAP_TYPES:
yield html.Div([
html.Span(t.get('label', t['value'].capitalize())),
html.Img(src=build_img_src(t['value'], img_type='map_type'))
], className='col-md-6')

return html.Div(
[dcc.Tabs(
id='map-type-tabs',
value=map_type or 'choropleth',
children=[build_tab(t.get('label', t['value'].capitalize()), t['value']) for t in MAP_TYPES],
style=dict(height='36px'),
), html.Div(
html.Div(list(_build_hoverable()), className='row'),
className='hoverable__content map-types'
)],
style=dict(paddingLeft=15, borderBottom='none'), className="pr-5 hoverable"
)


def main_inputs_and_group_val_display(inputs):
chart_type = inputs.get('chart_type')
show_group = show_input_handler(inputs.get('chart_type', 'line'))('group')
Expand Down Expand Up @@ -618,24 +640,7 @@ def show_map_style(show):
),
html.Div(
[
# build_input('Map Type', dcc.Dropdown(
# id='map-type-dropdown',
# options=[build_option(v, v.capitalize()) for v in ['choropleth', 'scattergeo']],
# value=map_type or 'choropleth',
# style=dict(width='inherit'),
# className='map-dd'
# )),
html.Div(
dcc.Tabs(
id='map-type-tabs',
value=map_type or 'choropleth',
children=[
build_tab(t.get('label', t['value'].capitalize()), t['value']) for t in MAP_TYPES
],
style=dict(height='36px')
),
style=dict(paddingLeft=15)
),
build_map_type_tabs(map_type),
html.Div(
[
html.Div(
Expand Down
11 changes: 9 additions & 2 deletions dtale/static/css/main.css
Expand Up @@ -10168,6 +10168,11 @@ li.hoverable:hover {
top: -0.8em;
left: 11.5em;
}
.hoverable__content.map-types {
min-width: 13em;
right: unset;
left: 0;
}
.hoverable__content.build-code {
width: auto;
right: unset;
Expand Down Expand Up @@ -10214,7 +10219,8 @@ div.hoverable.label > div.hoverable__content {
right: inherit;
transform: rotate(270deg);
}
.hoverable__content.build-code::before {
.hoverable__content.build-code::before,
.hoverable__content.map-types::before {
right: unset;
left: 2em;
}
Expand Down Expand Up @@ -10247,7 +10253,8 @@ div.hoverable.label > div.hoverable__content {
right: inherit;
transform: rotate(270deg);
}
.hoverable__content.build-code::after {
.hoverable__content.build-code::after,
.hoverable__content.map-types::after {
right: unset;
left: 2em;
}
Expand Down
Binary file added dtale/static/images/map_type/choropleth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dtale/static/images/map_type/scattergeo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "dtale",
"version": "1.8.4",
"version": "1.8.5",
"description": "Visualizer for Pandas Data Structures",
"main": "main.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -50,7 +50,7 @@ def run_tests(self):

setup(
name="dtale",
version="1.8.4",
version="1.8.5",
author="MAN Alpha Technology",
author_email="ManAlphaTech@man.com",
description="Web Client for Visualizing Pandas Objects",
Expand Down

0 comments on commit a591235

Please sign in to comment.