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.