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 enhancements #16

Merged
merged 4 commits into from
Dec 23, 2017
Merged

Date enhancements #16

merged 4 commits into from
Dec 23, 2017

Conversation

CDuffers
Copy link
Contributor

Changed the date time entry from second since epoch to human readable format

TrystanLea and others added 3 commits December 10, 2017 10:41
The following changes have been made to support this

embed.php:
Added fields for date time settings, plus called a new function to prepare the "datetimepicker"

graph.js:
Tooltip changed to show the decimal places as defined for each series in the settings. This was added as kWh figures showed with 6+ decimal places and looked untidy.
datetimepickerInit() added to define setup and configure the bootstrap-datetimepicker fields
reloadDatetimePrep() added to separate out common config used via the graph visualisation and also when embedded as graph_init_editor() not required via embedded.

view.php:
Included datetimepicker and defined buttons for graph visualisation

vis.helper.js:
Added parseTimepickerTime() to parse manually typed date time fields
@CDuffers
Copy link
Contributor Author

Sorry, forgot a couple of screenshots to show the differences.

Here's a view of how it looks within the graph visualisation page:
image

And then the base delivery when embedded within a dashboard (only the expand icon has changed):
image

And then with the date time picker visible:
image

@glynhudson
Copy link
Member

Wow, nice work. This works really great, a very useful addition, Thanks a lot.

@glynhudson glynhudson merged commit 04d2cf7 into emoncms:master Dec 23, 2017
@alan-dodd
Copy link

Hello: if I strike the 'D' (day) button, on the bottom of the graph I can see only time of day, not month/date/time as per Week or Month visualization. Is there a way to change this setting?
Because it becomes confusing if from that graph I start clicking '<' or '>' to browse data: after a while I don't know any more to which day data belongs.
Same thing happens looking at feeds: if I zoom in a day, I can't see date string any more. Thank you.
day
days

@CDuffers
Copy link
Contributor Author

CDuffers commented Jan 7, 2018

Hi @alan-dodd ,

Flot is used for the graphs and we rely upon its logic to determine the level of info placed along the x-axis. If we attempt to force it to use full date and time for all graphs, then this is likely to get pretty crowded. or otherwise significantly reduce the number of tick marks and thereby markers being quite wide apart and thereby difficult to read.

Where are you using the graph? Within the "Setup -> Graph"? If so, then the start and end times and dates are shown beneath.

You can otherwise hover the mouse over a data point and the tooltip pop-up will show the date and time.

Please let me know if you have a suggestion of how to cover an approach which cover graphs showing a total of a few minutes to graphs showing an year or more.

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

Successfully merging this pull request may close these issues.

4 participants