加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 删除AngularCharts中的网格线

发布时间:2020-12-17 17:26:39 所属栏目:安全 来源:网络整理
导读:我使用 AngularCharts这是Chart.js的AgnularJS包装器.我想从我的图表中删除所有网格线,因此只有实际的折线图.但网格没有被删除. 调节器 $scope.labelsx2 = [" "," "," Time ago "," "]; $scope.seriesx2 = [' ']; $scope.datax2 = [ [65,59,80,81,56,55,40]
我使用 AngularCharts这是Chart.js的AgnularJS包装器.我想从我的图表中删除所有网格线,因此只有实际的折线图.但网格没有被删除.

调节器

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


 $scope.labelsx2 = [" ",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>

解决方法

您可以在下面应用选项来删除网格线.这对我有用.

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

谢谢.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读