Skip to content

Commit

Permalink
implements #21 - time scale can be toggled to linear
Browse files Browse the repository at this point in the history
  • Loading branch information
chinenual committed Nov 28, 2020
1 parent 00d6056 commit 923851e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/app/static/js/viewVCE_envs.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,11 @@ let viewVCE_envs = {
vce.Extra.uncompressedEnvelopes = true;
},

changeTimeScale: function(val) {
this.chart.options.scales.xAxes [0].type = val;
this.chart.update();
},

envChartUpdate: function (oscNum, envNum, animate) {
viewVCE_envs.supressOnchange = true;

Expand Down
8 changes: 8 additions & 0 deletions resources/app/viewVCE.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@
</select>
</div>

<div id="timeScaleDiv" style="display:inline-block;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Time Scale:&nbsp;
<select id="timeScale" onchange="viewVCE_envs.changeTimeScale(this.options[this.selectedIndex].value)">
<option value="logarithmic">Log</option>
<option value="linear">Linear</option>
</select>
</div>

<canvas id="envChart" height="400" width="600" style="border:solid #666;"></canvas>

<table id="envTable" class="valTable">
Expand Down

0 comments on commit 923851e

Please sign in to comment.