diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-21 15:40:57 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:06:04 +0200 |
| commit | 5020d7c293beb08699897e003525059396c16424 (patch) | |
| tree | 5169edc9a3cfe9ee2a584b2c61fa64062cf4517b /src/components/sidebars | |
| parent | 0439ccf76f9ccf68c7572deadf38d6a157c439e7 (diff) | |
Indicate current tick within chart
Diffstat (limited to 'src/components/sidebars')
| -rw-r--r-- | src/components/sidebars/elements/LoadChartComponent.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/sidebars/elements/LoadChartComponent.js b/src/components/sidebars/elements/LoadChartComponent.js index 54a20116..8f0ee6d7 100644 --- a/src/components/sidebars/elements/LoadChartComponent.js +++ b/src/components/sidebars/elements/LoadChartComponent.js @@ -1,7 +1,7 @@ import React from "react"; import {VictoryChart, VictoryLine, VictoryScatter} from "victory"; -const LoadChartComponent = ({data, tick}) => ( +const LoadChartComponent = ({data, currentTick}) => ( <VictoryChart height={300}> <VictoryLine data={data} @@ -10,6 +10,15 @@ const LoadChartComponent = ({data, tick}) => ( data={data} size={5} /> + <VictoryLine + data={[ + {x: currentTick, y: 0}, + {x: currentTick, y: 1}, + ]} + style={{ + data: {stroke: "#00A6D6", strokeWidth: 3} + }} + /> </VictoryChart> ); |
