Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/graph2d/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ <h2 id="Methods">Methods</h2>
<li><code>x</code> (Number): relative horizontal position of the click event.</li>
<li><code>y</code> (Number): relative vertical position of the click event.</li>
<li><code>time</code> (Date): Date of the clicked event.</li>
<li><code>value</code> (Number[]): The data value of the click event. The array contains one value when there is one data axis visible, and two values when there are two visible data axes.</li>
<li><code>value</code> (Number[]): The data value of the click event. The array contains one value when there is one data axis visible, and two values when there are two visible data axes. It is empty when no data is provided.</li>
<li><code>what</code> (String or null): name of the clicked thing: <code>background</code>, <code>axis</code>, <code>dat-axis</code>, <code>custom-time</code>, or <code>current-time</code>, <code>legend</code>.</li>
<li><code>event</code> (Object): the original click event.</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions lib/timeline/Graph2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ Graph2d.prototype.getEventProperties = function (event) {
var value = [];
var yAxisLeft = this.linegraph.yAxisLeft;
var yAxisRight = this.linegraph.yAxisRight;
if (!yAxisLeft.hidden) {
if (!yAxisLeft.hidden && this.itemsData.length > 0) {
value.push(yAxisLeft.screenToValue(y));
}
if (!yAxisRight.hidden) {
if (!yAxisRight.hidden && this.itemsData.length > 0) {
value.push(yAxisRight.screenToValue(y));
}

Expand Down