Skip to content
Snippets Groups Projects
Commit 5b0a3c3e authored by Briggs, Aaron Shane's avatar Briggs, Aaron Shane
Browse files

working as expected

parent 37f1a924
No related branches found
No related tags found
1 merge request!389WDFN-738 Graph Secondary Time Series - Add Tool Tip
...@@ -7,7 +7,7 @@ import {getGraphCursorOffset} from 'ml/selectors/hydrograph-state-selector'; ...@@ -7,7 +7,7 @@ import {getGraphCursorOffset} from 'ml/selectors/hydrograph-state-selector';
import {getGroundwaterLevelPoints} from './discrete-data'; import {getGroundwaterLevelPoints} from './discrete-data';
import {getIVDataPoints} from './iv-data'; import {getIVDataPoints} from './iv-data';
import {getMainXScale, getMainYScale, getGraphTimeRange} from './scales'; import {getMainXScale, getMainYScale, getYScale, getGraphTimeRange} from './scales';
import {isVisible} from './time-series-data'; import {isVisible} from './time-series-data';
const isInTimeRange = function(dateTime, timeRange) { const isInTimeRange = function(dateTime, timeRange) {
...@@ -83,7 +83,7 @@ export const getIVDataCursorPoint = memoize((dataKind, timeRangeKind) => createS ...@@ -83,7 +83,7 @@ export const getIVDataCursorPoint = memoize((dataKind, timeRangeKind) => createS
*/ */
export const getIVDataTooltipPoint = memoize((dataKind, timeRangeKind) => createSelector( export const getIVDataTooltipPoint = memoize((dataKind, timeRangeKind) => createSelector(
getMainXScale(timeRangeKind), getMainXScale(timeRangeKind),
getMainYScale, getYScale('MAIN', dataKind),
getIVDataCursorPoint(dataKind, timeRangeKind), getIVDataCursorPoint(dataKind, timeRangeKind),
(xScale, yScale, cursorPoint) => { (xScale, yScale, cursorPoint) => {
if (cursorPoint && isFinite(yScale(cursorPoint.value))) { if (cursorPoint && isFinite(yScale(cursorPoint.value))) {
......
...@@ -132,19 +132,24 @@ export const drawTooltipFocus = function(elem, store) { ...@@ -132,19 +132,24 @@ export const drawTooltipFocus = function(elem, store) {
elem.call(link(store, drawFocusCircles, createSelector( elem.call(link(store, drawFocusCircles, createSelector(
getIVDataTooltipPoint('primary', 'current'), getIVDataTooltipPoint('primary', 'current'),
getIVDataTooltipPoint('secondary', 'current'),
getIVDataTooltipPoint('compare', 'prioryear'), getIVDataTooltipPoint('compare', 'prioryear'),
getGroundwaterLevelTooltipPoint, getGroundwaterLevelTooltipPoint,
(current, compare, gwLevel) => { (current, secondary, compare, gwLevel) => {
let points = []; let points = [];
if (current) { if (current) {
points.push(current); points.push(current);
} }
if (secondary) {
points.push(secondary);
}
if (compare) { if (compare) {
points.push(compare); points.push(compare);
} }
if (gwLevel) { if (gwLevel) {
points.push(gwLevel); points.push(gwLevel);
} }
return points; return points;
} }
))); )));
......
...@@ -218,6 +218,19 @@ ...@@ -218,6 +218,19 @@
} }
} }
.secondary-tooltip-text {
font-weight: normal;
color: variables.$default-time-series;
&.approved {
color: variables.$approved-time-series;
}
&.estimated {
color: variables.$estimated-time-series;
}
}
.compare-tooltip-text { .compare-tooltip-text {
font-weight: normal; font-weight: normal;
color: variables.$default-time-series-compare; color: variables.$default-time-series-compare;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment