react-d3 / react-d3-basic

Basic d3 charts in React.js, only include: line, bar, pie, scatter, area charts.
http://reactd3.org/docs/basic
221 stars 117 forks source link

Multi Line Chart with area fill Not Working #40

Open yawar-ali opened 8 years ago

yawar-ali commented 8 years ago

I am using react-d3-basic in my project and it is drawing multi line graph fine but i want one line chart to fill the area under it like it is shown in one of the example here: http://www.reactd3.org/docs/basic/#line_multiple.

But For me the area part is not working it is just displaying 2 line charts while i have specified area= true in the chart series. Any help will be regarded well.

I also tried Chart component from react-d3-core with Line & Area components its didn't work for me. I found LineChart Example quite simple and easy but got stuck if there is any substitute or article available kindly post the link i will try that.

I also want to know if there is any way to customize Axis Labels with react-d3-basic.

Thanks!

My Chart is showing like :

screen shot 2016-08-26 at 8 30 43 pm

But I want it to be like :

screen shot 2016-08-26 at 8 36 06 pm
jose31canizar commented 6 years ago

Just recreate the LineChart component from react-d3-shape and react-d3-core since react-d3-basic is just a lightweight wrapper around those libraries. Take a look at: https://github.com/react-d3/react-d3-basic/blob/0d90333c3914b3d863b88e4828a50ea1eee8ba02/src/line.jsx