0

I am using Zingchart into AngularJs app. I have a Bar chart where scale X defines list of user_type and in the scale Y defines the number of users. I need to get the couple (X, Y) in each bar click and doing a link to other view.

How can I do that ?

Inizio
  • 2,226
  • 15
  • 18
S.Akrem
  • 71
  • 11

1 Answers1

0

After testing 3 or 4 events function, the right one is node_click:

$scope.myRender = {
    events: {
      node_click: function(p) {
        console.log(p.scaletext, p.value);
        $rootScope.$apply(function() {
          $location.path("config");
        });
      }
    }
};

And I have to add zc-render="myRender":

<div zingchart id="chart-1" zc-json="myJson" zc-render="myRender" zc-width="100%" zc-height="600px"></div>
S.Akrem
  • 71
  • 11