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

feat: timeslip prototype added #1767

Merged
merged 6 commits into from
Aug 2, 2022
Merged

Conversation

monfera
Copy link
Contributor

@monfera monfera commented Jul 31, 2022

Summary

Adds the timeslip prototype as a pre-alpha chart type. It's still mostly JS and prototypey, with partly functional dat.gui controls, lacking a tooltip and event callback integration. However it already uses the time raster and chrono utility from Cartesians (those have already been integrated by xy_chart from the original timeslip prototype).

image

The intent is to eventually unify what it provides with the production Cartesian charts.

An also discussed, shorter term parallel track is to refactor, typescriptify and round out the implementation and design so it serves as a specifically designed time series chart with cohesive design elements, which shares some attributes with bar charts incl. histograms, line charts and area charts.

Details

There's a recognized tension between generative chart making, such as devising a form of grammar of graphics (significantly generative approaches include Vega / Vega-Lite, Charticulator, Sanddance, some aspects of Tableau) and fixed chart types (Excel, most aspects of Plotly and elastic-charts, some aspects of Tableau). This prototype is more of a recognition that it's a challenging design and implementation task to even approach a small point in the design space, and is a source of further work (eg. in the generative direction), rather than vouching for the supremacy of a rigid, chart type based approach.

However it is often the case, eg. in data discovery mode, that zoom and pan, interactive re-binning etc. are already valuable, while there's no current compositioning need. It is also often good practice to just visualize a single time series in a chart, and to not imply a possibly untrue degree of continuity of the time series values (which regular line and area charts do).

List of features, some of which are slated for Cartesian integration:

  1. Multi-layer time axis and time grid (already merged into elastic-charts Cartesians
  2. Redundant encoding of time units: besides the calendar-style time axis, the bin width (line section with unit labeling) and domain extent are shown atop of the chart
  3. Zoom dependent data re-discretization into bins (compliantly binned data comes from outside Charts, but driven on demand by the zoom level and pan position); unreasonably wide bars and "needle bars" are both avoided
  4. Semantic styling options: instead of asking users to pass weights/colors etc, they just specify high vs normal quantitative readability etc.
  5. High FPS zoom
  6. Kinetic panning
  7. Smooth Y domain fitting on zoom, pan and re-binning (and in the future, upon in-place data changes and incremental fetch)
  8. Fading partial bars in/out at the edge of the chart
  9. Staggering and fading time tick labels in-out at the edges
  10. Reinforcing line at the distal end of the bar for increased contrast and accessibility, without needing to shade large areas with an overly high contrast (the reinforcing line need to become a bit more salient, and the zero line might switch from dark gray to blue as well)
  11. Manually balanced saliency hierarchy of the grid line weights (for dark and light backgrounds)
  12. Design for avoiding artifacts among bars, and between bars and grid lines (for example, no bar gaps)
  13. Internationalization (see the corresponding dat.gui options on the top right)
  14. Redundant Y axes, esp. useful in wide aspect ratio time series charts (Cartesian charts can already do this)

Issues

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • The :theme label has been added and the @elastic/eui-design team has been pinged when there are Theme API changes
  • All related issues have been linked (i.e. closes #123, fixes #123)
  • New public API exports have been added to packages/charts/src/index.ts
  • Unit tests have been added or updated to match the most common scenarios
  • The proper documentation and/or storybook story has been added or updated
  • The code has been checked for cross-browser compatibility (Chrome, Firefox, Safari, Edge)
  • Visual changes have been tested with all available themes including dark, light, eui-dark & eui-light

@monfera monfera added :interactions Interactions related issue :axis Axis related issue :accessibility Accessibility related issue :xy Bar/Line/Area chart related labels Jul 31, 2022
@monfera monfera marked this pull request as draft July 31, 2022 07:29
@nickofthyme
Copy link
Collaborator

buildkite update vrt

@monfera monfera requested a review from markov00 August 1, 2022 16:03
@monfera monfera marked this pull request as ready for review August 1, 2022 16:03
packages/charts/package.json Outdated Show resolved Hide resolved
storybook/stories/timeslip/01_timeslip.story.tsx Outdated Show resolved Hide resolved
storybook/stories/timeslip/01_timeslip.story.tsx Outdated Show resolved Hide resolved
packages/charts/package.json Outdated Show resolved Hide resolved
@monfera monfera requested a review from markov00 August 2, 2022 11:26
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

LGTM

@monfera monfera merged commit b079766 into elastic:master Aug 2, 2022
nickofthyme pushed a commit that referenced this pull request Aug 4, 2022
# [47.2.0](v47.1.1...v47.2.0) (2022-08-04)

### Features

* **heatmap:** sync cursor between cartesian chart and heatmap ([#1721](#1721)) ([2b58e90](2b58e90))
* **text:** improved word wrap function ([#1761](#1761)) ([eaf0d59](eaf0d59))
* timeslip prototype added ([#1767](#1767)) ([b079766](b079766))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:accessibility Accessibility related issue :axis Axis related issue :interactions Interactions related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants