Shail Patel
Shail Patel

Reputation: 1814

how to style style line chart points in c3js

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!

Upvotes: 6

Views: 5728

Answers (2)

Freezystem
Freezystem

Reputation: 4884

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

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

Upvotes: 9

Sean
Sean

Reputation: 15164

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);

Upvotes: 5

Related Questions