ankane / react-chartkick

Create beautiful JavaScript charts with one line of React
https://chartkick.com/react
MIT License
1.2k stars 58 forks source link

Donut chart no labels #34

Closed elroychibex closed 6 years ago

elroychibex commented 6 years ago

Hi, I created a donut chart in react, but I noticed that the values don't display when you hover over a section of the chart. Meanwhile, in the doc examples the labels appear. What could be wrong?

`<PieChart urea

    data={[["Allocated", 45], ["Distributed", 20], ["Undistributed/Intransit", 25], ["In Store", 10]]} 
    donut={true}  legend={false} colors={["#9ACA3D", "#2A91CB", "#EAFF00", "#C4C4C4"]} messages={{empty: "Fetching data..."}}
    library={{cutoutPercentage: 30}} dataset={{borderWidth: 0}} width="80px" height="80px" label="Value" />`
ankane commented 6 years ago

Hey @elroychibex, I'd make sure you don't have any elements on top of the chart. The hover labels show up fine for me with that code.

elroychibex commented 6 years ago

Thanks. I have found the issue. I had z-index: -1 set in the content area. Removed that and it worked fine.