AM Chart - ChartScrollbar标签是否可以隐藏或轮换?

时间:2015-10-16 22:40:24

标签: charts amcharts

我正在构建折线图,除了chartScrollbar中的标签外,一切正常,因为类别名称有点长,cahrtScrollbar中的标签相互堆叠使其无法读取。我想知道标签是否可以隐藏,只显示几个标签或使标签旋转到一定程度? Please see below screenshot

1 个答案:

答案 0 :(得分:6)

默认情况下,图表滚动条不显示标签。如果它适合您,可能会出现以下情况之一:

1)您有一些旧版本的JavaScript图表。升级到最新版本。

2)您可以通过在var app = angular.module('myApp', ['$strap.directives']); app.directive('notification', function($timeout){ return { restrict: 'E', replace: true, scope: { ngModel: '=' }, template: '<div class="alert fade" bs-alert="ngModel"></div>', link: function(scope, element, attrs) { $timeout(function(){ element.hide(); }, 3000); } } }); app.controller('AlertController', function($scope){ $scope.message = { "type": "info", "title": "Success!", "content": "alert directive is working pretty well with 3 sec timeout" }; $scope.alerts = []; $scope.addAlert = function(index) { $scope.alerts.push( { "type": "info", "title": "Success!" + index, "content": "alert " + index + " directive is working pretty well with 3 sec timeout" } ) } }); 配置中设置autoGridCount: true和/或gridCount来明确启用标签。删除那些。