Merge pull request #1009 from Alfresco/dev-mvitale-789-multibar

Multibar chart xAxes label
This commit is contained in:
Eugenio Romano 2016-11-07 09:37:45 +00:00 committed by GitHub
commit c927bcf485
3 changed files with 19 additions and 28 deletions

View File

@ -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'">

View File

@ -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);

View File

@ -32,7 +32,11 @@ import { DiagramsModule } from 'ng2-activiti-diagrams';
export class DiagramDemoComponent { export class DiagramDemoComponent {
private processDefinitionId: string = 'ThirdProcess:1:15053'; private processDefinitionId: string;
ngOnInit() {
this.processDefinitionId = 'ThirdProcess:1:15053';
}
} }
@NgModule({ @NgModule({