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

Replace Discover chart with elastic-charts #43788

Merged
merged 28 commits into from
Sep 10, 2019

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Aug 22, 2019

Summary

Replace PR #36517

This PR swaps out the current implementation of the histogram chart in Discover to use elastic-charts instead.

The replacement implies few small changes: the tooltip configured is a vertical cursor, always present. This simplify the interaction with smaller bars and also simplify the hover over the edges when the bucket doesn't fully cover the interval. In those cases It will shown only one tooltip instead of two different one that describe the situation:
before
Aug-28-2019 11-41-13

now
Screenshot 2019-08-28 at 11 37 06

notes
The discover functional tests that rely on checking the SVG bar heights have been skipped out as elastic-charts currently renders in canvas until this task is completed: elastic/elastic-charts#215
elastic/elastic-charts#310
elastic/elastic-charts#77

TODOs have been left so that these tests can be updated once elastic-charts provides a way to handle integration tests, and a meta issue will be created to track them

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@markov00 markov00 requested a review from a team as a code owner August 22, 2019 16:57
@markov00 markov00 added enhancement New value added to drive a business result Feature:Discover Discover Application Feature:ElasticCharts Issues related to the elastic-charts library release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Aug 22, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@markov00 markov00 added the WIP Work in progress label Aug 22, 2019
@markov00 markov00 changed the title [discover] use elastic-charts for histogram [wip] [discover] use elastic-charts for histogram Aug 22, 2019
@ryankeairns
Copy link
Contributor

@mdefazio Here is the PR for the chart atop Discover.

@mdefazio
Copy link
Contributor

I had a moment and threw together a quick sketch of a possible solution to minimize the amount of space the charts take at the top of the page. User would then have the ability to expand to show the labels/axis, etc.

  • Removes the redundant date field above the chart
  • Increases the size of the result/hit count
  • The styling of the chart is for presentation only—not suggesting a different style than EUI charts theme.

Chart--collapse
Chart--expand

@timroes
Copy link
Contributor

timroes commented Aug 26, 2019

@mdefazio I like that design. I am just not sure if we should do that in this PR, since I think we want to save the configuration of the chart with the discover view. Also we should ideally at the same time move the hits. So I would suggest moving the toggle changes and positioning of hits into a separate PR, after the conversion to elastic-charts.

cc @kertal

@markov00 markov00 changed the title [wip] [discover] use elastic-charts for histogram Replace Discover chart with elastic-charts Aug 27, 2019
@markov00 markov00 removed the WIP Work in progress label Aug 27, 2019
@kertal kertal self-requested a review August 27, 2019 12:10
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

ui functional tests were validating chart svg shapes which is not possible with canvas
@elasticmachine
Copy link
Contributor

💚 Build Succeeded


const partialDataText = i18n.translate('kbn.discover.histogram.partialData.bucketTooltipText', {
defaultMessage:
'Part of this bucket may contain partial data. The selected time range does not fully cover it.',
Copy link
Contributor

@spalger spalger Sep 4, 2019

Choose a reason for hiding this comment

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

"Part of...partial data" feels a little redundant.

Suggested change
'Part of this bucket may contain partial data. The selected time range does not fully cover it.',
'The selected time range does not include this entire bucket, it may contain partial data.',

Copy link
Contributor

Choose a reason for hiding this comment

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

See a396959

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nickofthyme nickofthyme merged commit 5cd40b4 into elastic:master Sep 10, 2019
@kertal
Copy link
Member

kertal commented Sep 10, 2019

🎉

rylnd added a commit to rylnd/kibana that referenced this pull request Sep 10, 2019
* master:
  Replace Discover chart with elastic-charts (elastic#43788)
  [skip ci][Maps] Update search document section with new features (elastic#44819)
  Revert "Revert "[ci] compress jobs for CI stability" (elastic#44584)"
  add src/plugins to the list of plugin dirs to watch (elastic#45033)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 11, 2019
…ation_behaviour

* 'master' of github.com:elastic/kibana: (24 commits)
  [Console] SQL template with triple quote in completion (elastic#45248)
  [ML] Data Frames: Cards as links (elastic#45254)
  fix(code/frontend): should show updating instead of cloning when updating (elastic#45238)
  fix(code/frontend): fix document search result from (elastic#45236)
  disable another flaky suite (elastic#45323) (elastic#45330)
  disable flaky suite (elastic#45105)
  skip flaky suite (elastic#43069)
  skip flaky suite (elastic#45089)
  disable jest suite that has no enabled tests (elastic#44250)
  disable flaky test (elastic#45317)
  disable flaky test (elastic#45315)
  [DOCS] Creates developer folder (elastic#45280)
  [SIEM] Changes ML conditional links to use tabs, fixes a small bug with null filterQuery   (elastic#45218)
  [skip-ci][Maps] Update search docs (elastic#45307)
  Revert "[skip ci][Maps] Update search document section with ne… (elastic#45301)
  Prep visualizations plugin for NP migration. (elastic#44839)
  Replace Discover chart with elastic-charts (elastic#43788)
  [skip ci][Maps] Update search document section with new features (elastic#44819)
  Revert "Revert "[ci] compress jobs for CI stability" (elastic#44584)"
  add src/plugins to the list of plugin dirs to watch (elastic#45033)
  ...

# Conflicts:
#	src/legacy/core_plugins/console/public/src/utils.js
#	src/legacy/core_plugins/console/public/tests/src/utils_string_expanding.txt
@liza-mae
Copy link
Contributor

Hi @markov00 this PR is labeled v7.5.0 but was not back ported, was it suppose to be or is it mislabeled?

@markov00
Copy link
Member Author

@liza-mae it needs to be back ported to 7.5, backporting soon

markov00 added a commit to markov00/kibana that referenced this pull request Sep 19, 2019
* use elastic-charts for histogram
* add class accessibility
* specify onElementClick type annotation
* set chartElement tooltip type to Follow
* use moment methods for now annotation logic
* move historam inside directive folder
* remove unused timechart directive
* remove dependency from tsvb brush handler
* remove non-required class to fix tooltip overflow
* change the cursor/crosshair
* fix(ie11): add fixed width for header text
* fix: annotation colors on dark theme
* unpdate click and brush ui functional tests
* move functional tests to percy
markov00 added a commit that referenced this pull request Sep 19, 2019
* use elastic-charts for histogram
* add class accessibility
* specify onElementClick type annotation
* set chartElement tooltip type to Follow
* use moment methods for now annotation logic
* move historam inside directive folder
* remove unused timechart directive
* remove dependency from tsvb brush handler
* remove non-required class to fix tooltip overflow
* change the cursor/crosshair
* fix(ie11): add fixed width for header text
* fix: annotation colors on dark theme
* unpdate click and brush ui functional tests
* move functional tests to percy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Feature:ElasticCharts Issues related to the elastic-charts library release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants