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

Listeners #48

Open
pasket opened this issue Jun 25, 2015 · 1 comment
Open

Listeners #48

pasket opened this issue Jun 25, 2015 · 1 comment

Comments

@pasket
Copy link

pasket commented Jun 25, 2015

How can I use listener?

I will appreciate an example of .on("filtered", function(chart, filter){...}) with angular-dc.

Thanks!

@pasket
Copy link
Author

pasket commented Jun 28, 2015

I solved the problem. Here is the answer:

  1. Add dc-post-setup-chart="customerSetupChart" to your html
Customer Reset
                </div>
  1. Add listeners in the controller:

$scope.customerSetupChart = function(myChart, chartOptions) {

        console.log(myChart);

        myChart.on("filtered", function(chart, filter){ 
                console.log(filter);
        });

        myChart.on('postRedraw', function(chart){
            console.log('postRedraw!!');
        });
    };

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