Category Archives: AngularJS

Angular Charts Flickering On Hover

Before displaying the new data, the chart data and labels should be reset.

Let’s say we have

<canvas id=”bar2″ class=”chart chart-bar”
chart-data=”dataAverageWorkingDaysToResolve” chart-labels=”labels2″
chart-options=”{tooltipTemplate: ‘<%=value%> Day(s)’ }”
</canvas>

And on js file we should have

$scope.dataAverageWorkingDaysToResolve = null;
$scope.labels2 = null;

Also, the canvas should be held in a div with ng-if not ng-show

That’s pretty much it..

Install angular-xeditable

  1. Ssh to vagrant box
  2. Navigate to /vagrant/project_folder
  3. May use
    sudo bower install angular-xeditable --allow-root
  4. Use in your js file:
    var app = angular.module("app", ["xeditable"]);

 

More info regarding angular-xeditable can be found on http://vitalets.github.io/angular-xeditable/

Keep in mind that the ‘.run’ block should look like this actually:

.run(
['editableOptions',
function(editableOptions) {
editableOptions.theme = 'bs3';
}]
)