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 palettes with 20 and 30 categories #64701

Merged
merged 5 commits into from
May 5, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Apr 28, 2020

This PR updates categorical palettes with additional palettes. One has 20 categories and the other has 30 categories. This will help users with higher cardinality fields.

Screen Shot 2020-04-28 at 3 08 14 PM

@nreese nreese added release_note:enhancement [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.8.0 labels Apr 28, 2020
@nreese nreese requested review from jsanz and thomasneirynck April 28, 2020 21:11
@nreese nreese requested a review from a team as a code owner April 28, 2020 21:11
@elasticmachine
Copy link
Contributor

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

@@ -260,33 +260,40 @@ export class BlendedVectorLayer extends VectorLayer implements IVectorLayer {
prevDataRequest: this.getDataRequest(dataRequestId),
nextMeta: searchFilters,
});
if (canSkipFetch) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR highlighted an error with blended vector layers that super._syncData is skipped when new source data is not needed. Skipping super._syncData could prevent style meta changes from gettin picked up and re-synced.

@jsanz
Copy link
Member

jsanz commented Apr 29, 2020

tested for both fill and border color palettes

image

This makes it more evident that legends by the same field should show different properties together to avoid legends that tall and with so much white space. This rings a bell of an issue, but I haven't found it, should I create it?

@nreese
Copy link
Contributor Author

nreese commented Apr 29, 2020

This makes it more evident that legends by the same field should show different properties together to avoid legends that tall and with so much white space. This rings a bell of an issue, but I haven't found it, should I create it?

I don't think an issue ever got created. Please create one

@jsanz
Copy link
Member

jsanz commented Apr 29, 2020

I don't think an issue ever got created. Please create one

Thanks, I will put this on hold since the example I used was rather stupid since I could simply put a zero width 🙃, and I can't find another good use case for that situation. The other variable I think would fit in this case is shape, but still not really clear to me. Sorry for the noise.

@nreese
Copy link
Contributor Author

nreese commented Apr 30, 2020

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented May 4, 2020

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented May 5, 2020

@elasticmachine merge upstream

@kindsun
Copy link
Contributor

kindsun commented May 5, 2020

This is great! It allows for much more colorful and informative maps. Functionally it expands the utility of maps and code-wise, it looks really good.

The one issue I have is the same one cited above by @jsanz with the height of the legend. It's hard for me to consider this a separate issue though. I understand you could argue this issue always existed, but having this many categories hits a tipping point where it seems like there should be an accompanying solution possibly in the form of some combination of the following (apologies if I'm missing any history on any of these):

  • Accordion approach so other categories close when one opens
  • Consolidation of shapes and outlines, or maybe show them next to each other if not possible?
  • Some form of limiting or scrolling of categories

I also understand we're trying to squeeze a lot in what is both a legend and an interactive control interface which I think is why this is getting harder.

Copy link
Member

@jsanz jsanz left a comment

Choose a reason for hiding this comment

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

From a functional point of view, I don't see any issues with adding these two new categorical palettes. Tested locally on Firefox and Chromium.

I have a couple of comments about the Other category, but since it applies to all palettes I will put them into a new request.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@jsanz
Copy link
Member

jsanz commented May 5, 2020

@aaronjcaldwell we already offer scrolling for large legends, limiting further the height feels too complex for the user. A different approach for categorical maps may be worth exploring, something like what we have in visualize where by default legend is set up on the right, so vertical layout as we do, but it's also possible to put them on top or the bottom of the panel, so horizontal layout. We could have a setting in the layer for allowing the legend to have multiple columns, or just to flow horizontally as in our other charts.

Also as you mention, maybe we could combine different variables horizontally, but maybe that could be confusing, I'd need to see this in a mockup or something. The vertical layout for different variables seems to work pretty well to me, even we could maybe improve the layout a bit. In the following gif I show a layer with all variables activated, it's impossible to say to which variable they apply, right?

Peek 2020-05-05 15-52

@nreese
Copy link
Contributor Author

nreese commented May 5, 2020

The one issue I have is the same one cited above by @jsanz with the height of the legend. It's hard for me to consider this a separate issue though.

Allowing for more categories is value added and the legend does scroll when the page height is reached. Any problems with merging this as is?

@kindsun kindsun assigned kindsun and unassigned kindsun May 5, 2020
@kindsun kindsun self-requested a review May 5, 2020 14:05
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.

@jsanz @nreese I'm sorry, the scrolling suggestion wasn't very specific. I understand the current vertical scrolling behavior, I was referring to some way of limiting the size of the container containing the labels specifically to something scrollable. I'm not 100% sold on that solution either (no one likes scrollable containers in scrollable containers) but mostly just spitballing ideas.

No objections to merging.

@nreese nreese merged commit f2d1095 into elastic:master May 5, 2020
nreese added a commit to nreese/kibana that referenced this pull request May 5, 2020
)

* [Maps] add categorical palettes with 20 and 30 categories

* fix ts-lint

Co-authored-by: Elastic Machine <[email protected]>
nreese added a commit that referenced this pull request May 5, 2020
…65275)

* [Maps] add categorical palettes with 20 and 30 categories

* fix ts-lint

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 5, 2020
* master: (133 commits)
  Cleanup Typescript index pattern field editor / Expression functions for bucket agg (elastic#65254)
  Removes legacy infra plugin and moves saved objects registration to NP (elastic#64848)
  Added support for docLinks plugin in Connectors forms and missing save capabilities for modal dialog (elastic#64986)
  [SIEM] Removes prebuilt rules number dependency (elastic#65128)
  [Maps] add categorical palettes with 20 and 30 categories (elastic#64701)
  [CI] Slack alerts - Elasticsearch snapshot failures (elastic#64724)
  [Uptime] Console errors in case index missing (elastic#65115)
  [SIEM][CASE] Dynamic fields mapping based on connector (elastic#64412)
  [test/functional] Tsfy page objects (elastic#64887)
  [Maps] [Telemetry] Track geo_point and geo_shape index patterns separately (elastic#65195)
  [Maps] Add global fit to data (elastic#64702)
  Visualize: Reload on ui state change and fix ui state for tsvb (elastic#63699)
  [SIEM] [Cases] External service selection per case (elastic#64775)
  [Uptime] Set ML anomaly look-back to 2w (from 24h) / Add spinner (elastic#65055)
  [Metrics UI] Remove APM Hard Dependency (elastic#64952)
  [Ingest] Datastream list: add icons and dashboard links (elastic#65048)
  disable plugins. they could access ES via SO repository (elastic#65242)
  Feature fleet enrollment instructions (elastic#65176)
  [SIEM] Adds 'Configure connector' Cypress test (elastic#64807)
  [TSVB] Fix std deviation band mode (elastic#64413)
  ...
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.

5 participants