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

Improve time shift #5140

Merged
merged 8 commits into from Jun 7, 2018
Merged

Improve time shift #5140

merged 8 commits into from Jun 7, 2018

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Jun 5, 2018

PR #5067 introduced the ability to add multiple time shifts. Unfortunately, it broke the color matching between a time series and its time shift, since before the time shift was identified by ---, and now we actually label them 1 hour offset, 2 days offset, etc.

This PR fixes that bug, adding a constant in utils/common.js to identify time shifts (so future updates only need to be done in one place). It also improves the multiple time shifts by adding different line patterns for each time shift, eg, dotted, dashed, dot-dashed. I added 10 new styles for the lines, which will be rotated for all the time shifts. The pattern is consistent across time shifts, ie, all 1 hour offset series will have the same pattern.

screen shot 2018-06-05 at 10 51 41 am

@codecov-io
Copy link

codecov-io commented Jun 5, 2018

Codecov Report

Merging #5140 into master will decrease coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5140      +/-   ##
==========================================
- Coverage   77.48%   77.47%   -0.02%     
==========================================
  Files          44       44              
  Lines        8737     8741       +4     
==========================================
+ Hits         6770     6772       +2     
- Misses       1967     1969       +2
Impacted Files Coverage Δ
superset/viz.py 81.29% <50%> (-0.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b71f551...0e4ed5d. Read the comment docs.

@mistercrunch mistercrunch merged commit 57e1256 into apache:master Jun 7, 2018
timifasubaa pushed a commit to airbnb/superset-fork that referenced this pull request Jul 25, 2018
* Improve time shift color and pattern

* Revert change

* Fix js unit test

* Move code to better place, add unit test

* Move classed code to backend

* Remove console.log

* Remove 1 hour time compare

* Remove unused import
graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this pull request Aug 14, 2018
* Improve time shift color and pattern

* Revert change

* Fix js unit test

* Move code to better place, add unit test

* Move classed code to backend

* Remove console.log

* Remove 1 hour time compare

* Remove unused import

(cherry picked from commit 57e1256)
graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this pull request Aug 15, 2018
graceguo-supercat pushed a commit to airbnb/superset-fork that referenced this pull request Aug 15, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Improve time shift color and pattern

* Revert change

* Fix js unit test

* Move code to better place, add unit test

* Move classed code to backend

* Remove console.log

* Remove 1 hour time compare

* Remove unused import
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.26.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.26.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants