您好,我使用Morris.js创建了条形图,但我有这个:
我想将这两个区域移到图片中。
您知道如何删除它以及为什么拥有它吗?
这是我的代码:
$scope.chartdata = Morris.Bar({
element: 'stacked-bar-graph',
data: $scope.chartdataarray,
ymax: maxvalue,
gridIntegers: true,
numLines: 5,
yLabelFormat: function(y){return y != Math.round(y)?parseInt(y):y;},
padding: 25,
xkey: 'total',
ykeys: ['dn', 'm', 'af', 'n', 'unavail', 'whours', 'nwhours'],
labels: [gettext('A'), gettext('B'), gettext('C'), gettext('D'),
gettext('Q'), gettext('S'), gettext('D')],
xLabelFormat: function (d) {
return d['src']['month'] + '/' + d['src']['year'] + ' (' + d['src']['total'] + ')';
},
hoverCallback: function (index, options, content, row) {
var outsidescope = angular.element('#metricsapp').scope();
outsidescope.daysvalues = row;
$scope.total = row.total;
$scope.totalwhours = row.whours + row.nwhours;
$scope.totalmonth = row.month;
try {
outsidescope.$apply();
} catch (e) {
}
return gettext("Test") + ': ' + row.total;
},
barColors:['#607D8B', '#03A9F4', '#4CAF50', '#E91E63', '#FFEB3B', '#FF9800', '#9C27B0'],
});
我从未见过Morris这样的问题,我想您的CSS代码中有问题。我建议您检查此悬停以找出问题所在。