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

Zoom to error bar range #54

Closed
sharlagelfand opened this issue May 25, 2021 · 11 comments
Closed

Zoom to error bar range #54

sharlagelfand opened this issue May 25, 2021 · 11 comments
Assignees

Comments

@sharlagelfand
Copy link
Collaborator

Expanding on #44, would be good to have the final frame zoom in to only show the range of the error bars, not of the full data.

I'll generate a test spec for this.

@sharlagelfand
Copy link
Collaborator Author

@giorgi-ghviniashvili here is a sample spec, and how it looks now:

zoomed_summary.mov

The zoom kind of works, but since the axis is shared between the last few frames it doesn't update with the new range.

@giorgi-ghviniashvili
Copy link
Collaborator

@sharlagelfand Seems like this is gemini issue that it does not update axis. Let me take a look why.

@giorgi-ghviniashvili
Copy link
Collaborator

OK, fixed it. It was not correctly drawing vega-axis layer.

y-axis-fix.mov

@giorgi-ghviniashvili giorgi-ghviniashvili self-assigned this May 26, 2021
@sharlagelfand
Copy link
Collaborator Author

Thanks @giorgi-ghviniashvili! This looks great. I tried it with error bars as well but it looks like they're drawn twice or something, could you take a look? Here are the specs.

double_errorbar.mov

@giorgi-ghviniashvili
Copy link
Collaborator

@sharlagelfand sorry, forgot to clear old container, here it is:

error-bars.mov

@sharlagelfand
Copy link
Collaborator Author

Thanks, looks good!!

@sharlagelfand
Copy link
Collaborator Author

Going to reopen this since it looks like there's an issue with zooming on errorbars when there are no facets, as in this spec:

no_facets_errorbar_off_on_zoom.mov

@sharlagelfand sharlagelfand reopened this May 31, 2021
@giorgi-ghviniashvili
Copy link
Collaborator

Sad.. It is gemini thing, not able to correctly update y axis.. Trying to figure it out, whether it is a gemini bug or ours.

@giorgi-ghviniashvili
Copy link
Collaborator

@sharlagelfand, so the reason of the issue is because we have different y-axis on last two specs.

Ok, I fixed it and now it correctly updates y-axis when animating last frame.


Ok, thats good. Now bad news, it does not correctly change width (to shift x-axis because of floating points) and still getting this:

image

Gemini recommend does same in gemini-editor, it just expands axis to the left:

e71bae0a-dff8-432c-8205-6b616a9f40b5


I tried to add this to gemini spec manually in code after recommend

{
    "component": "view",
    "change": {
      "signal": [
        "width", "height"
      ]
    },
    "timing": {
          "duration": {
              "ratio": 1
          }
      }
  }

and seems like it worked:

zoom-error-bars-fix.mov

giorgi-ghviniashvili added a commit that referenced this issue Jun 1, 2021
@sharlagelfand
Copy link
Collaborator Author

It looks good to me now, thanks @giorgi-ghviniashvili!

Just curious, do you know why the sizing of axes changes and overlaps in Firefox, but not in Chrome? Everything looks pretty nice in Chrome:

chrome.mov

But a bit rough in Firefox (my main browser):

firefoxc.mov

@giorgi-ghviniashvili
Copy link
Collaborator

No Idea, will try to debug and see why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants