c3
c3 copied to clipboard
The popup is not shown properly when hover on the node and categories
When I click some where, I will call the function to draw the chart, the drawing is successful, but when I out the mouse over the categories and points the popup will not be shown, when I move the mouse around the popup will be shown. The following image will explain what I am facing.

This is my code d is a JSON object.
function showDetails(d){
// drawTreemapChart(d.allValue);
var value = [];
var categories = [];
for(var k in d.allValue[0]) {
if(k !== "Digit")
value.push(k.indexOf("expected") > -1 ? "expected" : k);
}
for(var i = 0; i < d.allValue.length; ++i) {
categories.push(d.allValue[i].Digit);
}
drawC3Chart(d.allValue, value, categories);
}
function drawC3Chart(input, values, categorie) {
console.log(input);
console.log(values);
console.log(categorie);
var chart = c3.generate({
bindto: '#treemapChart',
data: {
json: input,
keys: {
value: values,
}
},
axis: {
x: {
type: 'category',
categories: categorie
}
}
});
}
The output:

Thanks for you help!
- C3 version:0.4.18
- D3 version:3.5.16
- Browser:google chrome
- OS:Mac
I just sloved the problem, because of css file, I have two treemaps chart on the same page, the property of treemap conflicts with the c3 chart. So, I added the parent ID for the treemaps, then it works as expected!