mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-22 18:30:14 +01:00
feat(charts): add the charts demos
This commit is contained in:
parent
cf9ccf1850
commit
dd7acac528
25 changed files with 925 additions and 228 deletions
|
|
@ -2,7 +2,76 @@ import { Component } from '@angular/core';
|
|||
|
||||
@Component({
|
||||
selector: 'ngx-d3-area-stack',
|
||||
template: ``,
|
||||
template: `
|
||||
<ngx-charts-area-chart
|
||||
[view]="view"
|
||||
[scheme]="colorScheme"
|
||||
[results]="multi"
|
||||
[xAxis]="showXAxis"
|
||||
[yAxis]="showYAxis"
|
||||
[legend]="showLegend"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[xAxisLabel]="xAxisLabel"
|
||||
[yAxisLabel]="yAxisLabel"
|
||||
[autoScale]="autoScale">
|
||||
</ngx-charts-area-chart>
|
||||
`,
|
||||
})
|
||||
export class D3AreaStackComponent {
|
||||
multi = [
|
||||
{
|
||||
name: 'Germany',
|
||||
series: [
|
||||
{
|
||||
name: '2010',
|
||||
value: 7300000,
|
||||
},
|
||||
{
|
||||
name: '2011',
|
||||
value: 8940000,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
name: 'USA',
|
||||
series: [
|
||||
{
|
||||
name: '2010',
|
||||
value: 7870000,
|
||||
},
|
||||
{
|
||||
name: '2011',
|
||||
value: 8270000,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
name: 'France',
|
||||
series: [
|
||||
{
|
||||
name: '2010',
|
||||
value: 5000002,
|
||||
},
|
||||
{
|
||||
name: '2011',
|
||||
value: 5800000,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
view: any[] = [700, 400];
|
||||
showLegend = true;
|
||||
colorScheme = {
|
||||
domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA'],
|
||||
};
|
||||
autoScale = true;
|
||||
showXAxis = true;
|
||||
showYAxis = true;
|
||||
showXAxisLabel = true;
|
||||
showYAxisLabel = true;
|
||||
xAxisLabel = 'Country';
|
||||
yAxisLabel = 'Population';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue