Skip to content

enter event being erroneously triggered? #69

@samselikoff

Description

@samselikoff

I'm extending a chart:

    d3.chart('BarChart').extend('AccountingBarChart', {
      initialize: function() {
        // this.dataLabels is a mixin
        this.dataLabels.layer('labels').on('enter', function() {
          this.text('$' + this.text());
        });
      }
    });

then rendering it multiple times

    setInterval(function() {
      barData.forEach(function(d) {
        d.value = d.value + 1;
      });
      barChart.draw(barData);
    }, 2000);

The second time the chart gets rendered, it triggers the enter event and tries to execute the above code, even though there's no entering data. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions