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

Setting "Show: False" in Legend causes exception error #60

Closed
myee123 opened this issue Mar 6, 2014 · 2 comments
Closed

Setting "Show: False" in Legend causes exception error #60

myee123 opened this issue Mar 6, 2014 · 2 comments

Comments

@myee123
Copy link

myee123 commented Mar 6, 2014

When I try to remove the Legend. For example:

    legend: {
        show: false
    },

I get an "Uncaught TypeError: Cannot call method 'selectAll' of null" error. The variable "legend" seem to be NULL

        l = legend.selectAll('.legend-item')

Uncaught TypeError: Cannot call method 'selectAll' of null c3.js:2779
updateLegend c3.js:2779
redraw c3.js:2489
init c3.js:1868
c3.generate c3.js:3118

I am using C3.js downloaded March 4, 2014.

  var chart = c3.generate({
    bindto: '#chart',
    data: {
      x : 'date',
      x_format : '%Y%m%d',
      columns: [
        ['date', '20130101', '20130102', '20130103', '20130104', '20130105', '20130106'],
        ['sample', 30, 200, 100, 400, 150, 250]
      ],
      type: 'bar'
    },
    axis : {
      x : {
        type : 'timeseries',
        tick : {
          format : "%b %d %Y"
        }
      }
    },
    legend: {
        show: false
    }
  });

Thanks,
Michael

@myee123
Copy link
Author

myee123 commented Mar 6, 2014

You can close this bug. I just downloaded release 0.1.15, and it seems to have fixed this issue.

@masayuki0812
Copy link
Member

OK, I close this. Thank you!

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

2 participants