ODM2 / ODM2DataSharingPortal

A Python-Django web application enabling users to upload, share, and display data from their environmental monitoring sites via the app's ODM2 database. Data can either be automatically streamed from Internet of Things (IoT) devices, manually uploaded via CSV files, or manually entered into forms.
BSD 3-Clause "New" or "Revised" License
31 stars 8 forks source link

TSV axis date format is inconsistent #564

Open SRGDamia1 opened 2 years ago

SRGDamia1 commented 2 years ago

Depending on the zoom level, the date is formatted differently. It should be more consistent. At all zoom levels, the date should be displayed with numbers (ie, always "04/21/2021", never "Apr-21". The date should also always appear at least once on the plot, even at the tightest zoom level.

Last year: image

Last month: image

Tighter zooms: image

< 1 day, date is not displayed at all: image

SRGDamia1 commented 2 years ago

Part of #551

aufdenkampe commented 2 years ago

@SRGDamia1, I agree that having at least one date at the lowest zoom level would be helpful. However, I also see these as relatively low priority enhancements, given our continued urgent need to do some major code refactoring to address tech debt.

@ptomasula, how easy is it to change this behavior?

dbressler75 commented 2 years ago

Also, no year is available on x-axis display or when hovering - problematic for general inspection of data, hover_noyear etc.

ptomasula commented 2 years ago

@aufdenkampe @SRGDamia1 This data formatting was implemented in commit 20ed2b7 and is now live on the staging server.

However, fully specifying the 'MM-DD-YYYY' for lower zoom levels (where only a few days or even hours are displayed) can lead to the labels overlapping which makes the plot less useful.

I'm looking for feedback on how best to resolve that. A few initial approaches could include:

  1. Return to default formatting, we now have the full datestring in the cursor hover pop-up so that will help increase clarity.
  2. Increase the spacing between tickmarks (would also reduce the number of tick marks). This would allow the full labels to display, but might also look sparse (particularly at detailed zoom levels)
  3. Further adjust the tick label formatting, but aim to shorten the characters displayed.
SRGDamia1 commented 2 years ago

Isn't the spacing between ticks dynamic?

ptomasula commented 2 years ago

Isn't the spacing between ticks dynamic?

Correct that tick marks are dynamically generated, but we have control over the scaling factor that is used.

SRGDamia1 commented 2 years ago

Ok. "Not overlapping" is most important - if the text overlaps it looks like an error no matter what.

For now, with the year properly in the hover, it would be better to go back to the default ticks that will not overlap and to put finer tuning them as a low priority item.

ptomasula commented 2 years ago

Thanks @SRGDamia1, I restored the default tick marks on staging. I'll leave this issue open incase we want to revisit x-tick label, but I'll move it over to a future milestone.