forked from p15670423/monkey
parent
79fabb1ac1
commit
f0d43e033e
|
@ -9,13 +9,14 @@ class ArcNode extends React.Component{
|
||||||
let {prefix, index, data} = this.props;
|
let {prefix, index, data} = this.props;
|
||||||
|
|
||||||
let arc = d3.arc().innerRadius(data.inner).outerRadius(data.outer).startAngle(0).endAngle(Math.PI * 2.0);
|
let arc = d3.arc().innerRadius(data.inner).outerRadius(data.outer).startAngle(0).endAngle(Math.PI * 2.0);
|
||||||
|
let id = prefix + 'Node_' + index;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<g transform={'rotate(180)'} id={data.node.pillar}>
|
<g transform={'rotate(180)'} id={data.node.pillar}>
|
||||||
<path
|
<path
|
||||||
|
|
||||||
id={prefix + 'Node_' + index}
|
id={id}
|
||||||
className={'arcNode'}
|
className={'arcNode'}
|
||||||
data-tooltip={data.tooltip}
|
data-tooltip={data.tooltip}
|
||||||
d={arc()}
|
d={arc()}
|
||||||
|
@ -23,7 +24,7 @@ class ArcNode extends React.Component{
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<text x={0} dy={data.fontStyle.size * 1.2} fontSize={data.fontStyle.size} textAnchor='middle' pointerEvents={'none'}>
|
<text x={0} dy={data.fontStyle.size * 1.2} fontSize={data.fontStyle.size} textAnchor='middle' pointerEvents={'none'}>
|
||||||
<textPath href={'#' + this._reactInternalFiber.key} startOffset={'26.4%'}>
|
<textPath href={'#' + id} startOffset={'26.4%'}>
|
||||||
{data.label}
|
{data.label}
|
||||||
</textPath>
|
</textPath>
|
||||||
</text>
|
</text>
|
||||||
|
|
Loading…
Reference in New Issue