diff --git a/assets/src/scripts/components/hydrograph/layout.js b/assets/src/scripts/components/hydrograph/layout.js index a286966a8b8be711f4aaaf240ae05f827d177bdb..d2c17f04235f2ab28da6620ee68d2f9bdcf46d0e 100644 --- a/assets/src/scripts/components/hydrograph/layout.js +++ b/assets/src/scripts/components/hydrograph/layout.js @@ -2,11 +2,11 @@ // selector function which will return the width/height to use. import memoize from 'fast-memoize'; -import { createSelector } from 'reselect'; +import {createSelector} from 'reselect'; import config from '../../config'; -import { mediaQuery } from '../../utils'; -import { tickSelector } from './domain'; +import {mediaQuery} from '../../utils'; +import {tickSelector} from './domain'; export const ASPECT_RATIO = 1 / 2; export const ASPECT_RATIO_PERCENT = `${100 * ASPECT_RATIO}%`; @@ -22,7 +22,7 @@ const MARGIN_SMALL_DEVICE = { bottom: 10, left: 0 }; -//export const CIRCLE_RADIUS = 4; + export const CIRCLE_RADIUS_SINGLE_PT = 1; export const BRUSH_HEIGHT = 100; diff --git a/assets/src/scripts/components/hydrograph/legend.js b/assets/src/scripts/components/hydrograph/legend.js index e647f11c44844a65047f8aba9d5c02dfcd4b5a48..9e2081af1fdc2f5ba82ab0db1a93311afc50cfb7 100644 --- a/assets/src/scripts/components/hydrograph/legend.js +++ b/assets/src/scripts/components/hydrograph/legend.js @@ -3,7 +3,7 @@ import {set} from 'd3-collection'; import memoize from 'fast-memoize'; import {createSelector, createStructuredSelector} from 'reselect'; -import {CIRCLE_RADIUS, drawSimpleLegend} from '../../d3-rendering/legend'; +import {drawSimpleLegend} from '../../d3-rendering/legend'; import {defineLineMarker, defineTextOnlyMarker, defineRectangleMarker} from '../../d3-rendering/markers'; import {getMainLayout} from './layout'; diff --git a/assets/src/scripts/d3-rendering/legend.js b/assets/src/scripts/d3-rendering/legend.js index dbac0f5f4afeb7777a890adfebf04c66351522cd..6fd225ab748cd94f01c8d27a69a75190f20d97ad 100644 --- a/assets/src/scripts/d3-rendering/legend.js +++ b/assets/src/scripts/d3-rendering/legend.js @@ -1,5 +1,5 @@ -import {mediaQuery} from "../utils"; -import config from "../config"; +import {mediaQuery} from '../utils'; +import config from '../config'; export const CIRCLE_RADIUS = 4; diff --git a/assets/src/scripts/d3-rendering/legend.spec.js b/assets/src/scripts/d3-rendering/legend.spec.js index 33aea5c102282fbafc24071abcb76c237c0d37ca..0b9a7fbcecb49542aa2ec90aa5de0e117fdc2b32 100644 --- a/assets/src/scripts/d3-rendering/legend.spec.js +++ b/assets/src/scripts/d3-rendering/legend.spec.js @@ -1,40 +1,9 @@ -import {select, selectAll} from 'd3-selection'; -import {lineMarker, rectangleMarker, textOnlyMarker} from "./markers"; -import {drawSimpleLegend} from "./legend"; +import {select} from 'd3-selection'; +import {lineMarker, rectangleMarker, textOnlyMarker} from './markers'; +import {drawSimpleLegend} from './legend'; describe('D3-rendering: Legend module', () => { - const TEST_STATE = { - observationsData: { - timeSeries: { - '12345': { - type: 'Feature', - id: '12345', - properties: { - phenomenonTimeStart: '2018-01-02', - phenomenonTimeEnd: '2018-01-05', - timeStep: ['2018-01-02', '2018-01-03', '2018-01-04', '2018-01-05'], - result: ['5.0', '4.0', '6.1', '3.2'], - approvals: [['Approved'], ['Approved'], ['Approved'], ['Estimated']], - nilReason: [null, 'AA', null, null], - qualifiers: [null, null, ['ICE'], ['ICE']], - grades: [['50'], ['50'], ['60'], ['60']] - } - } - } - }, - observationsState: { - currentTimeSeriesId: '12345', - showSeries: { - current: true - } - }, - ui: { - windowWidth: 1024, - width: 800 - } - }; - describe('drawSimpleLegend', () => { let container;