GreenInfo-Network / seattle-building-dashboard

Energy benchmarking for Seattle
https://greeninfo-network.github.io/seattle-building-dashboard/
ISC License
1 stars 0 forks source link

Energy Use compared to Average (compare chart) #8

Closed danrademacher closed 2 years ago

danrademacher commented 2 years ago

New design: image

Current look: image

┆Issue is synchronized with this Asana task

tomay commented 2 years ago

Some challenges with the new label treatment

Vertically shorter chart

1) In the existing app, the building label is above the chart to help minimize collision. I think they did this to be sure that the building label will have space (and be prominent). 2) The chart has to have a fixed height. In the new design, we don't know a-priori which bar a given label will be above - it could be the shortest bar or it could be the tallest. We'd still have to leave enough white space above the chart to allow for either.

The La Quinta example above highlights these issues. The labels are on the tallest bars, so there has to be a similar amount of white space above the chart to fit them.

New label treatment

1) The design shows the average label to the left of its line, and the building label to the right of its line. But the order of these two bars is variable. To achieve this for all buildings, we would have to figure out which one comes first, and adjust the placement of the text relative to the line accordingly

danrademacher commented 2 years ago
tomay commented 2 years ago

Just noticed that these measures are different:

image

image

Chart is probably not using eui_wn

tomay commented 2 years ago

Found it in getViewField, called by getCompareChartBinnedData called by prepareCompareChartData in processBuilding and passed as chartData to renderCompareChart

changed to:

  getViewField: function(view) {
    return view === 'eui' ? 'site_eui_wn' : 'energy_star_score';
  },

That fixes the value, but throws the colors off:

image

tomay commented 2 years ago

Okay, there were two other places with hard-coded site_eui. Changed both to site_eui_wn but only one seems to do anything

if (compareField === 'site_eui_wn') {
        selectedColor = this.getCompareChartColor(data, thresholds, id);
danrademacher commented 2 years ago

Remaining here as of yesterday:

This looks done?

image
tomay commented 2 years ago

yes, done!