From 143fb7594c1861a4b5842e7544587c0b11e6c1de Mon Sep 17 00:00:00 2001 From: Sunny Juneja Date: Tue, 19 Jun 2018 13:06:34 -0700 Subject: [PATCH] Chartist - Make ns optional for svg --- types/chartist/chartist-tests.ts | 1 + types/chartist/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/chartist/chartist-tests.ts b/types/chartist/chartist-tests.ts index 270e6e0970..bd7006723e 100644 --- a/types/chartist/chartist-tests.ts +++ b/types/chartist/chartist-tests.ts @@ -343,6 +343,7 @@ chart2.on('draw', (data: any) => { style: 'fill-opacity: 1' }, 'ct-area'); + triangle.attr({ style: 'fill-opacity: .5' }); // With data.element we get the Chartist SVG wrapper and we can replace the original point drawn by Chartist with our newly created triangle data.element.replace(triangle); } diff --git a/types/chartist/index.d.ts b/types/chartist/index.d.ts index 80cc589ee2..3d72210c73 100644 --- a/types/chartist/index.d.ts +++ b/types/chartist/index.d.ts @@ -534,7 +534,7 @@ declare namespace Chartist { /** * Set attributes on the current SVG element of the wrapper you're currently working on. */ - attr(attributes: Object | string, ns: string): Object | string; + attr(attributes: Object | string, ns?: string): Object | string; /** * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily.