Add download feature on mining charts
This commit is contained in:
@@ -77,3 +77,12 @@ export const formatterXAxisTimeCategory = (
|
||||
return date.toLocaleDateString(locale, { year: 'numeric', month: 'long' });
|
||||
}
|
||||
};
|
||||
|
||||
export const download = (href, name) => {
|
||||
var a = document.createElement('a');
|
||||
a.download = name;
|
||||
a.href = href;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user