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

Date limit slider displays integers instead of text dates. #34

Open
bmschmidt opened this issue Sep 1, 2016 · 3 comments
Open

Date limit slider displays integers instead of text dates. #34

bmschmidt opened this issue Sep 1, 2016 · 3 comments

Comments

@bmschmidt
Copy link
Member

E.g.: screen shot 2016-09-01 at 5 57 01 pm

There was code to convert, for display, these wonky integer dates into some ISO-standard text display; not sure if it's still in there. It should be restored.

@organisciak
Copy link
Member

What's the context for recreating this?

The (pre-merge to master) HT Bookworm at
https://bookworm.htrc.illinois.edu/develop/# seems to run it through
"fixTime()". Do you get any errors? Does setting a breakpoint on fixTime
actually stop the script? What browser?

On Thu, Sep 1, 2016 at 3:59 PM Benjamin Schmidt notifications@github.com
wrote:

E.g.: [image: screen shot 2016-09-01 at 5 57 01 pm]
https://cloud.githubusercontent.com/assets/1110758/18185854/8fadcf5a-706d-11e6-91fe-2ecef3410b38.png

There was code to convert, for display, these wonky integer dates into
some ISO-standard text display; not sure if it's still in there. It should
be restored.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#34, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AADj7zVkrFzKzoabnmVBObbZw5SzdMJdks5ql0q2gaJpZM4JzLNa
.

@bmschmidt
Copy link
Member Author

Sorry, should have linked.

The screenshot of the error I'm encountering is this bookworm somewhere at Yale by @triplingual ; I'm uncertain of the exact commit being used used there

Just tried to reproduce on the default Federalist test set, and things collapsed further--the x axis doesn't reproduce correctly.

The code on fixTime() looks like a custom patch at some point added purely for fields named date_month; but a field needing this particular fix might also be named something like publish_month, publish_day_year, etc. I already wrote some code to address this problem for the D3 bookworm link to code block; maybe I should just port it over and overwrite the fixTime() function here?

But that's a separate issue. The key thing with Yale bookworm, I think, is that the conversion is happening, but only after the text is written to either side of the slider bar. It might be as simple as swapping two lines of code.

@pleonard212
Copy link

pleonard212 commented Nov 14, 2022

As a basic fix, this will do it:

t = time_array[0]["dbfield"];

instead of

t = $("#time_measure").val();

on this line:

https://github.com/Bookworm-project/BookwormGUI/blob/master/app/bookworm.gui.js#L352

Caveat: the tooltips are still in integers as you drag the sliders.

Side note: month or even week-level granularity is one of the best features of Bookworm! :)

month

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

3 participants