Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

Draw d3-axis with react, without direct D3 DOM manipulation

$
0
0

Im making a data visualization using d3 and react. Im trying to use react to render and d3 just for make calculations.

To draw X-Axis I have a <g> with a reference and to render the X-axis I just use:

const drawAxis = (graphData: graphData[], refXAxis: any, refYAxis: any, xScale: ScaleD3, yScale: ScaleD3): void => {    let xAxis = d3.axisBottom(xScale);    let yAxis = d3.axisLeft(yScale);    let a = d3.select(refXAxis).call(xAxis);    d3.select(refYAxis).call(yAxis); // so, this line manipulates DOM, I want to do *this* with react.};

Is it possible to make this in react way?.


Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>