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,6 +54,7 @@
<div *ngSwitchCase="'multiBar'">
<div class="col-md-6">
<div *ngIf="!report.hasDatasets()">{{'ANALYTICS.MESSAGES.NO-DATA-FOUND' | translate}}</div>
<div *ngIf="report.hasDatasets()">
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" [attr.for]="'stacked-id'">
<input type="checkbox" [attr.id]="'stacked-id'" class="mdl-checkbox__input"
[checked]="report.options.scales.xAxes[0].stacked"
@ -61,13 +62,14 @@
(change)="refresh(report)">
<span class="mdl-checkbox__label">Stacked</span>
</label>
<base-chart *ngIf="report.hasDatasets()" class="chart"
<base-chart class="chart"
[datasets]="report.datasets"
[labels]="report.labels"
[options]="report.options"
[chartType]="'bar'"></base-chart>
</div>
</div>
</div>
<div *ngSwitchCase="'HeatMap'">
<analytics-report-heat-map [report]="report"></analytics-report-heat-map>
</div>

View File

@ -160,21 +160,6 @@ export class BarChart extends Chart {
}
export class MultiBarChart extends BarChart {
options: any = {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
stepSize: 1
}
}],
xAxes: [{
ticks: {
},
stacked: false
}]
}
};
constructor(obj?: any) {
super(obj);

View File

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