shauns / react-d3-radar

React-based Radar chart for D3
MIT License
53 stars 32 forks source link

Straight lines / hexagones #9

Open redouane59 opened 6 years ago

redouane59 commented 6 years ago

Hello,

Is it possible with this component to draw hexagones instead of circles like this example http://bl.ocks.org/chrisrzhou/2421ac6541b68c1680f8 ?

Thank you !

shauns commented 6 years ago

Hi @redouane59 - thanks for your interest in the library! I'm not going to be able to make a change to this just yet, but I can tell you how its done:

https://github.com/shauns/react-d3-radar/blob/master/src/RadarCircle.js#L52

Could be changed to:

import {radialLine, curveCardinalClosed, curveLinear} from 'd3-shape';
...
.curve(curveLinear)

The D3 docs are here too: https://github.com/d3/d3-shape#curves

redouane59 commented 6 years ago

Thank you very much !

The library is awesome, I hope you keep working on it !

See you

2017-12-11 15:28 GMT+01:00 Shaun Stanworth notifications@github.com:

Hi @redouane59 https://github.com/redouane59 - thanks for your interest in the library! I'm not going to be able to make a change to this just yet, but I can tell you how its done:

https://github.com/shauns/react-d3-radar/blob/master/ src/RadarCircle.js#L52

Could be changed to:

import {radialLine, curveCardinalClosed, curveLinear} from 'd3-shape';... .curve(curveLinear)

The D3 docs are here too: https://github.com/d3/d3-shape#curves

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shauns/react-d3-radar/issues/9#issuecomment-350739230, or mute the thread https://github.com/notifications/unsubscribe-auth/AESsLIJXC2WyDpklrCpLKUceRnT0UlYeks5s_Tv4gaJpZM4QzR0N .

-- Redouane Bali 06.62.58.06.64