diff options
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/LineChart.tsx')
-rw-r--r-- | src/client/views/nodes/DataVizBox/components/LineChart.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/LineChart.tsx b/src/client/views/nodes/DataVizBox/components/LineChart.tsx index 88598be3d..458ff5f23 100644 --- a/src/client/views/nodes/DataVizBox/components/LineChart.tsx +++ b/src/client/views/nodes/DataVizBox/components/LineChart.tsx @@ -62,7 +62,7 @@ export class LineChart extends React.Component<ChartProps> implements Chart { annotations => { // modify how d3 renders so that anything in this annotations list would be potentially highlighted in some way // could be blue colored to make it look like anchor - this.drawAnnotations(this.props.chartData.data[0][1].x, this.props.chartData.data[0][1].y); + this.drawAnnotations(this.props.chartData.data[0][4].x, this.props.chartData.data[0][4].y); }, { fireImmediately: true } ); @@ -78,7 +78,7 @@ export class LineChart extends React.Component<ChartProps> implements Chart { // loop through all html elements with class .circle-d1 and find the one that has "data-x" and "data-y" attributes that match the dataX and dataY // if it exists, then highlight it // if it doesn't exist, then remove the highlight - const elements = document.querySelectorAll('datapoint'); + const elements = document.querySelectorAll('.datapoint'); for (let i = 0; i < elements.length; i++) { const element = elements[i]; const x = element.getAttribute('data-x'); @@ -234,7 +234,7 @@ export class LineChart extends React.Component<ChartProps> implements Chart { this._x = d0.x; this._y = d0.y; // find .circle-d1 with data-x = d0.x and data-y = d0.y - const selected = svg.selectAll('.circle-d1').filter((d: any) => d['data-x'] === d0.x && d['data-y'] === d0.y); + const selected = svg.selectAll('.datapoint').filter((d: any) => d['data-x'] === d0.x && d['data-y'] === d0.y); this._currSelected = { x: d0.x, y: d0.y, elem: selected }; console.log('Getting here'); setTimeout(() => this.props.getAnchor()); |