4

I am using AngularCharts which is a AgnularJS wrapper for Chart.js. I want to remove all grid lines from my chart so there is just the actual line chart only. But the grids are not being removed.

Controller

 $scope.labelsx2 = [" ", " ", " ", " Time ago ", " ", " ", " "];
 $scope.seriesx2 = [' '];
 $scope.datax2 = [
    [65, 59, 80, 81, 56, 55, 40]
 ]; 
 $scope.options = {
            scaleShowGridLines : false
          };     


 $scope.labelsx2 = [" ", " ", " ", " Time ago ", " ", " ", " "];
 $scope.seriesx2 = [' '];
 $scope.datax2 = [
    [65, 59, 80, 81, 56, 55, 40]
 ]; 
 $scope.options = {
            scaleShowGridLines : false
          };     

Chart.html

<canvas id="line" class="chart chart-line" data="datax2" labels="labelsx2" legend="true" series="seriesx2" options="{showTooltips: false}"></canvas>
condo1234
  • 3,285
  • 6
  • 25
  • 34

2 Answers2

5

you can apply below option to remove grid lines.This works for me.

$scope.options = {
            scales: {
                xAxes: [{
                    gridLines: {
                        display: false
                    }
        }],
                yAxes: [{
                    gridLines: {
                        display: false
                    }
        }]
            }
        };

Thanks.

RAVI PATEL
  • 964
  • 10
  • 18
0

The problem is in the html:

Remove the options="{showTooltips: false}" to chart-options="options"

<canvas id="line" class="chart chart-line" data="datax2" labels="labelsx2" legend="true" series="seriesx2" chart-options="options"></canvas>
Karan
  • 1,048
  • 2
  • 20
  • 38