You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A minor bug when trying the most basic circular-barplot. As part of adding the bars, you should also transform the origin of the appended group. Otherwise only a quarter of the plot will be shown. The revised code:
svg
.append('g')
// => this next line needs to be added so that the entire plot is centered in the svg element
.attr('transform', `translate(${width / 2},${height / 2 + 100})`)
.selectAll('path')
.data(data)
.join('path')
.attr('fill', '#69b3a2')
.attr(
'd',
d3
.arc() // imagine your doing a part of a donut plot
.innerRadius(innerRadius)
.outerRadius(d => y(d['Value']))
.startAngle(d => x(d.Country))
.endAngle(d => x(d.Country) + x.bandwidth())
.padAngle(0.01)
.padRadius(innerRadius),
);
Thanks again, your gallery is very helpful.
The text was updated successfully, but these errors were encountered:
Hi, great set of D3 examples, thank you.
A minor bug when trying the most basic circular-barplot. As part of adding the bars, you should also transform the origin of the appended group. Otherwise only a quarter of the plot will be shown. The revised code:
Thanks again, your gallery is very helpful.
The text was updated successfully, but these errors were encountered: