Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stw-padmws-graph
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stw
stw-padmws-graph
Commits
defda5ef
Commit
defda5ef
authored
Mar 14, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better tooltip
parent
7aa928a1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
1 deletion
+48
-1
src/stw-padmws-graph.js
src/stw-padmws-graph.js
+21
-0
src/stw-padmws-graph.js.map
src/stw-padmws-graph.js.map
+1
-1
src/stw-padmws-graph.ts
src/stw-padmws-graph.ts
+26
-0
No files found.
src/stw-padmws-graph.js
View file @
defda5ef
...
...
@@ -137,6 +137,12 @@ var Graph = (function () {
self
.
chart
.
update
();
}
},
hover
:
{
intersect
:
false
},
tooltips
:
{
intersect
:
false
},
maintainAspectRatio
:
false
,
scales
:
{
xAxes
:
[{
...
...
@@ -183,6 +189,21 @@ var Graph = (function () {
data
:
[]
};
}
// var parentEventHandler = Chart.Controller.prototype.eventHandler;
// Chart.Controller.prototype.eventHandler = function() {
// var ret = parentEventHandler.apply(this, arguments);
// this.clear();
// this.draw();
// var yScale = this.scales['y-axis-0'];
// console.log(arguments[0].x);
// // Draw the vertical line here
// this.chart.ctx.beginPath();
// this.chart.ctx.moveTo(arguments[0].x, yScale.getPixelForValue(yScale.max));
// this.chart.ctx.strokeStyle = "#ff0000";
// this.chart.ctx.lineTo(arguments[0].x, yScale.getPixelForValue(yScale.min));
// this.chart.ctx.stroke();
// return ret;
// };
reqwest
({
url
:
self
.
url
+
"
/graph/
"
+
self
.
id
,
method
:
'
get
'
,
...
...
src/stw-padmws-graph.js.map
View file @
defda5ef
This diff is collapsed.
Click to expand it.
src/stw-padmws-graph.ts
View file @
defda5ef
...
...
@@ -156,6 +156,12 @@ class Graph {
self
.
chart
.
update
();
}
},
hover
:
{
intersect
:
false
},
tooltips
:
{
intersect
:
false
},
maintainAspectRatio
:
false
,
scales
:
{
xAxes
:
[{
...
...
@@ -204,6 +210,26 @@ class Graph {
}
}
// var parentEventHandler = Chart.Controller.prototype.eventHandler;
// Chart.Controller.prototype.eventHandler = function() {
// var ret = parentEventHandler.apply(this, arguments);
// this.clear();
// this.draw();
// var yScale = this.scales['y-axis-0'];
// console.log(arguments[0].x);
// // Draw the vertical line here
// this.chart.ctx.beginPath();
// this.chart.ctx.moveTo(arguments[0].x, yScale.getPixelForValue(yScale.max));
// this.chart.ctx.strokeStyle = "#ff0000";
// this.chart.ctx.lineTo(arguments[0].x, yScale.getPixelForValue(yScale.min));
// this.chart.ctx.stroke();
// return ret;
// };
reqwest
({
url
:
self
.
url
+
"
/graph/
"
+
self
.
id
,
method
:
'
get
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment