Skip to content

Commit 0a26d81

Browse files
Brianna SookhooBrianna Sookhoo
authored andcommitted
rendering circles
1 parent 5ce8b93 commit 0a26d81

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

app/charts/route-trace.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import React, { useContext } from 'react';
21
import * as d3 from 'd3';
3-
42
class RouteTrace {
53

64
containerEl;
@@ -26,8 +24,8 @@ class RouteTrace {
2624
.enter()
2725
.append('circle')
2826
.style('fill', 'red')
29-
.attr('cx', () => Math.random() * width)
30-
.attr('cy', () => Math.random() * height)
27+
.attr('cx', 20)
28+
.attr('cy', 200)
3129
.attr('r', 20)
3230
.on('mouseup', (d, i, nodes) => this.setActiveDatapoint(d, nodes[i]));
3331
}

app/containers/GraphsContainer.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import RouteTrace from '../charts/route-trace.jsx';
1010
import MicroServiceTraffic from '../charts/microservice-traffic.jsx';
1111
import '../stylesheets/graphs.css';
1212

13-
1413
let vis;
1514

1615
const GraphsContainer = (props) => {
@@ -39,15 +38,13 @@ const GraphsContainer = (props) => {
3938
const [active, setActive] = useState(null);
4039
const canvas = useRef(null);
4140

42-
4341
useEffect(fetchData, []);
4442
useEffect(initVis, [ data ]);
4543

4644
function fetchData() {
4745
Promise.resolve().then(() => setData(initialData.nodes));
4846
}
4947

50-
5148
function initVis() {
5249
if(data && data.length) {
5350
const d3Props = {

0 commit comments

Comments
 (0)