Skip to content

Commit

Permalink
Rename ChartTimeSeries to ChartOMBHistory
Browse files Browse the repository at this point in the history
Since this chart is being treated as a representation of a specific set
of variables, it makes sense to give it a more specific name. It is not
a general-purpose time series.
  • Loading branch information
esheehan-gsl committed Dec 13, 2023
1 parent a023f83 commit c69d028
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import ChartElement from "./ChartElement.js";
* in an HTML attribute called `src`
* @property {number[]} data Values visualizaed by the time series.
*/
export default class ChartTimeSeries extends ChartElement {
export default class ChartOMBHistory extends ChartElement {
static #TEMPLATE = `<svg>
<g class="data">
<path id="range"></path>
Expand Down Expand Up @@ -76,8 +76,8 @@ export default class ChartTimeSeries extends ChartElement {
super();

const root = this.attachShadow({ mode: "open" });
root.innerHTML = `<style>${ChartTimeSeries.#STYLE}</style>
${ChartTimeSeries.#TEMPLATE}`;
root.innerHTML = `<style>${ChartOMBHistory.#STYLE}</style>
${ChartOMBHistory.#TEMPLATE}`;
this.#svg = select(root.querySelector("svg"));
}

Expand Down Expand Up @@ -243,4 +243,4 @@ export default class ChartTimeSeries extends ChartElement {
}
}

customElements.define("chart-timeseries", ChartTimeSeries);
customElements.define("chart-ombhistory", ChartOMBHistory);
2 changes: 1 addition & 1 deletion src/unified_graphics/static/js/scalardiag.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import ChartContainer from "./component/ChartContainer.js";
import ChartHistogram from "./component/ChartHistogram.js";
import ChartMap from "./component/ChartMap.js";
import ChartObsCount from "./component/ChartObsCount.js";
import ChartTimeseries from "./component/ChartTimeSeries.js";
import ChartOMBHistory from "./component/ChartOMBHistory.js";
import ColorRamp from "./component/ColorRamp.js";
5 changes: 2 additions & 3 deletions src/unified_graphics/templates/layouts/diag.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ <h2 class="heading-2 flex-0">{% if minim_loop == "ges" %}Guess{% else %}Analysis

<chart-container class="padding-2 radius-md bg-white shadow-1">
<span class="axis-y title" slot="title-y">Observation &minus; Forecast</span>
<chart-timeseries id="history-{{ minim_loop }}" src="{{ history_url[minim_loop] }}?initialization_time={{ form.get("initialization_time") }}"

current="{{ form.get("initialization_time") }}"></chart-timeseries>
<chart-ombhistory id="history-{{ minim_loop }}" src="{{ history_url[minim_loop] }}?initialization_time={{ form.get("initialization_time") }}"
current="{{ form.get("initialization_time") }}"></chart-ombhistory>
<span class="axis-x title" slot="title-x">Initialization Time</span>
</chart-container>
</div>
Expand Down

0 comments on commit c69d028

Please sign in to comment.