Skip to content
Snippets Groups Projects
Commit dbad3ce8 authored by William Roberts's avatar William Roberts
Browse files

Add comments, and rearrange properties/variables to better locations

parent f4874cec
Branches
No related tags found
2 merge requests!12Fix date not working on all platforms,!5Add Lobby Display to Website
......@@ -10,10 +10,9 @@ function API(div, controlDiv, plotsInfo) {
// Our storage of the plotly data/traces being plotted right now
dataCache: [],
initMeteorogram: function(plot_div, plotOrder, isLobbyDisplay) {
initMeteorogram: function(plot_div, plotOrder) {
this.hasGraph = true;
this.plotDiv = plot_div || this.plotDiv;
this.dataCache.isLobbyDisplay = isLobbyDisplay
//start with only the selected plots showing, reveal others only if their data is requested
myDispatcher.dispatch({
'status': 'initPlot',
......
......@@ -38,7 +38,8 @@ function getDispatcher() {
function changeBackgroundColor(hue) {
var dim = 0;
var bright = 360;
// Moves faster between Red, Green, and Blue. This is purely aesthetic to avoid "ugly" colors.
// Moves faster between Red, Green, and Blue. This is purely aesthetic to avoid "ugly" colors (I'm looking
// you brown-green).
var skip_jump = 120
var skip_rate = 2
// Exactly skip_rate time faster at skip_jump / 2, and normal speed at skip_jump.
......@@ -112,7 +113,7 @@ function getDispatcher() {
}
if (action.status == 'get_since_now') {
if (this.dataCache.isLobbyDisplay) {
if (this.plotsInfo['isLobbyDisplay']) {
action.time = '-6:00:00'
}
this.emit(
......@@ -224,13 +225,13 @@ function getDispatcher() {
plotEmitter.on('initPlot', function(div, plotOrder, plotsInfo, dataCache) {
//initialize checkbox store
checkboxEmitter.setPlots(plotsInfo);
Plot.initPlot(dataCache, div, plotOrder, plotsInfo, dataCache.isLobbyDisplay);
Plot.initPlot(dataCache, div, plotOrder, plotsInfo, plotsInfo['isLobbyDisplay']);
});
plotEmitter.on("get_since_now", function(time, plotsInfo, dataCache, div) {
var interval = dataAccess.requestPlotUpdate(dataCache, div, plotsInfo, time,
undefined, undefined, undefined, stopUpdate);
startUpdate(time, interval, plotsInfo, dataCache.isLobbyDisplay);
startUpdate(time, interval, plotsInfo, plotsInfo['isLobbyDisplay']);
});
plotEmitter.on("get_between_dates",function(start, end, interval, plotsInfo, dataCache, div) {
......
This diff is collapsed.
......@@ -28,42 +28,28 @@ function getSecondAxisConfig(axis_number, plot_info, axis_info, axis_kwargs) {
function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
var DEFAULT_PLOT_HEIGHT = 170;
var nshowing = plotOrder.length;
var layout = {
title: plotsInfo.title,
showlegend: false,
height: DEFAULT_PLOT_HEIGHT * nshowing + 180
};
if (dataCache.isLobbyDisplay) {
delete layout['height'];
layout['autosize'] = true;
layout['margin'] = {t:0, l:0, r:0, b:0}
layout['font'] = { color: 'white' };
layout['paper_bgcolor'] = 'rgba(0,0,0,0)';
layout['plot_bgcolor'] = 'rgba(0,0,0,0)';
layout['annotations'] = [];
} else {
layout['xaxis'] = {
//domain affects size of x axis
//this made room for the legend
//1 is the far right of the plot, 0 is the far left
domain: [0, 1],
//xaxis doesn't show its lines
showline: false,
zeroline: false,
var layout = plotsInfo.layout;
layout['xaxis'] = {
//domain affects size of x axis
//this made room for the legend
//1 is the far right of the plot, 0 is the far left
domain: [0, 1],
//xaxis doesn't show its lines
showline: false,
zeroline: false,
//values of the tick labels show up
//show right away if we have any starting streams
showticklabels: nshowing > 0,
//values of the tick labels show up
//show right away if we have any starting streams
showticklabels: nshowing > 0,
//its grid is a little darker than default
gridcolor: "#777777",
//its grid is a little darker than default
gridcolor: "#777777",
//hide grid
showgrid: false,
tickformat: '%Y-%m-%d %H:%MZ'
};
}
//hide grid
showgrid: false,
tickformat: '%Y-%m-%d %H:%MZ'
};
var axis_number = 0;
var axis_info;
......@@ -76,9 +62,10 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
var step = 1 / nshowing;
var domain;
var x_anchor = axis_number;
var trace_kwargs = ['marker', 'color', 'mode', 'zmin', 'zmax', 'y', 'contours', 'line', 'colorscale', 'showscale', 'colorbar', 'tick0', 'dtick', 'hovermode'];
var axis_kwargs = ['nticks', 'range', 'autorange', 'zeroline', 'showgrid', 'tickmode', 'ticktext', 'tickvals'];
var y0;
var trace_kwargs = ['marker', 'color', 'mode', 'zmin', 'zmax', 'y',
'contours', 'line', 'colorscale', 'showscale', 'colorbar', 'tick0', 'dtick', 'hovermode'];
var axis_kwargs = ['nticks', 'range', 'autorange', 'zeroline', 'showgrid',
'tickmode', 'ticktext', 'tickvals'];
for (var plot_idx = 0; plot_idx < plotOrder.length; plot_idx++) {
plot_key = plotOrder[plot_idx];
plot_info = plotsInfo.plots[plot_key];
......@@ -86,9 +73,9 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
x_anchor = axis_number;
axis_info = plot_info.yaxis;
domain = [(plotOrder.length - 1 - plot_idx) * step * 1.03, 1 - plot_idx * step * 1.05];
if (dataCache.isLobbyDisplay) {
if (plotsInfo['isLobbyDisplay']) {
// Leaves 8% for the header, then divides the rest into thirds with 10% height above and below each graph.
domain = [.82 - 8 / 75 - (.2 + 8 / 75) * Math.floor(plot_idx / 3), .82 - (.2 + 8 / 75) * Math.floor(plot_idx / 3)];;
domain = [.82 - 8 / 75 - (.2 + 8 / 75) * Math.floor(plot_idx / 3), .82 - (.2 + 8 / 75) * Math.floor(plot_idx / 3)];
}
// Create the necessary traces (lines)
......@@ -111,7 +98,8 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
plot_name: plot_key,
trace_index: trace_info_idx
};
if (dataCache.isLobbyDisplay) {
// Gives each graph its own x-axis.
if (plotsInfo['isLobbyDisplay']) {
trace_config['xaxis'] = 'x' + axis_number;
}
......@@ -145,10 +133,8 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
// where on the canvas does this axis belong
domain: domain
};
if (dataCache.isLobbyDisplay) {
y0 = domain[1]
if (plotsInfo['isLobbyDisplay']) {
layout['xaxis' + axis_number] = {
tickvals: [-1, 2.5, 6],
ticktext: ['-6h', '-3h', 'Now'],
showline: true,
linecolor: 'white',
......@@ -171,7 +157,7 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
align: 'center',
// Middle of each x-axis domain.
x: 1/6 + 1 / 3 * (plot_idx % 3) * (1 + Math.floor(plot_idx / 6)), //position in x domain
y: y0 + .04, //position in y domain
y: domain[1] + .04, //position in y domain
xref: 'paper',
yref: 'paper',
//Makes text centered
......@@ -189,7 +175,7 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
showarrow: false,
align: 'center',
x: 1/6 + 1 / 3 * (plot_idx % 3) * (1 + Math.floor(plot_idx / 6)), //position in x domain
y: y0 + .085, //position in y domain
y: domain[1] + .085, //position in y domain
xref: 'paper',
yref: 'paper',
//Makes text centered
......@@ -220,7 +206,7 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
// Process second y-axis config
// Skip if specified meaning this configuration is only parsed
// for additional hover/probe information (custom MetObs thing, not Plotly)
if (!dataCache.isLobbyDisplay && 'yaxis2' in plot_info && !plot_info.yaxis2.skip) {
if (!plotsInfo['isLobbyDisplay'] && 'yaxis2' in plot_info && !plot_info.yaxis2.skip) {
axis_number += 1;
axis_info = plot_info.yaxis2;
axis_config = getSecondAxisConfig(axis_number, plot_info, axis_info, axis_kwargs);
......@@ -234,72 +220,22 @@ function initPlot(dataCache, div_id, plotOrder, plotsInfo) {
// layout['probe' + axis_number] = axis_config;
// }
}
// Header text providing data about the display.
if (dataCache.isLobbyDisplay) {
layout['annotations'].push({
text: 'Rooftop Instrument Group (RIG) - Current Readings',
font: {
'size': 24
},
showarrow: false,
align: 'center',
x: .5,
y: .985, //position in y domain
xref: 'paper',
yref: 'paper',
// Makes text centered.
showarrow: true,
arrowhead: 0,
ax: 0,
ay: 0,
});
layout['annotations'].push({
text: 'Updated at: 2019-04-22 14:56:37Z [Apr 22, 2019 9:56:37 AM Local] RIG Elevation = 327.5 meters',
font: {
'size': 16
},
showarrow: false,
align: 'center',
x: .5,
y: .96, //position in y domain
xref: 'paper',
yref: 'paper',
// Makes text centered.
showarrow: true,
arrowhead: 0,
ax: 0,
ay: 0,
});
layout['annotations'].push({
text: 'Data values updated every 2 minutes -- Trend graphs show 6 hour history [2 minute average]',
font: {
'size': 14
},
showarrow: false,
align: 'center',
x: .5,
y: .94, //position in y domain
xref: 'paper',
yref: 'paper',
// Makes text centered.
showarrow: true,
arrowhead: 0,
ax: 0,
ay: 0,
});
} else {
// xaxis only shows on the bottom most plot
layout['xaxis']['anchor'] = 'y' + x_anchor;
// Toolbar configuration
var toolbar = {
// Disable link to plotly
'showLink': false,
// Don't show plotly logo
'displaylogo': false,
'displayModeBar': true,
'responsive': true
};
// xaxis only shows on the bottom most plot
layout['xaxis']['anchor'] = 'y' + x_anchor;
// Toolbar configuration
var toolbar = {
// Disable link to plotly
'showLink': false,
// Don't show plotly logo
'displaylogo': false,
'displayModeBar': true,
'responsive': true
};
if (plotsInfo['isLobbyDisplay']) {
// Prevents first graph from taking up entire width.
delete layout['xaxis'];
toolbar = undefined;
}
//creates new graph
Plotly.plot(div_id, dataCache, layout, toolbar);
......
......@@ -36,6 +36,7 @@ function changeUnits(dataCache, graphDiv, plotsInfo, unitCount) {
var tickvals;
var layoutUpdates = {}
var curr_date = dataCache[0]['x'][dataCache[0]['x'].length - 1];
// Date() takes + ' UTC' as a way to know the given date is UTC and converts it to local time.
var date_local = new Date(curr_date + ' UTC');
var date_utc = new Date(curr_date);
// Add 2 minutes since data on display is from 2 minutes before it's updated.
......@@ -60,7 +61,7 @@ function changeUnits(dataCache, graphDiv, plotsInfo, unitCount) {
date_utc = date_utc.getFullYear() + '-' + (date_utc.getMonth() + 1) + '-' + date_utc.getDate() + ' ' + date_utc.toString().split(' ')[4] + 'Z';
// day of the week, month, date, year, local time.
date_local = dateParts[0] + ', ' + dateParts[1] + ' ' + dateParts[2] + ', ' + dateParts[3] + ' ' + localTime;
layoutUpdates['annotations.' + (graphDiv.layout['annotations'].length - 2) + '.text'] = 'Updated at: ' + date_utc + ' [' + date_local + ' Local] RIG Elevation = ' + elevation;
layoutUpdates['annotations.1.text'] = 'Updated at: ' + date_utc + ' [' + date_local + ' Local] RIG Elevation = ' + elevation;
// Update each subgraph's displayed y-axis and current data values.
for (i = 0; i < dataCache.length; i++) {
axis_number = i == 0 ? '' : i + 1;
......@@ -71,7 +72,7 @@ function changeUnits(dataCache, graphDiv, plotsInfo, unitCount) {
plotInfo = plotsInfo.plots[plotName];
// Convert data to the correct units.
currData = ticktext.getTickText([dataCache[i]['y'][dataCache[i]['y'].length - 1]], plotInfo[yaxis])[0];
layoutUpdates['annotations[' + 2 * i + '].text'] = currData + '' + plotInfo[yaxis]['units']
layoutUpdates['annotations[' + (3 + 2 * i) + '].text'] = currData + '' + plotInfo[yaxis]['units']
tickvals = graphDiv.layout['yaxis' + axis_number]['tickvals']
// Doesn't change Relative Humidity and Wind Direction ticks.
if (tickvals != undefined) {
......@@ -117,7 +118,7 @@ function replaceData(dataCache, graphDiv, plotsInfo, dataObj, update, maxPoints)
var traceIndex = 0;
if (dataCache.isLobbyDisplay) {
if (plotsInfo['isLobbyDisplay']) {
var layoutUpdates = {};
var spread;
var bottom;
......@@ -182,7 +183,7 @@ function replaceData(dataCache, graphDiv, plotsInfo, dataObj, update, maxPoints)
tracesToExtend.push(traceIndex + index);
// scatter plots, assume the y data is the data being updated
_.each(traceInfo.var_names, function (var_name) {
if (dataCache.isLobbyDisplay) {
if (plotsInfo['isLobbyDisplay']) {
axis_number = i == 0 ? '': i + 1;
// Set the range of each graph if applicable.
if (var_name != 'aoss.tower.rel_hum' && var_name != 'aoss.tower.wind_direction') {
......@@ -276,7 +277,7 @@ function replaceData(dataCache, graphDiv, plotsInfo, dataObj, update, maxPoints)
removeOldPoints(dataCache, dataCache[0].x.length - maxPoints);
}
if (dataCache.isLobbyDisplay) {
if (plotsInfo['isLobbyDisplay']) {
// Updates everything at once to save time. Should be done after all dataCache manipulations.
Plotly.relayout(graphDiv, layoutUpdates);
// The first time through, call changeUnits to display current data.
......
var DEFAULT_PLOT_HEIGHT = 170;
var layout = {
title: plotsInfo.title,
showlegend: false,
height: DEFAULT_PLOT_HEIGHT * nshowing + 180,
},
/*Config options for different sites*/
var siteConfigs = {
'aoss.tower': {
layout: layout,
title: 'AO&SS Building RealTime Meteorogram',
defaultPlots: ['air_temp', 'pressure', 'wind_speed', 'wind_direction', 'accum_precip', 'solar_flux'],
plots: {
......@@ -216,6 +223,7 @@ var siteConfigs = {
/*Display information for ancillary items with no associated trace*/
},
'mendota.buoy': {
layout: layout,
title: 'Lake Mendota Buoy RealTime Meteorogram',
defaultPlots: ['air_temp', 'wind_speed', 'wind_direction', 'chlorophyll', 'phycocyanin', 'water_temp'],
plots: {
......
/*Config options for different sites*/
var siteConfigs = {
'aoss.tower': {
defaultPlots: ['air_temp', 'dewpoint', 'rel_hum', 'wind_direction', 'wind_speed', 'accum_precip', 'solar_flux', 'pressure'],
plots: {
air_temp: {
traces: [
{
name: 'Temperature',
var_names: ['aoss.tower.air_temp'],
line: {
color: 'white',
width: 1.5
},
},
],
yaxis: {
title: 'Temp (°C)',
convert_value: null,
units: '°C',
precision: 0,
},
yaxis2: {
title: 'Temp (°F)',
convert_value: 'getF',
units: '°F',
precision: 0,
isLobbyDisplay: true,
layout: {
showlegend: false,
autosize: true,
margin: {t:0, l:0, r:0, b:0},
font: { color: 'white' },
paper_bgcolor: 'rgba(0,0,0,0)',
plot_bgcolor: 'rgba(0,0,0,0)',
// Header text providing data about the display.
annotations: [
{
text: 'Rooftop Instrument Group (RIG) - Current Readings',
font: {
'size': 24
},
showarrow: false,
align: 'center',
x: .5,
y: .985,
xref: 'paper',
yref: 'paper',
// Makes text centered.
showarrow: true,
arrowhead: 0,
ax: 0,
ay: 0,
},
dewpoint: {
traces: [
{
// Dewpoint
name: 'Dew Point',
var_names: ['aoss.tower.dewpoint'],
line: {
color: 'white',
width: 1.5
},
},
],
yaxis: {
title: 'Dew Point (°C)',
convert_value: null,
units: '°C',
precision: 0,
{
font: {
'size': 16
},
yaxis2: {
title: 'Dew Point (°F)',
convert_value: 'getF',
units: '°F',
precision: 0,
showarrow: false,
align: 'center',
x: .5,
y: .96,
xref: 'paper',
yref: 'paper',
// Makes text centered.
showarrow: true,
arrowhead: 0,
ax: 0,
ay: 0,
},
{
text: 'Data values updated every 2 minutes -- Trend graphs show 6 hour history [2 minute average]',
font: {
'size': 14
},
showarrow: false,
align: 'center',
x: .5,
y: .94,
xref: 'paper',
yref: 'paper',
// Makes text centered.
showarrow: true,
arrowhead: 0,
ax: 0,
ay: 0,
},
pressure: {
traces: [
{
name: 'Pressure',
var_names: ['aoss.tower.pressure'],
line: {
color: 'white',
width: 1.5
},
],
},
defaultPlots: ['air_temp', 'dewpoint', 'rel_hum', 'wind_direction', 'wind_speed', 'accum_precip', 'solar_flux', 'pressure'],
plots: {
air_temp: {
traces: [
{
name: 'Temperature',
var_names: ['aoss.tower.air_temp'],
line: {
color: 'white',
width: 1.5
},
],
yaxis: {
title: 'Pressure (hpa)',
convert_value: null,
units: 'hPa',
precision: 1,
},
yaxis2: {
title: 'Pressure (inHg)',
convert_value: 'getPresInHg',
units: 'inHg',
precision: 2,
},
],
yaxis: {
title: 'Temp (°C)',
convert_value: null,
units: '°C',
precision: 0,
},
yaxis2: {
title: 'Temp (°F)',
convert_value: 'getF',
units: '°F',
precision: 0,
},
rel_hum: {
traces: [
{
name: 'Relative Humidity',
var_names: ['aoss.tower.rel_hum'],
line: {
color: 'white',
width: 1.5
},
},
dewpoint: {
traces: [
{
// Dewpoint
name: 'Dew Point',
var_names: ['aoss.tower.dewpoint'],
line: {
color: 'white',
width: 1.5
},
],
yaxis: {
title: 'Relative Humidity (%)',
range: [-0.5, 105.0],
tickvals: [0, 20, 40, 60, 80, 100],
ticktext: ['0', '20', '40', '60', '80', '100'],
convert_value: null,
units: '%',
precision: 0,
},
yaxis2: {
title: 'Relative Humidity (%)',
range: [-0.5, 105.0],
tickvals: [0, 20, 40, 60, 80, 100],
ticktext: ['0', '20', '40', '60', '80', '100'],
convert_value: null,
units: '%',
precision: 0,
},
],
yaxis: {
title: 'Dew Point (°C)',
convert_value: null,
units: '°C',
precision: 0,
},
wind_speed: {
traces: [
{
name: 'Wind Speed',
var_names: ['aoss.tower.wind_speed'],
line: {
color: 'white',
width: 1.5
},
yaxis2: {
title: 'Dew Point (°F)',
convert_value: 'getF',
units: '°F',
precision: 0,
},
},
pressure: {
traces: [
{
name: 'Pressure',
var_names: ['aoss.tower.pressure'],
line: {
color: 'white',
width: 1.5
},
],
yaxis: {
title: 'Wind Speed (kt)',
convert_value: 'getSpeedKTS',
units: 'kt',
precision: 0,
},
yaxis2: {
title: 'Wind Speed (mph)',
convert_value: 'getSpeedMPH',
units: 'mph',
precision: 0,
}
},
wind_direction: {
traces: [
{
name: 'Wind Direction',
var_names: ['aoss.tower.wind_direction'],
line: {
color: 'white'
},
mode: 'markers',
marker: {size: 3}
],
yaxis: {
title: 'Pressure (hpa)',
convert_value: null,
units: 'hPa',
precision: 1,
},
yaxis2: {
title: 'Pressure (inHg)',
convert_value: 'getPresInHg',
units: 'inHg',
precision: 2,
},
},
rel_hum: {
traces: [
{
name: 'Relative Humidity',
var_names: ['aoss.tower.rel_hum'],
line: {
color: 'white',
width: 1.5
},
],
yaxis: {
title: 'Wind Direction (°)',
range: [-20, 380],
tickvals: [0, 90, 180, 270, 360],
convert_value: null,
units: '°',
precision: 0,
},
yaxis2: {
title: 'Wind Direction',
range: [-20, 380],
tickvals: [0, 90, 180, 270, 360],
ticktext: ['N', 'E', 'S', 'W', 'N'],
convert_value: 'cardinalWDir',
units:'',
precision: 0,
},
],
yaxis: {
title: 'Relative Humidity (%)',
range: [-0.5, 105.0],
tickvals: [0, 20, 40, 60, 80, 100],
ticktext: ['0', '20', '40', '60', '80', '100'],
convert_value: null,
units: '%',
precision: 0,
},
yaxis2: {
title: 'Relative Humidity (%)',
range: [-0.5, 105.0],
tickvals: [0, 20, 40, 60, 80, 100],
ticktext: ['0', '20', '40', '60', '80', '100'],
convert_value: null,
units: '%',
precision: 0,
},
accum_precip: {
traces: [
{
name: 'Accumulated Precipitation',
short_name:'Accum. Precip.',
var_names: ['aoss.tower.accum_precip'],
line: {
color: 'white',
width: 1.5
},
},
wind_speed: {
traces: [
{
name: 'Wind Speed',
var_names: ['aoss.tower.wind_speed'],
line: {
color: 'white',
width: 1.5
},
],
yaxis: {
title: 'Accum Precip (mm)',
convert_value: 'getAccumMillimeter',
units: 'mm',
precision: 1,
},
yaxis2: {
title: 'Accum Precip (inches)',
convert_value: null,
units: 'in',
precision: 2,
],
yaxis: {
title: 'Wind Speed (kt)',
convert_value: 'getSpeedKTS',
units: 'kt',
precision: 0,
},
yaxis2: {
title: 'Wind Speed (mph)',
convert_value: 'getSpeedMPH',
units: 'mph',
precision: 0,
}
},
wind_direction: {
traces: [
{
name: 'Wind Direction',
var_names: ['aoss.tower.wind_direction'],
line: {
color: 'white'
},
mode: 'markers',
marker: {size: 3}
},
],
yaxis: {
title: 'Wind Direction (°)',
range: [-20, 380],
tickvals: ['0', '90', '180', '270', '360'],
convert_value: null,
units: '°',
precision: 0,
},
yaxis2: {
title: 'Wind Direction',
range: [-20, 380],
tickvals: ['0', '90', '180', '270', '360'],
ticktext: ['N', 'E', 'S', 'W', 'N'],
convert_value: 'cardinalWDir',
units:'',
precision: 0,
},
solar_flux: {
traces: [
{
name: 'Solar Flux',
var_names: ['aoss.tower.solar_flux'],
line: {
color: 'white',
width: 1.5
},
},
accum_precip: {
traces: [
{
name: 'Accumulated Precipitation',
short_name:'Accum. Precip.',
var_names: ['aoss.tower.accum_precip'],
line: {
color: 'white',
width: 1.5
},
],
yaxis: {
title: 'Solar Flux (W/m^2)',
convert_value: null,
units: 'W/m^2',
precision: 0,
},
yaxis2: {
title: 'Solar Flux (Ly/min)',
convert_value: 'getPressureLymin',
units: 'Ly/min',
precision: 2,
],
yaxis: {
title: 'Accum Precip (mm)',
convert_value: 'getAccumMillimeter',
units: 'mm',
precision: 1,
},
yaxis2: {
title: 'Accum Precip (inches)',
convert_value: null,
units: 'in',
precision: 2,
},
},
solar_flux: {
traces: [
{
name: 'Solar Flux',
var_names: ['aoss.tower.solar_flux'],
line: {
color: 'white',
width: 1.5
},
},
],
yaxis: {
title: 'Solar Flux (W/m^2)',
convert_value: null,
units: 'W/m^2',
precision: 0,
},
yaxis2: {
title: 'Solar Flux (Ly/min)',
convert_value: 'getPressureLymin',
units: 'Ly/min',
precision: 2,
},
},
},
......
......@@ -11,19 +11,20 @@
</head>
<body>
<!----starting-hue is what hsl color the background will start at.-->
<div id="color" style="z-index: 1; position: absolute; top: 0px; left: 0px; height: 100%; width: 100%; --starting-hue: 0; color: 120">
<div id="header" style="height: 8%; width: 100%; background-color: grey"></div>
<div id="color" style="z-index: 1; position: absolute; top: 0px; left: 0px; height: 100%; width: 100%; --starting-hue: 0;">
<div id="header" style="height: 8%; width: 100%; background-color: grey"></div>
<div id="row1" style="height: calc(92%/3); width: 100%"></div>
<div id="row2" style="height: calc(92%/3); width: 100%"></div>
<div id="row3" style="height: calc(92%/3); width: 100%"></div>
</div>
<div id="graph" style="z-index: 2; position: absolute; top: 0px; left: 0px; height: 100%; width: 100%"><div>
<div id="graph" style="z-index: 2; position: absolute; top: 0px; left: 0px; height: 100%; width: 100%;"><div>
<!--opacity: 1 makes the screen black until graph loads, which only takes a fraction of a second.-->
<div id="overlay" style="z-index: 3; position: absolute; top: 0px; left: 0px; height: 100%; width: 100%; background-color: black; opacity: 1"><div>
<script type="text/javascript" src="/js/meteorogram/meteorogram.js"></script>
<script type="text/javascript" src="/js/meteorogram/site_configs_lobby.js"></script>
<script type="text/javascript">
var met = MeteorogramController('graph', 'control-container', siteConfigs['aoss.tower']);
met.initMeteorogram(undefined, undefined, true);
var met = MeteorogramController('graph', 'control-container', siteConfigs);
met.initMeteorogram();
met.initMeteorogramControls();
met.displayRealTime();
</script>
......
<!--Used to remove Footer and Navbar from lobby display.-->
<!doctype html>
<html>
<head>
......
<!--Calls lobby_page.html instead of page.html for lobby display. Called by content/pages/lobby_meteorogram.html-->
{% extends "lobby_page.html" %}
{% block header %}
{{super()}}
......
<!--Calls lobby_base.html instead of base.html for lobby display-->
{% extends "lobby_base.html" %}
{% block title %}{{ page.title }}{% endblock %}
{% block content %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment