-
Notifications
You must be signed in to change notification settings - Fork 83
onclick events possible? #10
Comments
By onClick events, do you mean adding events to parts of the ChartJS object? Like receiving a click event when a segment is clicked? If so, there is currently no "neat" way to do this. You can however get access to the ChartJS object, and get information about a click event. <canvas tc-chartjs-doughnut chart="chart" ng-click="handleChartClick($event)"></canvas> By adding the I have a small example here: http://jsfiddle.net/Lfmhcab3/4/ You will need to check http://www.chartjs.org/docs/ for documentation on each method, and how you could use the data it returns.
|
@maximmcnair have you had any luck with the onclick events? |
Adding the |
I create the models for 6-10 charts and render them in an ng-repeat. I need access to just one of the chart objects so I tried using ng-if and a flag in the model with two canvas elements. Everything works except getting a single scope value to reference that one chart. Any other suggestions for accessing the chart? Is it available directly from canvas element if I use jquery from the controller? I ended up using |
Hi, I'm wondering how onClick events can be implemented through angular?
The text was updated successfully, but these errors were encountered: