Questions tagged [react-d3]

Modular ReactJS charts made using d3 chart utilities.

Modular ReactJS charts made using d3 chart utilities. https://www.npmjs.com/package/react-d3

70 questions
2
votes
2 answers

Scale in different units

How to use D3 to convert and display the right information from different units E.g. All data is in mm.. [ { label: 'sample1', x: 300 }, { label: 'sample2', x: 1200 }, { label: 'sample3', x: 4150 } ] So, the question is, how can I…
ridermansb
  • 10,779
  • 24
  • 115
  • 226
1
vote
0 answers

nodeSvgShape not recognized when using react-d3-tree with typescript

When using the component from react-d3-tree, a few props that should work just aren't recognized/raise errors, some of those components being nodeSvgShape, nodeLabelComponent, allowForeignObjects, and probably more. TreeCanvas.tsx: /*…
gryxay
  • 11
  • 1
1
vote
1 answer

React-d3 Line Chart not showing and showing no errors

I'm trying to create my first react d3 line chart but I'm running into a snag. There are no errors showing up when I inspect Chrome so I'm not sure why it's not showing up. I feel like I'm close though. I've tried to look at other examples but I…
Cflux
  • 1,423
  • 3
  • 19
  • 39
1
vote
0 answers

Make continuous colorbar legend in React with D3

Good day! I am very new to working with D3 in React. I want to make a very simple continuous colorbar legend in my React app, that basically looks like this: I have tried to follow this example, but I get the following error: Module not found:…
CarlaVdB
  • 165
  • 11
1
vote
1 answer

Use images instead of svg circle (react-d3-tree)

I recently updated to version 2.0.1 and I am struggling to set images instead of svg circles to individual nodes. In the older versions I used nodeSvgShape property: nodeSvgShape: { shape: 'image', shapeProps: { href:…
AdamSulc
  • 330
  • 2
  • 4
  • 19
1
vote
0 answers

creating dynamic trees in react

I want to build dynamic trees in a React application and I am using the D3 library with external sources (CSV file) for that. This CSV file updates dynamically, the problem is that this file is located inside the React source folder, so every time…
Hkni
  • 115
  • 1
  • 11
1
vote
3 answers

React js update child state from an event in the parent

I have a WebSocket that's feeding data to the client and, i'm displaying it (data) in a chart using D3 in react, and so i want my chart to change according to the data, but to change the state of the chart component, i have to access it from the…
1
vote
2 answers

How to call component on onclick of node from react-d3-tree

class WorkflowDesign extends React.PureComponent { state = {}; componentDidMount() { const dimensions = this.treeContainer.getBoundingClientRect(); this.setState({ translate: { …
rohit_g
  • 11
  • 2
  • 9
1
vote
0 answers

ReactD3 is not defined in react using d3 charts

I am following this site for bar chart in d3 for React. getting error " ReactD3 is undefined" var BarChart = ReactD3.BarChart; Please help me out.
1
vote
0 answers

How to allow the negative x-axis values in react-d3 for bar charts

I'm trying to build the bar chart using react-d3-components, But here I want to show the values in negative x-axis also, can any one suggest me how can I do that, Using module is: https://www.npmjs.com/package/react-d3-components Here is my…
Hussian Shaik
  • 2,559
  • 9
  • 37
  • 57
1
vote
0 answers

How do I go about converting this data into a choropleth world map?

I have a dynamically generated object with shape: { Hungary: 10, Iceland: 16, Israel: 5, ...} How do I go about converting this data into a choropleth world map? I have tried react-simple-maps but it uses an extremely large json as the data source…
Avery235
  • 4,756
  • 12
  • 49
  • 83
1
vote
2 answers

How to render d3 chart in react redux

I'm trying to render basic d3 chart using React redux. I am getting a value from the reducer but when I iterate over the data I am getting error saying: Uncaught TypeError: Cannot read property 'map' of undefined at new ChartContainer…
LowCool
  • 1,187
  • 5
  • 25
  • 51
1
vote
0 answers

react d3 line chart how to add up analytics data for each day/month

I am trying to add up data that looks like this: { "_id" : "jK7o8qnWzgpZzzB3s", "createdAt" : ISODate("2017-01-23T03:31:02.619Z"), "productId" : "rgKEMvDD9BnJCzPHJ", "productOwnerId" : "mEWFCknMFydfxowhf" } { "_id" : "NgwntGwSYq6RqiXXq", "createdAt"…
Tyler
  • 2,346
  • 6
  • 33
  • 59
1
vote
0 answers

creating a bar chart with month using react-d3-basic

I'm having trouble creating a bar chart that displays months on the xScale, and dollars on yTicks. I want to show amount of sales made for so and so months. So the things I need to address are: a- setting the xScale to months string - 'jan, feb…
jackjoesmith
  • 951
  • 4
  • 20
  • 33
1
vote
2 answers

ReactD3: series attribute is not found in reactD3Basic object

I'm trying to use reactd3 library in my project. And I get an error: Uncaught TypeError: (0 , _reactD3Basic.series) is not a function In the line (in the library code): var chartSeriesData = (0, _reactD3Basic.series)(this.props); Because…