Skip to content

Commit

Permalink
Improved: Updated Feature through time tooltip with color channel inf…
Browse files Browse the repository at this point in the history
…ormation.
  • Loading branch information
AAnzel committed Jan 14, 2022
1 parent 160f2b1 commit 58b012b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Source/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,9 @@ def select_case_study_default_vis(key_suffix):
elif key_suffix.endswith('Metabolomics_CASE_STUDY'):
default_visualizations_dict['Feature through time'] = ['L1sum_MP']

else:
pass

return default_visualizations_dict


Expand Down
5 changes: 3 additions & 2 deletions Source/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def time_feature(data, selected_column, temporal_column, target_feature):
scale=alt.Scale(nice=True)),
alt.Y(selected_column, type='quantitative'),
alt.Color(target_feature, type='nominal'),
alt.Tooltip([temporal_column, selected_column]))
alt.Tooltip([temporal_column, selected_column,
target_feature]))
else:
# TODO: https://altair-viz.github.io/gallery/select_mark_area.html
# brush = alt.selection_interval(encodings=['x'])
Expand Down Expand Up @@ -344,7 +345,7 @@ def time_heatmap(data, target_feature, temporal_feature):
# https://altair-viz.github.io/user_guide/transform/timeunit.html
target_column_type = str(data[target_feature].dtype)

target_type = 'ordinal' if target_column_type == 'string'\
target_type = 'nominal' if target_column_type == 'string'\
else 'quantitative'
target_color_scheme = 'tableau20' if target_column_type == 'string'\
else 'greys'
Expand Down

0 comments on commit 58b012b

Please sign in to comment.