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

[Maps] Add categorical styling #54408

Merged
merged 42 commits into from
Jan 15, 2020

Conversation

thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented Jan 9, 2020

Closes #32202 by adding categorical styling for color properties.


Scope

String fields can be matched to a color

Using a custom palette

image

Using one of the default palettes.

image

When using one of the default palettes, the top ten terms from the underlying data are used to style the features.


To keep this PR as small as possible, it excludes some additional features. These can be addressed in subsequent PRs:

  • add categorical styling for number-fields. This would require an additional refactoring of the UX.
  • auto-complete of values in the custom editor.

@thomasneirynck thomasneirynck force-pushed the maps/add_categories branch 4 times, most recently from 721ad06 to db8ad51 Compare January 12, 2020 06:41
@thomasneirynck thomasneirynck marked this pull request as ready for review January 12, 2020 06:53
@thomasneirynck thomasneirynck requested a review from a team as a code owner January 12, 2020 06:53
@thomasneirynck thomasneirynck added the [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation label Jan 12, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@thomasneirynck thomasneirynck changed the title [WIP] Add categorical styling Add categorical styling Jan 12, 2020
remove cruft

remove cruft

more palettes

move options to size as well

default

rename

auto-select

tmp

stops

for consistency

fix legend

toggle behavior

add default stop

subdued text color

custom legend
check vlaidyt
add unit test for legend rendering

more tests
restore

deal with incomplete config
@thomasneirynck thomasneirynck requested a review from nreese January 14, 2020 17:23
@thomasneirynck thomasneirynck requested a review from nreese January 14, 2020 19:59
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
code review, tested in chrome

@thomasneirynck thomasneirynck changed the title Add categorical styling [Maps] Add categorical styling Jan 14, 2020
Copy link
Contributor

@kindsun kindsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Great addition! Thanks for the lifecycle updates to color_map_select. Offline we discussed one more hopefully quick fix for occasionally passing an undefined color value to mapbox which causes an error but doesn't appear to affect functionality. Otherwise, works smoothly! lgtm

  • tested locally in chrome
  • code review

@thomasneirynck
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@thomasneirynck
Copy link
Contributor Author

thomasneirynck commented Jan 15, 2020

thx @aaronjcaldwell , 0532b65 should address the undefined branch coloring issue.

@thomasneirynck thomasneirynck merged commit 0ff668b into elastic:master Jan 15, 2020
thomasneirynck added a commit to thomasneirynck/kibana that referenced this pull request Jan 15, 2020
This allows users to style fields by category. Users can either uses one of default color palettes or specify a custom ramp.
nickpeihl pushed a commit that referenced this pull request Jan 15, 2020
This allows users to style fields by category. Users can either uses one of default color palettes or specify a custom ramp.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 15, 2020
* upstream/master: (72 commits)
  [ML] Calculate model memory limit API integration tests (elastic#54557)
  Skip flakey index template component integration tests. (elastic#54878)
  Add label and icon to nested fields in the doc table (elastic#54199)
  Reverse dependency of home plugin and apm/ml/cloud (elastic#52883)
  [SIEM][Detection Engine] Order JSON keys, fix scripts, update pre-packaged rules
  update invalid snapshot
  add readme note about alerting / manage_api_key cluster privilege (elastic#54639)
  [SIEM] New Overview Page (elastic#54783)
  [Uptime] Feature/refactor context initialization (elastic#54494)
  Upgrade EUI to v18.2.0 (elastic#54786)
  [SIEM] [Detection engine] from signals to timeline (elastic#54769)
  [Index Management] Add Mappings Editor to Index Template Wizard (elastic#47562)
  [SIEM][Detection Engine] Removes deprecated filter from mapping
  [Maps] Add categorical styling (elastic#54408)
  Add mapbox-gl-rtl-text library (elastic#54842)
  [SIEM][Detection Engine] Adds actions to Rule Details (elastic#54828)
  Lexicographically sort location tags (elastic#54832)
  [Maps] expand extent filter to tile boundaries (elastic#54276)
  [Maps] Use v7.6 Elastic Maps Service API (elastic#54399)
  [DOCS] Adds monitoring setting (elastic#54819)
  ...
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
This allows users to style fields by category. Users can either uses one of default color palettes or specify a custom ramp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] Should be able to style properties based on classifier
7 participants