Fix multibar xAxes label

This commit is contained in:
mauriziovitale84
2016-11-04 16:46:39 +00:00
parent 7da29840b9
commit 762a25e110
2 changed files with 14 additions and 27 deletions
@@ -54,18 +54,20 @@
<div *ngSwitchCase="'multiBar'"> <div *ngSwitchCase="'multiBar'">
<div class="col-md-6"> <div class="col-md-6">
<div *ngIf="!report.hasDatasets()">{{'ANALYTICS.MESSAGES.NO-DATA-FOUND' | translate}}</div> <div *ngIf="!report.hasDatasets()">{{'ANALYTICS.MESSAGES.NO-DATA-FOUND' | translate}}</div>
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" [attr.for]="'stacked-id'"> <div *ngIf="report.hasDatasets()">
<input type="checkbox" [attr.id]="'stacked-id'" class="mdl-checkbox__input" <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" [attr.for]="'stacked-id'">
[checked]="report.options.scales.xAxes[0].stacked" <input type="checkbox" [attr.id]="'stacked-id'" class="mdl-checkbox__input"
[(ngModel)]="report.options.scales.xAxes[0].stacked" [checked]="report.options.scales.xAxes[0].stacked"
(change)="refresh(report)"> [(ngModel)]="report.options.scales.xAxes[0].stacked"
<span class="mdl-checkbox__label">Stacked</span> (change)="refresh(report)">
</label> <span class="mdl-checkbox__label">Stacked</span>
<base-chart *ngIf="report.hasDatasets()" class="chart" </label>
[datasets]="report.datasets" <base-chart class="chart"
[labels]="report.labels" [datasets]="report.datasets"
[options]="report.options" [labels]="report.labels"
[chartType]="'bar'"></base-chart> [options]="report.options"
[chartType]="'bar'"></base-chart>
</div>
</div> </div>
</div> </div>
<div *ngSwitchCase="'HeatMap'"> <div *ngSwitchCase="'HeatMap'">
@@ -160,21 +160,6 @@ export class BarChart extends Chart {
} }
export class MultiBarChart extends BarChart { export class MultiBarChart extends BarChart {
options: any = {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
stepSize: 1
}
}],
xAxes: [{
ticks: {
},
stacked: false
}]
}
};
constructor(obj?: any) { constructor(obj?: any) {
super(obj); super(obj);