ncsco / pinemap-dss-help

Issue tracker for PINEMAP DSS
0 stars 0 forks source link

Data labels on the map, timeseries, and timeseries tooltips #23

Closed daviswx closed 8 years ago

daviswx commented 8 years ago

When viewing a Projected Change timeseries plot, the tooltips should include + or - symbols.

(Note: the other timeseries tooltip bug where the wrong units -- days vs. inches -- were displayed has been fixed)

daviswx commented 8 years ago

Related suggestion about the Projected Change map marker text wording: Use “X fewer days” or “X inches drier” instead of negative numbers; same for “more days” / “X inches wetter”.

Should this also apply to the timeseries labels above and below the columns (e.g., instead of showing "-22 days", show "22 fewer days")? This is probably too long to fit on a single line and I haven't tried wrapping these labels to a second line.

One other note about the map marker labels, timeseries labels, and timeseries tooltips: Use the same number of decimal places in all spots.

And one other bug with the timeseries tooltips: For Historical and Projected Occurrence maps, change the tooltips to say "occurrence" instead of "change".

daviswx commented 8 years ago

Quick update on this issue:

Before making these changes, I am going to make a fairly significant back-end change to the climate risk tools. Currently, they each have their own set of JavaScript code, but the code between tools is largely identical. That means every time I need to update something like the tooltip wording, I have to update it in three places, and as we add more tools, that number will continue to increase.

So I am going to go to just one code base for these tools, which will make these updates/fixes and future updates much easier.

Before that, I will generate the different timeseries plots mentioned in ncsco/pinemap-dss-help#29 using the existing code.

daviswx commented 8 years ago

The new labels are now in place. You can see them above the map markers, in the timeseries plot labels, and in the timeseries tooltips.

The average (formerly occurrence) map and timeseries labels should look pretty much identical to how they did before. The change maps now use descriptors, like "X more/fewer days", "X°F warmer/cooler", and "X in. wetter/drier".

The timeseries labels also now round to one decimal place to be consistent with the others.

Along with condensing the climate tool JavaScript code into a single code base, I am using the same function to generate labels for all three places, which helped simplify things quite a bit.