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

Missing column in bar chart derived from data.json where the x value is 'empty' #2854

Open
thehouseoffung opened this issue Oct 13, 2021 · 0 comments

Comments

@thehouseoffung
Copy link

C3 version: 0.7.11
D3 version: 5.14.2
Browser: Chrome Version 94.0.4606.81 (Official Build) (x86_64)
OS: macOs Mojave Version 10.14.6

Observed: The chart seems to want to filter out a column but is always filtering out the last column.

Expected: Keep the column entirely, or filter out the 'empty' column specifically.

Screen Shot 2021-10-13 at 4 43 04 PM

Code snippet:

var chart = c3.generate({
  data: {
    json: [
      {name: 'www.site1.com', upload: 200, download: 200, total: 400},
      {name: '', upload: 100, download: 300, total: 400},
      {name: 'www.site3.com', upload: 300, download: 200, total: 500},
      {name: 'www.site4.com', upload: 400, download: 100, total: 500}
    ],
    type:'bar',
    keys: {
      x: 'name', // it's possible to specify 'x' when category axis
      value: ['upload', 'download']
    }
  },
  axis: {
    x: {
      type: 'category'
    }
  }
});
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

No branches or pull requests

1 participant