Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
add parameter to handle svg aspect ratio (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
aguerot authored and scttcper committed Mar 21, 2018
1 parent decab85 commit f694c13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/lib/trend/trend.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { normalizeDataset } from './trend.helpers';
[attr.stroke-width]="strokeWidth"
[attr.stroke-linecap]="strokeLinecap"
[attr.viewBox]="viewBox"
[attr.preserveAspectRatio]="preserveAspectRatio"
>
<defs *ngIf="gradient && gradient.length">
<linearGradient [attr.id]="gradientId"
Expand Down Expand Up @@ -103,6 +104,7 @@ export class TrendComponent implements OnChanges {
@Input() strokeLinecap = '';
@Input() strokeWidth = 1;
@Input() gradient: string[] = [];
@Input() preserveAspectRatio: string;
@ViewChild('pathEl') pathEl: ElementRef;
gradientTrimmed: any[];
d: any;
Expand Down

0 comments on commit f694c13

Please sign in to comment.