6

I have a general c3js question. I'm trying to make the points in a C3JS line chart "hollow" (white fill, with a colored stroke), but am having a hard time figuring out how to do that. I've tried to add my own CSS, but it gets overwritten by the direct style tag in the html.

Does anyone have any suggestions?

Thanks!

2
  • can you post the code relative to such points?
    – tomtomtom
    May 14, 2015 at 22:09
  • Have you tried using !important in your CSS to give it precedence over CSS styling from c3.js?
    – Henry S
    May 15, 2015 at 9:17

2 Answers 2

9

or you can simply use the .c3-circle class as follow :

.c3-circle {
    stroke-width: 2px;
    stroke: #fff;
}
5

You'd probably need to dip into the D3 code to manipulate them on the svg, something like this:

d3.selectAll("circle")
  .attr("r", 10)
  .style("fill", "white")
  .style("stroke", "black")
  .style("stroke-width", 5);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.