Merge pull request #26677 from sunnyrjuneja/master

Chartist - Make ns optional for svg
This commit is contained in:
Paul van Brenk
2018-06-25 15:34:41 -07:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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);
}
+1 -1
View File
@@ -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.