|
@@ -94,7 +94,7 @@ export default function link(scope, elem, attrs, ctrl) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function addXAxis() {
|
|
function addXAxis() {
|
|
|
- xScale = d3.scaleTime()
|
|
|
|
|
|
|
+ scope.xScale = xScale = d3.scaleTime()
|
|
|
.domain([timeRange.from, timeRange.to])
|
|
.domain([timeRange.from, timeRange.to])
|
|
|
.range([0, chartWidth]);
|
|
.range([0, chartWidth]);
|
|
|
|
|
|
|
@@ -147,7 +147,7 @@ export default function link(scope, elem, attrs, ctrl) {
|
|
|
ticks: ticks
|
|
ticks: ticks
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- yScale = d3.scaleLinear()
|
|
|
|
|
|
|
+ scope.yScale = yScale = d3.scaleLinear()
|
|
|
.domain([y_min, y_max])
|
|
.domain([y_min, y_max])
|
|
|
.range([chartHeight, 0]);
|
|
.range([chartHeight, 0]);
|
|
|
|
|
|
|
@@ -206,7 +206,7 @@ export default function link(scope, elem, attrs, ctrl) {
|
|
|
y_min = 1;
|
|
y_min = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- yScale = d3.scaleLog()
|
|
|
|
|
|
|
+ scope.yScale = yScale = d3.scaleLog()
|
|
|
.base(panel.yAxis.logBase)
|
|
.base(panel.yAxis.logBase)
|
|
|
.domain([y_min, y_max])
|
|
.domain([y_min, y_max])
|
|
|
.range([chartHeight, 0]);
|
|
.range([chartHeight, 0]);
|
|
@@ -546,16 +546,10 @@ export default function link(scope, elem, attrs, ctrl) {
|
|
|
// Shared crosshair and tooltip
|
|
// Shared crosshair and tooltip
|
|
|
appEvents.on('graph-hover', event => {
|
|
appEvents.on('graph-hover', event => {
|
|
|
drawSharedCrosshair(event.pos);
|
|
drawSharedCrosshair(event.pos);
|
|
|
-
|
|
|
|
|
- // Show shared tooltip
|
|
|
|
|
- if (ctrl.dashboard.graphTooltip === 2) {
|
|
|
|
|
- tooltip.show(event.pos, data);
|
|
|
|
|
- }
|
|
|
|
|
}, scope);
|
|
}, scope);
|
|
|
|
|
|
|
|
appEvents.on('graph-hover-clear', () => {
|
|
appEvents.on('graph-hover-clear', () => {
|
|
|
clearCrosshair();
|
|
clearCrosshair();
|
|
|
- tooltip.destroy();
|
|
|
|
|
}, scope);
|
|
}, scope);
|
|
|
|
|
|
|
|
function onMouseDown(event) {
|
|
function onMouseDown(event) {
|
|
@@ -768,8 +762,6 @@ export default function link(scope, elem, attrs, ctrl) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
addHeatmap();
|
|
addHeatmap();
|
|
|
- scope.yScale = yScale;
|
|
|
|
|
- scope.xScale = xScale;
|
|
|
|
|
scope.yAxisWidth = yAxisWidth;
|
|
scope.yAxisWidth = yAxisWidth;
|
|
|
scope.xAxisHeight = xAxisHeight;
|
|
scope.xAxisHeight = xAxisHeight;
|
|
|
scope.chartHeight = chartHeight;
|
|
scope.chartHeight = chartHeight;
|