Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style empty points in line charts via CSS #1992

Closed
wants to merge 1 commit into from
Closed

Conversation

gcmznt
Copy link

@gcmznt gcmznt commented Mar 15, 2017

moved point color from fill to color to let the possibility to use the color for stroke via css like:

  .c3-circle {
    fill: white;
    stroke: currentColor;
    stroke-width: 2px;
  }

screen shot 2017-03-15 at 4 19 14 pm

@codecov-io
Copy link

Codecov Report

Merging #1992 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1992   +/-   ##
=======================================
  Coverage   64.09%   64.09%           
=======================================
  Files           1        1           
  Lines        4406     4406           
=======================================
  Hits         2824     2824           
  Misses       1582     1582

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4669b28...c67ca83. Read the comment docs.

@stephencookdev
Copy link

+1, would really like to see this in the codebase

For anyone else landing here from Googling around, I'm currently doing the following hack to achieve a similar result to what this PR would provide:

import c3 from "c3";

const originalRedrawCircle = c3.chart.internal.fn.redrawCircle;
const originalUpdateCircle = c3.chart.internal.fn.updateCircle;
c3.chart.internal.fn.redrawCircle = function() {
  const response = originalRedrawCircle.apply(this, arguments);
  const mainCircle = response[0];
  mainCircle.style("color", this.color);
  return response;
};
c3.chart.internal.fn.updateCircle = function() {
  const response = originalUpdateCircle.apply(this, arguments);
  this.mainCircle.style("color", this.color);
  return response;
};

@panthony
Copy link
Contributor

An up to date version exists here #2693

@panthony panthony closed this Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants